From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Cc: linux-kernel@vger.kernel.org,
Richard Palethorpe <rpalethorpe@suse.de>,
Jeroen Hofstee <jhofstee@victronenergy.com>,
Linux Memory Management List <linux-mm@kvack.org>,
kernel test robot <oliver.sang@intel.com>,
lkp@intel.com, lkp@lists.01.org, ltp@lists.linux.it,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Jiri Slaby <jirislaby@kernel.org>,
Marc Kleine-Budde <mkl@pengutronix.de>,
Paolo Abeni <pabeni@redhat.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Vincent Mailhol <mailhol.vincent@wanadoo.fr>,
Wolfgang Grandegger <wg@grandegger.com>,
linux-can@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] can: slcan: do not sleep with a spin lock held
Date: Wed, 13 Jul 2022 17:35:54 +0200 [thread overview]
Message-ID: <Ys7mWmIfuJy+1ax7@kroah.com> (raw)
In-Reply-To: <20220713151947.56379-1-dario.binacchi@amarulasolutions.com>
On Wed, Jul 13, 2022 at 05:19:47PM +0200, Dario Binacchi wrote:
> We can't call close_candev() with a spin lock held, so release the lock
> before calling it.
>
> Fixes: c4e54b063f42f ("can: slcan: use CAN network device driver API")
> Reported-by: kernel test robot <oliver.sang@intel.com>
> Link: https://lore.kernel.org/linux-kernel/Ysrf1Yc5DaRGN1WE@xsang-OptiPlex-9020/
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
>
> ---
>
> drivers/net/can/slcan/slcan-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/can/slcan/slcan-core.c b/drivers/net/can/slcan/slcan-core.c
> index 54d29a410ad5..6aaf2986effc 100644
> --- a/drivers/net/can/slcan/slcan-core.c
> +++ b/drivers/net/can/slcan/slcan-core.c
> @@ -688,6 +688,7 @@ static int slc_close(struct net_device *dev)
> /* TTY discipline is running. */
> clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
> }
> + spin_unlock_bh(&sl->lock);
> netif_stop_queue(dev);
Can you have a lock held when calling netif_stop_queue()? You don't
mention this in your changelog text :(
thanks,
greg k-h
prev parent reply other threads:[~2022-07-13 15:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-13 15:19 Dario Binacchi
2022-07-13 15:35 ` Greg Kroah-Hartman [this message]
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=Ys7mWmIfuJy+1ax7@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bigeasy@linutronix.de \
--cc=dario.binacchi@amarulasolutions.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhofstee@victronenergy.com \
--cc=jirislaby@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=lkp@lists.01.org \
--cc=ltp@lists.linux.it \
--cc=mailhol.vincent@wanadoo.fr \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=oliver.sang@intel.com \
--cc=pabeni@redhat.com \
--cc=rpalethorpe@suse.de \
--cc=wg@grandegger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox