linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] rts5208: Sleeping under a spin lock in xd_init_l2p_tbl
@ 2017-06-05  1:38 Jia-Ju Bai
  0 siblings, 0 replies; only message in thread
From: Jia-Ju Bai @ 2017-06-05  1:38 UTC (permalink / raw)
  To: Greg KH, wporter82, sergio.paracuellos, aquannie; +Cc: devel, LKML

According to rtsx_chip.c and xd.c, the driver may sleep under a spin lock.
The function call path is:
rtsx_exclusive_enter_ss (acquire the lock by spin_lock)
   rtsx_enter_ss
     rtsx_power_off_card
       xd_cleanup_work
         xd_delay_write
           xd_finish_write
             xd_set_unused_block
               xd_build_l2p_tbl
                 xd_init_l2p_tbl
                   vmalloc --> may sleep

This bug is found by my static analysis tool and my code review.
I hope to fix it, but I do not have a good solution.

Thanks,
Jia-Ju Bai

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-05  1:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-05  1:38 [BUG] rts5208: Sleeping under a spin lock in xd_init_l2p_tbl Jia-Ju Bai

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).