All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Edward Adam Davis <eadavis@qq.com>,
	syzbot+662f87a8ef490f45fa64@syzkaller.appspotmail.com,
	autofs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH] autofs: fix null deref in autofs_fill_super
Date: Wed, 15 Nov 2023 08:18:33 +0800	[thread overview]
Message-ID: <7b982b5e-ecad-1b55-7388-faf759b65cfe@themaw.net> (raw)
In-Reply-To: <20231114152601.GS1957730@ZenIV>


On 14/11/23 23:26, Al Viro wrote:
> On Tue, Nov 14, 2023 at 04:30:25PM +0800, Ian Kent wrote:
>
>> I'll prepare a patch, the main thing that I was concerned about was
>>
>> whether the cause really was NULL root_inode but Edward more or less
>>
>> tested that.
> One thing: that was a massaged copy of the variant in my local tree, so
> this
>
>>> 		managed_dentry_set_managed(s->s_root);
> might be worth an explanation; mainline has __managed_dentry_set_managed()
> here, and yes, it is safe since nothing can access it yet, but... it's
> not worth skipping on spin_lock/spin_unlock for ->d_flags update here.

Sorry, do you mean explanation of why we are not skipping the spin lock

or why we are setting automount trigger flags on the autofs root dentry?


Being a trigger mount (type direct or offset) they do need the flags, the

mount is mounted over the trigger.


I guess that including the locking is not going to make much difference.

I don't remember now but it was probably done because there may be many

mounts (potentially several thousand) being done and I wanted to get rid

of anything that wasn't needed.


Ian


  reply	other threads:[~2023-11-15  0:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14  1:02 [syzbot] [autofs?] general protection fault in autofs_fill_super syzbot
2023-11-14  2:17 ` [syzbot] [PATCH] Test np " syzbot
2023-11-14  3:52 ` [PATCH] autofs: fix null deref " Edward Adam Davis
2023-11-14  4:25   ` Ian Kent
2023-11-14  4:41     ` Al Viro
2023-11-14  8:30       ` Ian Kent
2023-11-14 15:26         ` Al Viro
2023-11-15  0:18           ` Ian Kent [this message]
2023-11-15  0:35             ` Al Viro
2023-11-15  1:06               ` Ian Kent
2023-11-14  5:48     ` [PATCH V2] autofs: fix null ptr " Edward Adam Davis
2023-11-16  9:51 ` [syzbot] [autofs?] general protection fault " 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=7b982b5e-ecad-1b55-7388-faf759b65cfe@themaw.net \
    --to=raven@themaw.net \
    --cc=autofs@vger.kernel.org \
    --cc=eadavis@qq.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+662f87a8ef490f45fa64@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=viro@zeniv.linux.org.uk \
    /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.