public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michał Nazarewicz" <m.nazarewicz@samsung.com>
To: Evgeny Kuznetsov <EXT-Eugeny.Kuznetsov@nokia.com>
Cc: akpm@linux-foundation.org, torvalds@linux-foundation.org,
	mingo@elte.hu, gregkh@suse.de, a.p.zijlstra@chello.nl,
	xiaosuo@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] wait: using uninitialized member of wait queue
Date: Tue, 05 Oct 2010 13:39:49 +0200	[thread overview]
Message-ID: <op.vj3pcnag7p4s8u@pikus> (raw)
In-Reply-To: <1286276438.24366.42.camel@ekuznets-lx-nokia>

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

  reply	other threads:[~2010-10-05 11:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05  8:47 [PATCH 0/1] wait: using uninitialized member of wait queue Evgeny Kuznetsov
2010-10-05  8:47 ` [PATCH 1/1] " Evgeny Kuznetsov
2010-10-05 10:41   ` Michał Nazarewicz
2010-10-05 11:00     ` Evgeny Kuznetsov
2010-10-05 11:39       ` Michał Nazarewicz [this message]
2010-10-05 15:43 ` [PATCH 0/1] " Linus Torvalds
2010-10-06  6:01   ` Evgeny Kuznetsov

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=op.vj3pcnag7p4s8u@pikus \
    --to=m.nazarewicz@samsung.com \
    --cc=EXT-Eugeny.Kuznetsov@nokia.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.org \
    --cc=xiaosuo@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox