linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: syzbot <syzbot+98704a51af8e3d9425a9@syzkaller.appspotmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com, Xiubo Li <xiubli@redhat.com>,
	Jeff Layton <jlayton@kernel.org>,
	Ilya Dryomov <idryomov@gmail.com>
Subject: Re: BUG: sleeping function called from invalid context in __kmalloc
Date: Fri, 7 Feb 2020 18:44:03 +0000	[thread overview]
Message-ID: <20200207184403.GD23230@ZenIV.linux.org.uk> (raw)
In-Reply-To: <000000000000e2de9d059dffefe3@google.com>

On Fri, Feb 07, 2020 at 09:44:10AM -0800, syzbot wrote:
> syzbot has found a reproducer for the following crash on:
> 
> HEAD commit:    90568ecf Merge tag 'kvm-5.6-2' of git://git.kernel.org/pub..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=15b26831e00000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=69fa012479f9a62
> dashboard link: https://syzkaller.appspot.com/bug?extid=98704a51af8e3d9425a9
> compiler:       clang version 10.0.0 (https://github.com/llvm/llvm-project/ c2443155a0fb245c8f17f2c1c72b6ea391e86e81)
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=172182b5e00000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1590aab5e00000
> 
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+98704a51af8e3d9425a9@syzkaller.appspotmail.com

commit 4fbc0c711b2464ee1551850b85002faae0b775d5
Author: Xiubo Li <xiubli@redhat.com>
Date:   Fri Dec 20 09:34:04 2019 -0500

    ceph: remove the extra slashes in the server path

is broken.  You really should not do blocking allocations under spinlocks.
What's more, this is pointless - all you do with the results of two such
calls is strcmp_null, for pity sake...  You could do the comparison in
one pass, no need for all of that.  Or you could do a normalized copy when
you parse options, store that normalized copy in addition to what you are
storing now and compare _that_.

  reply	other threads:[~2020-02-07 18:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 17:28 BUG: sleeping function called from invalid context in __kmalloc syzbot
2020-02-07 17:44 ` syzbot
2020-02-07 18:44   ` Al Viro [this message]
2020-02-07 18:52     ` Jeff Layton
2020-02-07 21:58 ` 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=20200207184403.GD23230@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+98704a51af8e3d9425a9@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=xiubli@redhat.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;
as well as URLs for NNTP newsgroup(s).