public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Riesen <ari@mbs-software.de>
To: Michal Wronski <wrona@mat.uni.torun.pl>
Cc: Krzysztof Benedyczak <golbi@mat.uni.torun.pl>,
	linux-kernel@vger.kernel.org
Subject: POSIX message queues, libmqueue: mq_open, mq_unlink
Date: Fri, 16 Apr 2004 10:11:55 +0200	[thread overview]
Message-ID: <20040416081155.GB7815@linux-ari.internal> (raw)

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

             reply	other threads:[~2004-04-16  8:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-16  8:11 Alex Riesen [this message]
2004-04-16 16:13 ` POSIX message queues, libmqueue: mq_open, mq_unlink Ulrich Drepper
2004-04-16 21:38   ` Alex Riesen
2004-04-16 22:17     ` Ulrich Drepper
2004-04-16 22:22     ` Chris Wright
2004-04-16 23:43       ` Alex Riesen
2004-04-16 23:56         ` Chris Wright
2004-04-17  8:20           ` Alex Riesen
  -- strict thread matches above, loose matches on Subject: below --
2004-04-17 10:49 Manfred Spraul
2004-04-17 11:16 ` Alex Riesen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040416081155.GB7815@linux-ari.internal \
    --to=ari@mbs-software.de \
    --cc=golbi@mat.uni.torun.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wrona@mat.uni.torun.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox