All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Jia-Ju Bai <baijiaju1990@gmail.com>,
	David Miller <davem@davemloft.net>,
	tklauser@distanz.ch, arvind.yadav.cs@gmail.com,
	edumazet@google.com, johannes.berg@intel.com
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-usb@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [BUG] kaweth: a possible sleep-in-atomic bug in kaweth_start_xmit
Date: Wed, 13 Dec 2017 10:21:29 +0100	[thread overview]
Message-ID: <1513156889.26281.4.camel@suse.com> (raw)
In-Reply-To: <384f1b94-1fd1-cd38-f8ab-fcba872c77e9@gmail.com>

Am Mittwoch, den 13.12.2017, 16:57 +0800 schrieb Jia-Ju Bai:
> According to drivers/net/usb/kaweth.c, the driver may sleep under a 
> spinlock.
> The function call path is:
> kaweth_start_xmit (acquire the spinlock)
>    kaweth_async_set_rx_mode
>      kaweth_control
>        kaweth_internal_control_msg
>          usb_start_wait_urb
>            wait_event_timeout --> may sleep
>            usb_kill_urb --> may sleep
> 
> I do not find a good way to fix it, so I only report.
> This possible bug is found by my static analysis tool (DSAC) and checked 
> by my code review.
> 

Hi,

thanks for reporting. I need to get out my old test device.
It will take a few days. The obvious fix would be to set this
filter only on initialization. Unfortunately this needs to
be tested.

	Regards
		Oliver

      reply	other threads:[~2017-12-13  9:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13  8:57 [BUG] kaweth: a possible sleep-in-atomic bug in kaweth_start_xmit Jia-Ju Bai
2017-12-13  9:21 ` Oliver Neukum [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=1513156889.26281.4.camel@suse.com \
    --to=oneukum@suse.com \
    --cc=arvind.yadav.cs@gmail.com \
    --cc=baijiaju1990@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tklauser@distanz.ch \
    /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.