public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>, Tejun Heo <tj@kernel.org>,
	namhyung@gmail.com, agk@redhat.com, dm-devel@redhat.com,
	neilb@suse.de, LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [BUG REPORT] Kernel panic on 3.9.0-rc7-4-gbb33db7
Date: Thu, 18 Apr 2013 06:35:46 -0700	[thread overview]
Message-ID: <20130418133546.GX4816@kernel.dk> (raw)
In-Reply-To: <516FED09.1040008@cn.fujitsu.com>

On Thu, Apr 18 2013, Wanlong Gao wrote:
> > A bio is always fully initialized, regardless of which internal
> > allocator it came from. If people are doing private kmallocs, then they
> > better be using bio_init() as well.
> > 
> > Wanlong, would it be possible to get a full dmesg on boot see I can see
> > what drivers and file systems are in use? Anything special about your
> > setup.
> 
> Sure, attached.

Does the below help?


diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 9e5b8c2..f9a51a6 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -780,15 +780,23 @@ static void blk_add_trace_bio_bounce(void *ignore,
 	blk_add_trace_bio(q, bio, BLK_TA_BOUNCE, 0);
 }
 
+static struct request_queue *blk_trace_get_queue(struct block_device *bdev)
+{
+	if (bdev->bd_disk == NULL)
+		return NULL;
+
+	return bdev_get_queue(bdev);
+}
+
 static void blk_add_trace_bio_complete(void *ignore, struct bio *bio, int error)
 {
 	struct request_queue *q;
 	struct blk_trace *bt;
 
-	if (!bio->bi_bdev)
+	q = blk_trace_get_queue(bio->bi_bdev);
+	if (!q)
 		return;
 
-	q = bdev_get_queue(bio->bi_bdev);
 	bt = q->blk_trace;
 
 	/*
@@ -1641,14 +1649,6 @@ static ssize_t blk_trace_mask2str(char *buf, int mask)
 	return p - buf;
 }
 
-static struct request_queue *blk_trace_get_queue(struct block_device *bdev)
-{
-	if (bdev->bd_disk == NULL)
-		return NULL;
-
-	return bdev_get_queue(bdev);
-}
-
 static ssize_t sysfs_blk_trace_attr_show(struct device *dev,
 					 struct device_attribute *attr,
 					 char *buf)

-- 
Jens Axboe


  reply	other threads:[~2013-04-18 13:36 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17  8:36 [BUG REPORT] Kernel panic on 3.9.0-rc7-4-gbb33db7 Wanlong Gao
2013-04-17 14:46 ` Steven Rostedt
2013-04-18 12:37   ` Jens Axboe
2013-04-18 12:54     ` Wanlong Gao
2013-04-18 13:35       ` Jens Axboe [this message]
2013-04-18 14:14         ` Wanlong Gao
2013-04-18 14:30           ` Jens Axboe
2013-04-18 14:45             ` Wanlong Gao
2013-04-18 17:52               ` Tejun Heo
2013-04-19  4:06                 ` Wanlong Gao
2013-04-18 16:08             ` Linus Torvalds
2013-04-18 17:27               ` Tejun Heo
2013-04-18 17:39                 ` Jens Axboe
2013-04-18 18:07                   ` Tejun Heo
2013-04-18 18:13                     ` Jens Axboe
2013-04-18 19:10                       ` Linus Torvalds
2013-04-18 20:37                         ` Jens Axboe
2013-04-19  1:08                           ` srostedt@gmail.com
2013-04-19  6:10                         ` Wanlong Gao
2013-04-19  3:33             ` Wanlong Gao
2013-04-19  5:57               ` Tejun Heo
2013-04-19  6:17                 ` Tejun Heo
2013-04-19  6:30                   ` Wanlong Gao
2013-04-19 13:31                   ` Jens Axboe
2013-04-19  8:24                 ` Jan Schmidt
2013-04-19 12:15                 ` Chris Mason
2013-04-19 13:32                 ` Jens Axboe
2013-04-19 13:52                   ` Chris Mason

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=20130418133546.GX4816@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=gaowanlong@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@gmail.com \
    --cc=neilb@suse.de \
    --cc=rostedt@goodmis.org \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox