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

From: MichaÅ Nazarewicz
Date: Tue Oct 05 2010 - 07:37:49 EST


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@xxxxxxxxx> 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--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/