lkml.org 
[lkml]   [2004]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectPOSIX message queues, libmqueue: mq_open, mq_unlink
    Hi,

    I just noticed that mqs were included in the 2.6.6-rc1.

    Looking over the code in libmqueue-4.31, I noticed the checks for the
    name validity in the mq_open and mq_unlink. Why are they needed? They
    are pointless if the code in kernel depends on the valid name, because
    libmqueue can not be the only library using the mq interface (all the
    libcs being the next candidates), and they are pointless in case the
    kernel does not depend on them, because it will return an error anyway,
    if that is defined by the implementation.
    Can the checks be removed? Cutting of the first character will become
    unconditional than, btw, which is also not good.

    The other thing: mq_open gets the last two args (attr and mode)
    unconditionally. What will the kernel code get in the arguments if
    O_CREAT is not specified, and the calling code did not given the
    arguments?
    I don't think this will ever cause any problem, but the code is unclean
    in this aspect.

    Sincerely,
    Alex Riesen
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:02    [W:5.714 / U:0.528 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site