linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Hillf Danton <hdanton@sina.com>
Cc: dhowells@redhat.com,
	syzbot <syzbot+459a5dce0b4cb70fd076@syzkaller.appspotmail.com>,
	linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com
Subject: Re: general protection fault in strncasecmp
Date: Fri, 09 Oct 2020 11:04:24 +0100	[thread overview]
Message-ID: <471040.1602237864@warthog.procyon.org.uk> (raw)
In-Reply-To: <20200924134052.1156-1-hdanton@sina.com>

Hillf Danton <hdanton@sina.com> wrote:

> +			/*
> +			 * care to detect writers because
> +			 *
> +			 * read_seqbegin_or_lock(&net->cells_lock, &seq);
> +			 *
> +			 * is unable to block 
> +			 *
> +			 * write_seqlock(&net->cells_lock);
> +			 *
> +			 */

That shouldn't be true.  The loop may make one or two passes, the first
without the lock, the second with.  The RCU read lock is supposed to be held
in both cases too (but see below).

One of the call sites, however, afs_probe_cell_name(), doesn't call
afs_lookup_cell_rcu() with the RCU read lock held - which is an error, but not
obviously the one that's biting here.

David


  parent reply	other threads:[~2020-10-09 10:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200924134052.1156-1-hdanton@sina.com>
2020-09-24  9:26 ` general protection fault in strncasecmp syzbot
2020-09-28 17:40   ` syzbot
2020-10-09 10:04   ` David Howells [this message]
2020-10-16 13:06   ` David Howells
2020-10-16 13:07     ` syzbot
2021-03-09 16:08       ` Dmitry Vyukov
2021-03-09 17:31       ` David Howells

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=471040.1602237864@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=hdanton@sina.com \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+459a5dce0b4cb70fd076@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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).