From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: syzbot <syzbot+5434727aa485c3203fed@syzkaller.appspotmail.com>,
"andrii@kernel.org" <andrii@kernel.org>,
"ast@kernel.org" <ast@kernel.org>,
"avagin@gmail.com" <avagin@gmail.com>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
"cong.wang@bytedance.com" <cong.wang@bytedance.com>,
"daniel@iogearbox.net" <daniel@iogearbox.net>,
"davem@davemloft.net" <davem@davemloft.net>,
"hawk@kernel.org" <hawk@kernel.org>,
"john.fastabend@gmail.com" <john.fastabend@gmail.com>,
"kafai@fb.com" <kafai@fb.com>,
"kpsingh@kernel.org" <kpsingh@kernel.org>,
"kuba@kernel.org" <kuba@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"songliubraving@fb.com" <songliubraving@fb.com>,
"syzkaller-bugs@googlegroups.com"
<syzkaller-bugs@googlegroups.com>, "yhs@fb.com" <yhs@fb.com>
Subject: Re: [syzbot] WARNING in __dev_change_net_namespace
Date: Thu, 11 Nov 2021 09:56:35 +0100 [thread overview]
Message-ID: <YYzaw+7TSwcGTGQI@kroah.com> (raw)
In-Reply-To: <e6bfbffa089c711fa3ea21f5f8ab852aaa4d9c00.camel@sipsolutions.net>
On Thu, Nov 11, 2021 at 08:50:33AM +0100, Johannes Berg wrote:
> On Thu, 2021-11-11 at 06:43 +0000, syzbot wrote:
> >
> > console output: https://syzkaller.appspot.com/x/log.txt?x=15b45fb6b00000
>
> So we see that fault injection is triggering a memory allocation failure
> deep within the device_rename():
>
> int __dev_change_net_namespace(struct net_device *dev, struct net *net,
> const char *pat, int new_ifindex)
> {
> ...
> /* Fixup kobjects */
> err = device_rename(&dev->dev, dev->name);
> WARN_ON(err);
>
>
> So we hit that WARN_ON().
>
> I'm not really sure what to do about that though. Feels like we should
> be able to cope with failures here, but clearly we don't, and it seems
> like it would also be tricky to do after all the work already done at
> this point.
>
> Perhaps device_rename() could grow an API to preallocate all the
> memories, but that would also be fairly involved, I imagine?
That would be a mess to unwind at times. For fault-injection stuff like
this, that can not be hit in "real world operation", if the issue can
not be easily handled, I don't think it is worth worrying about.
We have some things like this in the tty layer at boot time, if a memory
failure happens then, we have bigger overall problems in the system than
trying to recover from minor stuff like this.
thanks,
greg k-h
prev parent reply other threads:[~2021-11-11 8:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-11 6:43 [syzbot] WARNING in __dev_change_net_namespace syzbot
2021-11-11 7:50 ` Johannes Berg
2021-11-11 8:56 ` 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=YYzaw+7TSwcGTGQI@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=avagin@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=hawk@kernel.org \
--cc=johannes@sipsolutions.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=syzbot+5434727aa485c3203fed@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=yhs@fb.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