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


Groups > linux.kernel > #1656825

Re: [PATCH] rts5208: Fix a sleep-in-atomic bug in rtsx_exclusive_enter_ss

From Greg KH <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH] rts5208: Fix a sleep-in-atomic bug in rtsx_exclusive_enter_ss
Date 2017-06-03 16:10 +0200
Message-ID <tOhUD-81i-45@gated-at.bofh.it> (permalink)
References <tNphv-5Fb-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jun 01, 2017 at 11:43:35AM +0800, Jia-Ju Bai wrote:
> The driver may sleep under a spin lock, and the function call path is:
> rtsx_exclusive_enter_ss (acquire the lock by spin_lock)
>   rtsx_enter_ss
>     rtsx_power_off_card
>       sd_cleanup_work
>         sd_stop_seq_mode
>           sd_switch_clock
>             sd_ddr_tuning
>               sd_ddr_pre_tuning_tx
>                 sd_change_phase
>                   wait_timeout
>                     schedule_timeout --> may sleep
> 
> To fix it, "wait_timeout" is replaced with mdelay in sd_change_phase.

Nice work, how are you finding these bugs?  What tools gives you this
kind of analysis?

thanks,

greg k-h

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


Thread

[PATCH] rts5208: Fix a sleep-in-atomic bug in rtsx_exclusive_enter_ss Jia-Ju Bai <baijiaju1990@163.com> - 2017-06-01 05:50 +0200
  Re: [PATCH] rts5208: Fix a sleep-in-atomic bug in  rtsx_exclusive_enter_ss Greg KH <gregkh@linuxfoundation.org> - 2017-06-03 16:10 +0200
    Re: [PATCH] rts5208: Fix a sleep-in-atomic bug in rtsx_exclusive_enter_ss Jia-Ju Bai <baijiaju1990@163.com> - 2017-06-05 03:10 +0200

csiph-web