linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] fs/super: a possible sleep-in-atomic bug in put_super
@ 2017-10-06  8:59 Jia-Ju Bai
  2017-10-06  9:06 ` Michal Hocko
  2017-10-06 12:19 ` Al Viro
  0 siblings, 2 replies; 11+ messages in thread
From: Jia-Ju Bai @ 2017-10-06  8:59 UTC (permalink / raw)
  To: viro, torbjorn.lindh, rgooch; +Cc: linux-fsdevel, linux-kernel

According to fs/super.c, the kernel may sleep under a spinlock.
The function call path is:
put_super (acquire the spinlock)
   __put_super
     destroy_super
       list_lru_destroy
         list_lru_unregister
           mutex_lock --> may sleep
         memcg_get_cache_ids
           down_read --> may sleep

This bug is found by my static analysis tool and my code review.

Thanks,
Jia-Ju Bai

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-10-09  8:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-06  8:59 [BUG] fs/super: a possible sleep-in-atomic bug in put_super Jia-Ju Bai
2017-10-06  9:06 ` Michal Hocko
2017-10-07 11:56   ` Vladimir Davydov
2017-10-07 17:06     ` Al Viro
2017-10-07 21:14       ` Al Viro
2017-10-08  0:56         ` Al Viro
2017-10-08  2:03           ` Al Viro
2017-10-08 15:47             ` Vladimir Davydov
2017-10-08 21:13               ` Al Viro
2017-10-09  8:43                 ` Vladimir Davydov
2017-10-06 12:19 ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).