From: Matthias Ferdinand <bcache@mfedv.net>
To: Kent Overstreet <kmo@daterainc.com>
Cc: nks@daterainc.com, linux-bcache@vger.kernel.org
Subject: Re: md-raid5 with bcache member devices => kernel panic
Date: Mon, 9 Dec 2013 00:53:06 +0100 [thread overview]
Message-ID: <20131208235306.GJ1848@teapot> (raw)
In-Reply-To: <20131205225234.GA4054@kmo>
On Thu, Dec 05, 2013 at 02:52:34PM -0800, Kent Overstreet wrote:
> that's a null pointer deref; if Matthias could get the exact line number it
> happened on we could tell what variable was null. I _think_ it's *sg because
> it's running off the end of the scatterlist; if that's the case (and you should
> verify that that is what's happening, then what's going on is bcache is sending
> down a bio larger than what the device expects.
found the kernel config value CONFIG_DEBUG_BUGVERBOSE, tried again with
3.12.3 and 3.13-rc3. The backtrace now spells the line number:
kernel BUG at drivers/scsi/scsi_lib.c:1048!
1028 static int scsi_init_sgtable(struct request *req, struct scsi_data_buffer *sdb,
1029 gfp_t gfp_mask)
1030 {
1031 int count;
1032
1033 /*
1034 * If sg table allocation fails, requeue request later.
1035 */
1036 if (unlikely(scsi_alloc_sgtable(sdb, req->nr_phys_segments,
1037 gfp_mask))) {
1038 return BLKPREP_DEFER;
1039 }
1040
1041 req->buffer = NULL;
1042
1043 /*
1044 * Next, walk the list, and fill in the addresses and sizes of
1045 * each segment.
1046 */
1047 count = blk_rq_map_sg(req->q, req, sdb->table.sgl);
1048 BUG_ON(count > sdb->table.nents);
1049 sdb->table.nents = count;
1050 sdb->length = blk_rq_bytes(req);
1051 return BLKPREP_OK;
1052 }
Regards
Matthias
prev parent reply other threads:[~2013-12-08 23:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-05 21:29 md-raid5 with bcache member devices => kernel panic Matthias Ferdinand
2013-12-05 22:52 ` Kent Overstreet
2013-12-05 23:08 ` Matthias Ferdinand
2013-12-05 23:15 ` Kent Overstreet
2013-12-06 0:00 ` Matthias Ferdinand
2013-12-06 3:22 ` Paul B. Henson
2013-12-08 23:53 ` Matthias Ferdinand [this message]
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=20131208235306.GJ1848@teapot \
--to=bcache@mfedv.net \
--cc=kmo@daterainc.com \
--cc=linux-bcache@vger.kernel.org \
--cc=nks@daterainc.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.