linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hui Peng <benquike@gmail.com>
To: Andrey Konovalov <andreyknvl@google.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	syzbot+44d53c7255bb1aea22d2@syzkaller.appspotmail.com,
	alexios.zavras@intel.com, "David S. Miller" <davem@davemloft.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	USB list <linux-usb@vger.kernel.org>,
	Mathias Payer <mathias.payer@nebelwelt.net>,
	netdev <netdev@vger.kernel.org>,
	rfontana@redhat.com,
	syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Oliver Neukum <oneukum@suse.com>
Subject: Re: WARNING in hso_free_net_device
Date: Thu, 5 Sep 2019 22:05:54 -0400	[thread overview]
Message-ID: <02ef64cc-5053-e6da-fc59-9970f48064c5@gmail.com> (raw)
In-Reply-To: <CAAeHK+y3eQ7bXvo1tiAkwLCsFkbSU5B+6hsKbdEzkSXP2_Jyzg@mail.gmail.com>



On 9/5/2019 7:24 AM, Andrey Konovalov wrote:
> On Thu, Sep 5, 2019 at 4:20 AM Hui Peng <benquike@gmail.com> wrote:
>>
>> Can you guys have  a look at the attached patch?
> 
> Let's try it:
> 
> #syz test: https://github.com/google/kasan.git eea39f24
> 
> FYI: there are two more reports coming from this driver, which might
> (or might not) have the same root cause. One of them has a suggested
> fix by Oliver.
> 
> https://syzkaller.appspot.com/bug?extid=67b2bd0e34f952d0321e
> https://syzkaller.appspot.com/bug?extid=93f2f45b19519b289613
> 

I think they are different, though similar.
This one is resulted from unregistering a network device.
These 2 are resulted from unregistering a tty device.

>>
>> On 9/4/19 6:41 PM, Stephen Hemminger wrote:
>>> On Wed, 4 Sep 2019 16:27:50 -0400
>>> Hui Peng <benquike@gmail.com> wrote:
>>>
>>>> Hi, all:
>>>>
>>>> I looked at the bug a little.
>>>>
>>>> The issue is that in the error handling code, hso_free_net_device
>>>> unregisters
>>>>
>>>> the net_device (hso_net->net)  by calling unregister_netdev. In the
>>>> error handling code path,
>>>>
>>>> hso_net->net has not been registered yet.
>>>>
>>>> I think there are two ways to solve the issue:
>>>>
>>>> 1. fix it in drivers/net/usb/hso.c to avoiding unregistering the
>>>> net_device when it is still not registered
>>>>
>>>> 2. fix it in unregister_netdev. We can add a field in net_device to
>>>> record whether it is registered, and make unregister_netdev return if
>>>> the net_device is not registered yet.
>>>>
>>>> What do you guys think ?
>>> #1

  parent reply	other threads:[~2019-09-06  2:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03 12:08 WARNING in hso_free_net_device syzbot
2019-09-04 20:27 ` Hui Peng
2019-09-04 22:41   ` Stephen Hemminger
2019-09-05  2:20     ` Hui Peng
2019-09-05 11:24       ` Andrey Konovalov
2019-09-05 11:47         ` syzbot
2019-09-06  2:05         ` Hui Peng [this message]
2019-09-09  9:47           ` Oliver Neukum
2019-11-19 15:16 Oliver Neukum
2019-11-20 23:37 ` syzbot
     [not found] <1574176549.28617.24.camel@neukum.org>
2019-11-20 23:27 ` syzbot

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=02ef64cc-5053-e6da-fc59-9970f48064c5@gmail.com \
    --to=benquike@gmail.com \
    --cc=alexios.zavras@intel.com \
    --cc=andreyknvl@google.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.payer@nebelwelt.net \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=rfontana@redhat.com \
    --cc=stephen@networkplumber.org \
    --cc=syzbot+44d53c7255bb1aea22d2@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).