mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: 520047054719-0001@t-online.de (Oliver Neukum)
To: arjan@fenrus.demon.nl
Cc: linux-kernel@vger.kernel.org
Subject: Re: current->state after kmalloc
Date: Tue, 5 Feb 2002 01:43:21 +0100	[thread overview]
Message-ID: <16Xthq-147i9wC@fwd04.sul.t-online.com> (raw)
In-Reply-To: <m16XtOG-000OVeC@amadeus.home.nl>
In-Reply-To: <m16XtOG-000OVeC@amadeus.home.nl>

On Tuesday 05 February 2002 01:23, arjan@fenrus.demon.nl wrote:
> In article <16Xt8Y-1SQ44eC@fwd04.sul.t-online.com> you wrote:
> > set_current_state(TASK_INTERRUPTIBLE);
> > kmalloc(sizeof(struct x), GFP_KERNEL);
> >
> > what is current->state after kmalloc ?
>
> undefined. If kmalloc slept and you survived (due to setting
> TASK_INTERRUPTIBLE that's not guaranteed)  then it'll most likely be
> TASK_RUNNING.
> If you depend on this your kernel code is broken in that has subtle
> dependencies on unspecified behavior and will break whenever kmalloc
> changes internal behavior.

Is it safe with GFP_ATOMIC ?

	Regards
		Oliver

  reply	other threads:[~2002-02-05  0:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-05  0:06 Oliver Neukum
2002-02-05  0:23 ` arjan
2002-02-05  0:43   ` Oliver Neukum [this message]
2002-02-05  0:50   ` Robert Love
2002-02-05  1:08     ` Oliver Neukum
2002-02-05  8:16       ` arjan
2002-02-05  8:35         ` Oliver Neukum

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=16Xthq-147i9wC@fwd04.sul.t-online.com \
    --to=520047054719-0001@t-online.de \
    --cc=Oliver.Neukum@lrz.uni-muenchen.de \
    --cc=arjan@fenrus.demon.nl \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®