Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1321724
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH libata/for-4.5-fixes] libata-sff: use WARN instead of BUG on illegal host state machine state |
| Date | 2016-01-29 13:30 +0100 |
| Message-ID | <qWglA-2Vi-11@gated-at.bofh.it> (permalink) |
| References | <qVT5E-2Js-5@gated-at.bofh.it> <qWfSx-2qQ-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From a588afc920bc50e894f6ae2874c4281c795e0979 Mon Sep 17 00:00:00 2001 From: Tejun Heo <tj@kernel.org> Date: Fri, 29 Jan 2016 07:06:53 -0500 ata_sff_hsm_move() triggers BUG if it sees a host state machine state that it dind't expect. The risk for data corruption when the condition occurs is low as it's highly unlikely that it would lead to spurious completion of commands. The BUG occasionally triggered for subtle race conditions in the driver. Let's downgrade it to WARN so that it doesn't kill the machine unnecessarily. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Dmitry Vyukov <dvyukov@google.com> --- Applied to libata/for-4.5-fixes. Thanks. drivers/ata/libata-sff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index cdf6215..608677d 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c @@ -1296,7 +1296,8 @@ int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, break; default: poll_next = 0; - BUG(); + WARN(true, "ata%d: SFF host state machine in invalid state %d", + ap->print_id, ap->hsm_task_state); } return poll_next; -- 2.5.0
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
ata: BUG in ata_sff_hsm_move Dmitry Vyukov <dvyukov@google.com> - 2016-01-28 12:40 +0100
Re: ata: BUG in ata_sff_hsm_move Tejun Heo <tj@kernel.org> - 2016-01-29 13:00 +0100
Re: ata: BUG in ata_sff_hsm_move Dmitry Vyukov <dvyukov@google.com> - 2016-01-29 13:10 +0100
Re: ata: BUG in ata_sff_hsm_move Tejun Heo <tj@kernel.org> - 2016-01-29 13:30 +0100
Re: ata: BUG in ata_sff_hsm_move Dmitry Vyukov <dvyukov@google.com> - 2016-01-29 14:20 +0100
Re: ata: BUG in ata_sff_hsm_move Dmitry Vyukov <dvyukov@google.com> - 2016-01-29 14:50 +0100
Re: ata: BUG in ata_sff_hsm_move David Milburn <dmilburn@redhat.com> - 2016-01-29 19:10 +0100
Re: ata: BUG in ata_sff_hsm_move Tejun Heo <tj@kernel.org> - 2016-01-29 21:30 +0100
Re: ata: BUG in ata_sff_hsm_move Tejun Heo <tj@kernel.org> - 2016-01-29 21:30 +0100
Re: ata: BUG in ata_sff_hsm_move Dmitry Vyukov <dvyukov@google.com> - 2016-02-01 11:50 +0100
[PATCH libata/for-4.5-fixes] libata: fix sff host state machine locking while polling Tejun Heo <tj@kernel.org> - 2016-02-01 18:00 +0100
[PATCH libata/for-4.5-fixes] libata-sff: use WARN instead of BUG on illegal host state machine state Tejun Heo <tj@kernel.org> - 2016-01-29 13:30 +0100
csiph-web