All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Jia-Ju Bai <baijiaju1990@163.com>
Cc: wporter82@gmail.com, sergio.paracuellos@gmail.com,
	aquannie@gmail.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rts5208: Fix a sleep-in-atomic bug in rtsx_exclusive_enter_ss
Date: Sat, 3 Jun 2017 17:52:38 +0900	[thread overview]
Message-ID: <20170603085238.GA27539@kroah.com> (raw)
In-Reply-To: <1496288615-29497-1-git-send-email-baijiaju1990@163.com>

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

  reply	other threads:[~2017-06-03 14:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01  3:43 [PATCH] rts5208: Fix a sleep-in-atomic bug in rtsx_exclusive_enter_ss Jia-Ju Bai
2017-06-03  8:52 ` Greg KH [this message]
2017-06-05  1:05   ` Jia-Ju Bai

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=20170603085238.GA27539@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=aquannie@gmail.com \
    --cc=baijiaju1990@163.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sergio.paracuellos@gmail.com \
    --cc=wporter82@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.