[lvm-devel] Why print_log() is doing the memlock check?

Shinn'ya Hoshino hoshino-s at ma.dnes.nec.co.jp
Fri Dec 15 09:32:00 UTC 2006


Hello,

I am testing a writing error message to the /var/log/messages.
However, a part of the error message wasn't written.
It's blocked by memlock() function in print_log() function in lib/log.c.

lib/log.c:364
    if (_syslog && (_log_while_suspended || !memlock())) {
                                            ~~~~~~~~~~
        va_start(ap, format);
        vsyslog(level, trformat, ap);
        va_end(ap);
    }

I think that "memlock()" check is unnecessary.
Please teach me a reason why it is doing the memlock check.

Regards,

/* -------------------------------------------------------------
  Shinn'ya Hoshino          mailto:hoshino-s at ma.dnes.nec.co.jp
------------------------------------------------------------- */




More information about the lvm-devel mailing list