ata-disk.c:ad_init(): max_iosize might be uninitialized?
Mikolaj Golub
to.my.trociny at gmail.com
Mon Jul 12 20:33:40 UTC 2010
On Mon, 12 Jul 2010 23:05:53 +0300 Alexander Motin wrote:
AM> Hi.
AM> Mikolaj Golub wrote:
>> 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?
AM> It is not very obvious, but it is initialized in ata_add_child().
Ah, I see. Thank you :-). But then "else atadev->max_iosize = DEV_BSIZE;" part
in ad_init() looks like unnecessary and rather confusing (it suggests that
max_iosize is initialized by this funtion.
--
Mikolaj Golub
More information about the freebsd-fs
mailing list