All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Joe Perches <joe@perches.com>, Saurabh Sengar <saurabh.truth@gmail.com>
Cc: jdike@addtoit.com, user-mode-linux-devel@lists.sourceforge.net,
	user-mode-linux-user@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] um: net: replace GFP_KERNEL with GFP_ATOMIC when spinlock is held
Date: Thu, 29 Oct 2015 16:00:48 +0100	[thread overview]
Message-ID: <563234A0.1010901@nod.at> (raw)
In-Reply-To: <1446130255.2757.168.camel@perches.com>

Am 29.10.2015 um 15:50 schrieb Joe Perches:
> On Thu, 2015-10-29 at 14:46 +0530, Saurabh Sengar wrote:
>> replace GFP_KERNEL with GFP_ATOMIC while spinlock is held,
>> as code while holding a spinlock should be atomic.
>> GFP_KERNEL may sleep and can cause deadlock,
>> where as GFP_ATOMIC may fail but certainly avoids deadlock
>>
>> Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
>> ---
>> v3: removed the atomic variable, as per Richard comment
> 
> Trivia: You could remove the gfp_mask variables too
> 	and just use GFP_KERNEL and GFP_ATOMIC directly.

Yep.
And "int gfp_mask" does also not make sense, GFP_* is of type
gfp_t.

Thanks,
//richard

      reply	other threads:[~2015-10-29 15:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29  9:16 [PATCH v3] um: net: replace GFP_KERNEL with GFP_ATOMIC when spinlock is held Saurabh Sengar
2015-10-29 14:50 ` Joe Perches
2015-10-29 15:00   ` Richard Weinberger [this message]

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=563234A0.1010901@nod.at \
    --to=richard@nod.at \
    --cc=jdike@addtoit.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saurabh.truth@gmail.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=user-mode-linux-user@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.