Re: [PATCH 1/1] wait: using uninitialized member of wait queue

Michał Nazarewicz
2010-10-05T11:37:46Z

> On Tue, 2010-10-05 at 12:41 +0200, ext Michał Nazarewicz wrote:
>> (Interestingly, init_wait() is used only in 3 places in the kernel and
>> none uses flags.)

On Tue, 05 Oct 2010 13:00:38 +0200, Evgeny Kuznetsov <EXT-Eugeny.Kuznetsov@nokia.com> wrote:
> 'wait_queue_t' is passed to prepare_to_wait() function where 'flags' is
> used, e.g:
> File: /mm/mempool.c
> void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask)
> { .....
> .....
> init_wait(&wait);
> prepare_to_wait(&pool->wait, &wait, TASK_UNINTERRUPTIBLE);
> .....
> }

I meant that none of the callers initialized flags. I was initially concerned
whether some caller that used init_wait() could set flags and expect that they
won't be changed by the call to init_wait() -- this turned out not to be the
case.

So essentially, I'm supporting your point. Sorry about the confusion.

--
Best regards, _ _
| Humble Liege of Serenely Enlightened Majesty of o' \,=./ `o
| Computer Science, Michał "mina86" Nazarewicz (o o)
+----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo--