LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Hui Peng <benquike@gmail.com>
Cc: syzbot+44d53c7255bb1aea22d2@syzkaller.appspotmail.com,
	alexios.zavras@intel.com, andreyknvl@google.com,
	davem@davemloft.net, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	mathias.payer@nebelwelt.net, netdev@vger.kernel.org,
	rfontana@redhat.com, syzkaller-bugs@googlegroups.com,
	tglx@linutronix.de
Subject: Re: WARNING in hso_free_net_device
Date: Wed, 4 Sep 2019 15:41:40 -0700
Message-ID: <20190904154140.45dfb398@hermes.lan> (raw)
In-Reply-To: <d6e4d2da-66c6-a8fe-2fea-a3435fa7cb54@gmail.com>

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

  reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03 12:08 syzbot
2019-09-04 20:27 ` Hui Peng
2019-09-04 22:41   ` Stephen Hemminger [this message]
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
2019-09-09  9:47           ` Oliver Neukum

Reply instructions:

You may reply publically 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=20190904154140.45dfb398@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=alexios.zavras@intel.com \
    --cc=andreyknvl@google.com \
    --cc=benquike@gmail.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=rfontana@redhat.com \
    --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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git