All of lore.kernel.org
 help / color / mirror / Atom feed
* + aio-completion-signal-notification-fix.patch added to -mm tree
@ 2007-01-26  3:13 akpm
  0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2007-01-26  3:13 UTC (permalink / raw)
  To: mm-commits; +Cc: sebastien.dugue


The patch titled
     AIO: comment aio_setup_sigevent() explaining why there is no task ref leak
has been added to the -mm tree.  Its filename is
     aio-completion-signal-notification-fix.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: AIO: comment aio_setup_sigevent() explaining why there is no task ref leak
From: Sebastien Dugueé <sebastien.dugue@bull.net>

Add a comment explaining why there is no task ref leak in
aio_setup_sigevent().

Signed-off-by: Sebastien Dugueé <sebastien.dugue@bull.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 fs/aio.c |    5 +++++
 1 file changed, 5 insertions(+)

diff -puN fs/aio.c~aio-completion-signal-notification-fix fs/aio.c
--- a/fs/aio.c~aio-completion-signal-notification-fix
+++ a/fs/aio.c
@@ -986,6 +986,11 @@ static long aio_setup_sigevent(struct ai
 	 */
 	notify->sigq = sigqueue_alloc();
 
+	/*
+	 * The task ref will be released in really_put_req()
+	 * when we dispose of the iocb later on in the submission
+	 * path.
+	 */
 	if (unlikely(!notify->sigq))
 		return -EAGAIN;
 
_

Patches currently in -mm which might be from sebastien.dugue@bull.net are

rework-compat_sys_io_submit.patch
fix-aioh-includes.patch
make-good_sigevent-non-static.patch
aio-completion-signal-notification.patch
aio-completion-signal-notification-fix.patch
add-listio-syscall-support.patch
add-listio-syscall-support-fix.patch
add-listio-syscall-support-fix-2.patch

^ permalink raw reply	[flat|nested] 2+ messages in thread

* + aio-completion-signal-notification-fix.patch added to -mm tree
@ 2007-02-05 22:42 akpm
  0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2007-02-05 22:42 UTC (permalink / raw)
  To: mm-commits
  Cc: sebastien.dugue, bcrl, bharata, hch, jean-pierre.dion,
	laurent.vivier, oleg, pbadari, suparna, zach.brown


The patch titled
     Fix AIO completion signal notification possible ref leak
has been added to the -mm tree.  Its filename is
     aio-completion-signal-notification-fix.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: Fix AIO completion signal notification possible ref leak
From: Sébastien Dugué <sebastien.dugue@bull.net>

Make sure we only accept valid sigev_notify values in aio_setup_sigevent(),
namely SIGEV_NONE, SIGEV_THREAD_ID or SIGEV_SIGNAL.

Signed-off-by: Sébastien Dugué <sebastien.dugue@bull.net>
Cc: Laurent Vivier <laurent.vivier@bull.net>
Cc: Bharata B Rao <bharata@in.ibm.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Suparna Bhattacharya <suparna@in.ibm.com>
Cc: Zach Brown <zach.brown@oracle.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Benjamin LaHaise <bcrl@linux.intel.com>
Cc: Jean Pierre Dion <jean-pierre.dion@bull.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/aio.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -puN fs/aio.c~aio-completion-signal-notification-fix fs/aio.c
--- a/fs/aio.c~aio-completion-signal-notification-fix
+++ a/fs/aio.c
@@ -938,7 +938,7 @@ static int aio_send_signal(struct aio_no
 	info->si_uid = 0;
 	info->si_value = notify->value;
 
-	if (notify->notify & SIGEV_THREAD_ID)
+	if (notify->notify == SIGEV_THREAD_ID)
 		ret = send_sigqueue(notify->signo, sigq, notify->target);
 	else
 		ret = send_group_sigqueue(notify->signo, sigq, notify->target);
@@ -958,6 +958,10 @@ static long aio_setup_sigevent(struct ai
 	if (event.sigev_notify == SIGEV_NONE)
 		return 0;
 
+	if (event.sigev_notify != SIGEV_SIGNAL &&
+	    event.sigev_notify != SIGEV_THREAD_ID)
+		return -EINVAL;
+
 	notify->notify = event.sigev_notify;
 	notify->signo = event.sigev_signo;
 	notify->value = event.sigev_value;
_

Patches currently in -mm which might be from sebastien.dugue@bull.net are

rework-compat_sys_io_submit.patch
fix-aioh-includes.patch
fix-access_ok-checks.patch
make-good_sigevent-non-static.patch
make-good_sigevent-non-static-fix.patch
make-__sigqueue_free-and.patch
aio-completion-signal-notification.patch
aio-completion-signal-notification-fix.patch
add-listio-syscall-support.patch

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-02-05 22:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-26  3:13 + aio-completion-signal-notification-fix.patch added to -mm tree akpm
2007-02-05 22:42 akpm

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.