lkml.org 
[lkml]   [2007]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mm][AIO] Fix AIO completion signal notification possible ref leak
On 02/05, S?bastien Dugu? wrote:
>
> Make sure we only accept valid sigev_notify values in aio_setup_sigevent(),
> namely SIGEV_NONE, SIGEV_THREAD_ID or SIGEV_SIGNAL.

I think this is correct, but I have another concern (most probably I just
confused looking at non-applied patch), could you re-check?

> @@ -959,6 +959,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;

Ok. But what if sigevent_find_task() fails after that? Doesn't this mean
that really_put_req() will do put_task_struct(NULL) ?

Oleg.

-
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/

\
 
 \ /
  Last update: 2007-02-05 18:13    [W:0.995 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site