All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-ide@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Jeff Garzik <jgarzik@redhat.com>,
	Sergei Shtylyov <sshtylyov@ru.mvista.com>,
	syzkaller <syzkaller@googlegroups.com>,
	Kostya Serebryany <kcc@google.com>,
	Alexander Potapenko <glider@google.com>,
	Sasha Levin <sasha.levin@oracle.com>
Subject: Re: ata: BUG in ata_sff_hsm_move
Date: Fri, 29 Jan 2016 12:59:49 +0100	[thread overview]
Message-ID: <CACT4Y+Y_w3msrTw46T8wGpK-j09e6VAoPFa93JSfm+5_kvBAYQ@mail.gmail.com> (raw)
In-Reply-To: <20160129115214.GM32380@htj.duckdns.org>

On Fri, Jan 29, 2016 at 12:52 PM, Tejun Heo <tj@kernel.org> wrote:
> Hello, Dmitry.
>
> On Thu, Jan 28, 2016 at 12:35:43PM +0100, Dmitry Vyukov wrote:
>> Hello,
>>
>> I episodically hit the following BUG while running syzkaller fuzzer:
>>
>> ata2: protocol 2 task_state 0 (dev_stat 0x41)
>> ------------[ cut here ]------------
>> kernel BUG at drivers/ata/libata-sff.c:1302!
> ...
>> So the unexpected state is HSM_IDLE.
>
> Hmmm... the port interrupt handler checks for IDLE before calling into
> hsm_move, so the only explanation would be that something is resetting
> it to IDLE inbetween.  ce7514526742 ("libata: prevent HSM state change
> race between ISR and PIO") describes and fixes the same problem.  The
> fix seems correct and I can't find anywhere else where this can
> happen.  :(
>
> Can you please post the kernel log leading to the BUG?  Also, I don't
> think that condition needs to be BUG.  I'll change it to WARN.

Here are two logs, in both cases no kernel messages prior to the bug:
https://gist.githubusercontent.com/dvyukov/5087d633e3620280b6c7/raw/31c9ab1ced92ac5f85cfb15eaf48ec5793c2c3a1/gistfile1.txt
https://gist.githubusercontent.com/dvyukov/825b2e3d5fb80ae08a9a/raw/03c5a4f4c4bd9d0a304a71cda2da4c92f4b7f1ba/gistfile1.txt

  reply	other threads:[~2016-01-29 11:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28 11:35 ata: BUG in ata_sff_hsm_move Dmitry Vyukov
2016-01-29 11:52 ` Tejun Heo
2016-01-29 11:59   ` Dmitry Vyukov [this message]
2016-01-29 12:23     ` Tejun Heo
2016-01-29 13:18       ` Dmitry Vyukov
2016-01-29 13:40         ` Dmitry Vyukov
2016-01-29 18:14           ` David Milburn
2016-01-29 20:24             ` Tejun Heo
2016-01-29 20:23           ` Tejun Heo
2016-02-01 10:46             ` Dmitry Vyukov
2016-02-01 16:50               ` [PATCH libata/for-4.5-fixes] libata: fix sff host state machine locking while polling Tejun Heo
2016-01-29 12:20   ` [PATCH libata/for-4.5-fixes] libata-sff: use WARN instead of BUG on illegal host state machine state Tejun Heo

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=CACT4Y+Y_w3msrTw46T8wGpK-j09e6VAoPFa93JSfm+5_kvBAYQ@mail.gmail.com \
    --to=dvyukov@google.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=glider@google.com \
    --cc=jgarzik@redhat.com \
    --cc=kcc@google.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sasha.levin@oracle.com \
    --cc=sshtylyov@ru.mvista.com \
    --cc=syzkaller@googlegroups.com \
    --cc=tj@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.