From: Manfred Spraul <manfred@colorfullife.com>
To: linux-arch@vger.kernel.org
Cc: "David S. Miller" <davem@redhat.com>, akpm@osdl.org
Subject: Re: posix message queues
Date: Sat, 10 Apr 2004 13:53:46 +0200 [thread overview]
Message-ID: <4077E04A.9060901@colorfullife.com> (raw)
In-Reply-To: <4077D851.7000008@colorfullife.com>
[-- Attachment #1: Type: text/plain, Size: 329 bytes --]
Manfred Spraul wrote:
>
>+if (notification.sigev_notify == SIGEV_THREAD) {
>+ if (copy_from_user(cookie, u_notification.sigev_value.sival_ptr,
>
notification, not u_notification: sival_ptr is a union on sival_int, and
sival_int was copied to kernel space by get_compat_sigevent.
Updated patch attached, sorry.
--
Manfred
[-- Attachment #2: patch-mqueue-compat --]
[-- Type: text/plain, Size: 791 bytes --]
// $Header$
// Kernel Version:
// VERSION = 2
// PATCHLEVEL = 6
// SUBLEVEL = 5
// EXTRAVERSION = -mm3
--- 2.6/ipc/compat_mq.c 2004-04-10 09:59:40.000000000 +0200
+++ build-2.6/ipc/compat_mq.c 2004-04-10 13:46:26.713887203 +0200
@@ -139,6 +139,7 @@
{
mm_segment_t oldfs;
struct sigevent notification;
+ char cookie[NOTIFY_COOKIE_LEN];
long ret;
if (!u_notification)
@@ -147,6 +148,14 @@
if (get_compat_sigevent(¬ification, u_notification))
return -EFAULT;
+ if (notification.sigev_notify == SIGEV_THREAD) {
+ if (copy_from_user(cookie, notification.sigev_value.sival_ptr,
+ NOTIFY_COOKIE_LEN)) {
+ return -EFAULT;
+ }
+ notification.sigev_value.sival_ptr = cookie;
+ }
+
oldfs = get_fs();
set_fs(KERNEL_DS);
ret = sys_mq_notify(mqdes, ¬ification);
next prev parent reply other threads:[~2004-04-10 11:53 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-07 19:07 posix message queues Andrew Morton
2004-04-07 19:15 ` Manfred Spraul
2004-04-08 8:17 ` Arnd Bergmann
2004-04-08 8:49 ` Andrew Morton
2004-04-08 14:08 ` Manfred Spraul
2004-04-08 20:24 ` Andrew Morton
2004-04-09 23:45 ` David S. Miller
2004-04-10 11:19 ` Manfred Spraul
2004-04-10 11:53 ` Manfred Spraul [this message]
2004-04-10 20:43 ` Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2010-09-02 9:51 POSIX Message Queues Ardhan Madras
2010-06-15 3:34 Ardhan Madras
2010-06-15 15:33 ` Glynn Clements
2010-06-12 9:10 Ardhan Madras
2010-06-12 13:40 ` Glynn Clements
2004-04-08 22:22 posix message queues Arnd Bergmann
2003-10-07 7:50 POSIX " Peter Waechtler
2003-10-07 8:11 ` Jakub Jelinek
2003-10-05 9:13 Krzysztof Benedyczak
2003-10-05 10:11 ` Manfred Spraul
2003-10-06 19:04 ` Krzysztof Benedyczak
2003-10-05 16:35 ` Ulrich Drepper
2003-10-05 18:16 ` Jamie Lokier
2003-10-05 18:32 ` Jakub Jelinek
2003-10-05 19:18 ` Jamie Lokier
2003-10-05 21:52 ` Ulrich Drepper
2002-10-02 10:35 Krzysztof Benedyczak
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=4077E04A.9060901@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=akpm@osdl.org \
--cc=davem@redhat.com \
--cc=linux-arch@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.