Messages in this thread | | | Date | Fri, 16 Apr 2004 10:11:55 +0200 | From | Alex Riesen <> | Subject | POSIX 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/
| |