Date: Mon, 12 Jul 2010 22:42:11 +0300 From: Mikolaj Golub <to.my.trociny@gmail.com> To: freebsd-fs@freebsd.org Subject: ata-disk.c:ad_init(): max_iosize might be uninitialized? Message-ID: <86tyo4bi7g.fsf@kopusha.home.net>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
It might be a wrong list but I have not found freebsd-ata@ or freebsd-disk@
list -).
I just have looked accidentally at ad_init() in dev/ata/ata-disk.c and it
looks like there is at least theoretical possibility that atadev->max_iosize
remains uninitialized (if ata_controlcmd(ATA_SET_MULTI) fails). Shouldn't be
like in the patch below?
--
Mikolaj Golub
[-- Attachment #2 --]
Index: sys/dev/ata/ata-disk.c
===================================================================
--- sys/dev/ata/ata-disk.c (revision 209954)
+++ sys/dev/ata/ata-disk.c (working copy)
@@ -406,6 +406,8 @@ ad_init(device_t dev)
if (!ata_controlcmd(dev, ATA_SET_MULTI, 0, 0, secsperint))
atadev->max_iosize = secsperint * DEV_BSIZE;
+ else
+ atadev->max_iosize = DEV_BSIZE;
}
else
atadev->max_iosize = DEV_BSIZE;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86tyo4bi7g.fsf>
