From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Eryu Guan <guaneryu@gmail.com>
Cc: Ming Lei <tom.leiming@gmail.com>,
Linux SCSI List <linux-scsi@vger.kernel.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: kernel BUG at block/bio.c:1787! while initializing scsi_debug on ppc64 host
Date: Tue, 15 Dec 2015 13:29:59 -0500 [thread overview]
Message-ID: <yq1egenwons.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <20151215130631.GD19209@eguan.usersys.redhat.com> (Eryu Guan's message of "Tue, 15 Dec 2015 21:06:31 +0800")
>>>>> "Eryu" == Eryu Guan <guaneryu@gmail.com> writes:
Eryu,
Does the patch below fix the issue?
--
Martin K. Petersen Oracle Linux Engineering
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 3d22fc3e3c1a..d1eb7aa78b8d 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2667,8 +2667,9 @@ static void sd_read_block_limits(struct scsi_disk *sdkp)
if (buffer[3] == 0x3c) {
unsigned int lba_count, desc_count;
+ u64 max_ws = get_unaligned_be64(&buffer[36]);
- sdkp->max_ws_blocks = (u32)get_unaligned_be64(&buffer[36]);
+ sdkp->max_ws_blocks = (u32)max_ws;
if (!sdkp->lbpme)
goto out;
next prev parent reply other threads:[~2015-12-15 18:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 12:01 kernel BUG at block/bio.c:1787! while initializing scsi_debug on ppc64 host Eryu Guan
2015-12-15 11:20 ` Eryu Guan
2015-12-15 12:06 ` Ming Lei
2015-12-15 13:06 ` Eryu Guan
2015-12-15 13:27 ` Ming Lei
2015-12-15 16:56 ` Eryu Guan
2015-12-16 1:15 ` Ming Lei
2015-12-16 1:39 ` Martin K. Petersen
2015-12-15 15:38 ` Ming Lei
2015-12-15 17:16 ` Eryu Guan
2015-12-15 18:29 ` Martin K. Petersen [this message]
2015-12-16 1:17 ` Ming Lei
2015-12-16 1:37 ` Martin K. Petersen
2015-12-16 7:25 ` Eryu Guan
2015-12-15 15:38 ` Martin K. Petersen
2016-01-05 11:57 ` Eryu Guan
2016-01-05 23:58 ` Martin K. Petersen
2016-01-06 3:33 ` Eryu Guan
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=yq1egenwons.fsf@sermon.lab.mkp.net \
--to=martin.petersen@oracle.com \
--cc=guaneryu@gmail.com \
--cc=linux-scsi@vger.kernel.org \
--cc=tom.leiming@gmail.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 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.