public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jia-Ju Bai <baijiaju1990@163.com>
To: Richard Weinberger <richard@nod.at>
Cc: dedekind1@gmail.com, linux-mtd@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ubifs: Fix a sleep-in-atomic bug in ubifs_read_nnode
Date: Mon, 05 Jun 2017 16:43:25 +0800	[thread overview]
Message-ID: <593519AD.4070901@163.com> (raw)
In-Reply-To: <0687ba2f-f7d5-4632-eebb-50bbadd8a4b0@nod.at>

On 06/05/2017 04:25 PM, Richard Weinberger wrote:
> Jia-Ju Bai,
>
> Am 05.06.2017 um 05:38 schrieb Jia-Ju Bai:
>> The driver may sleep under a spin lock, and the function call path is:
>> ubifs_change_lp (acquire the lock by spin_lock)
>>    change_category
>>      ubifs_remove_from_cat
>>        remove_from_lpt_heap
>>          dbg_check_heap
>>            ubifs_lpt_lookup
>>              ubifs_read_nnode
>>                kzalloc(GFP_NOFS) -->  may sleep
>>
>> To fix it, "GFP_NOFS" is replaced with "GFP_ATOMIC".
> So, this happens only when dbg_check_heap() is activated, right?
>
> Thanks,
> //richard
Yes, I think so.

Thanks,
Jia-Ju Bai

      parent reply	other threads:[~2017-06-05  8:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05  3:38 [PATCH] ubifs: Fix a sleep-in-atomic bug in ubifs_read_nnode Jia-Ju Bai
2017-06-05  8:25 ` Richard Weinberger
2017-06-05  8:39   ` Richard Weinberger
2017-06-05  8:43   ` Jia-Ju Bai [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=593519AD.4070901@163.com \
    --to=baijiaju1990@163.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /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