Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1657378

Re: [PATCH] ubifs: Fix a sleep-in-atomic bug in ubifs_read_nnode

From Richard Weinberger <richard@nod.at>
Newsgroups linux.kernel
Subject Re: [PATCH] ubifs: Fix a sleep-in-atomic bug in ubifs_read_nnode
Date 2017-06-05 10:30 +0200
Message-ID <tOVyH-rf-41@gated-at.bofh.it> (permalink)
References <tOR22-5Sy-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] ubifs: Fix a sleep-in-atomic bug in ubifs_read_nnode Jia-Ju Bai <baijiaju1990@163.com> - 2017-06-05 05:40 +0200
  Re: [PATCH] ubifs: Fix a sleep-in-atomic bug in ubifs_read_nnode Richard Weinberger <richard@nod.at> - 2017-06-05 10:30 +0200
    Re: [PATCH] ubifs: Fix a sleep-in-atomic bug in ubifs_read_nnode Richard Weinberger <richard@nod.at> - 2017-06-05 10:40 +0200
    Re: [PATCH] ubifs: Fix a sleep-in-atomic bug in ubifs_read_nnode Jia-Ju Bai <baijiaju1990@163.com> - 2017-06-05 10:50 +0200

csiph-web