mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: arjan@fenrus.demon.nl
To: Oliver.Neukum@lrz.uni-muenchen.de
Cc: linux-kernel@vger.kernel.org
Subject: Re: current->state after kmalloc
Date: Tue, 5 Feb 2002 00:23:16 +0000 (GMT)	[thread overview]
Message-ID: <m16XtOG-000OVeC@amadeus.home.nl> (raw)
In-Reply-To: <16Xt8Y-1SQ44eC@fwd04.sul.t-online.com>

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.

Greetings,
   Arjan van de Ven


  reply	other threads:[~2002-02-05  0:24 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 [this message]
2002-02-05  0:43   ` Oliver Neukum
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=m16XtOG-000OVeC@amadeus.home.nl \
    --to=arjan@fenrus.demon.nl \
    --cc=Oliver.Neukum@lrz.uni-muenchen.de \
    --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®