[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090320130839.GM30407@ghostprotocols.net>
Date: Fri, 20 Mar 2009 10:08:39 -0300
From: Arnaldo Carvalho de Melo <acme@...hat.com>
To: Li Zefan <lizf@...fujitsu.com>
Cc: Ingo Molnar <mingo@...e.hu>, Jens Axboe <jens.axboe@...cle.com>,
Steven Rostedt <rostedt@...dmis.org>,
Frederic Weisbecker <fweisbec@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 7/7] blktrace: avoid accessing NULL bdev->bd_disk
Em Fri, Mar 20, 2009 at 09:49:48AM +0800, Li Zefan escreveu:
> bdev->bd_disk can be NULL, if the block device is not opened.
>
> Try this against an unmounted partition, and you'll see NULL dereference:
> # echo 1 > /sys/block/sda/sda5/enable
>
> Signed-off-by: Li Zefan <lizf@...fujitsu.com>
I guess this can be discounted on my block layer newbeeness 8)
But as an extra check in non hot-paths are usually a good thing...
Acked-by: Arnaldo Carvalho de Melo <acme@...hat.com>
- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists