linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Michal Wronski <wrona@mat.uni.torun.pl>
Cc: linux-kernel@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [RFC][PATCH] Posix Message Queues
Date: Mon, 14 Jul 2003 22:16:20 +0200	[thread overview]
Message-ID: <3F130F94.2030903@colorfullife.com> (raw)

Hi Michal,

You've implemented mq_open() in user space by combining open()+ioctl() 
syscalls. I think it's racy:

What if two processes call
{
    fd = mq_open("dummy",O_CREAT,0777,{.mq_maxmsg=10000});
    mq_send = mq_send(fd,buf,10000,0);
}

I think setting the queue options and creating a new queue must be 
atomic, i.e. we need a new syscall.

Could you replace the printk's with Dprintk or something like that? User 
space misbehaviour such as bad pointers should not generate printk messages.

--
    Manfred



             reply	other threads:[~2003-07-14 20:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-14 20:16 Manfred Spraul [this message]
2003-07-14 20:39 ` [RFC][PATCH] Posix Message Queues Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2003-07-14 17:43 Michal Wronski

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=3F130F94.2030903@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=hch@lst.de \
    --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;
as well as URLs for NNTP newsgroup(s).