All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ap420073@gmail.com
Cc: kuba@kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net] hsr: avoid to create proc file after unregister
Date: Mon, 22 Jun 2020 20:43:30 -0700 (PDT)	[thread overview]
Message-ID: <20200622.204330.1741202160832757898.davem@davemloft.net> (raw)
In-Reply-To: <20200621134625.10522-1-ap420073@gmail.com>

From: Taehee Yoo <ap420073@gmail.com>
Date: Sun, 21 Jun 2020 13:46:25 +0000

> When an interface is being deleted, "/proc/net/dev_snmp6/<interface name>"
> is deleted.
> The function for this is addrconf_ifdown() in the addrconf_notify() and
> it is called by notification, which is NETDEV_UNREGISTER.
> But, if NETDEV_CHANGEMTU is triggered after NETDEV_UNREGISTER,
> this proc file will be created again.
> This recreated proc file will be deleted by netdev_wati_allrefs().
> Before netdev_wait_allrefs() is called, creating a new HSR interface
> routine can be executed and It tries to create a proc file but it will
> find an un-deleted proc file.
> At this point, it warns about it.
> 
> To avoid this situation, it can use ->dellink() instead of
> ->ndo_uninit() to release resources because ->dellink() is called
> before NETDEV_UNREGISTER.
> So, a proc file will not be recreated.
> 
> Test commands
 ...
> Splat looks like:
 ...
> Reported-by: syzbot+1d51c8b74efa4c44adeb@syzkaller.appspotmail.com
> Fixes: e0a4b99773d3 ("hsr: use upper/lower device infrastructure")
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>

Applied and queued up for -stable, thank you.

      reply	other threads:[~2020-06-23  3:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-21 13:46 [PATCH net] hsr: avoid to create proc file after unregister Taehee Yoo
2020-06-23  3:43 ` David Miller [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=20200622.204330.1741202160832757898.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ap420073@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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.