Re: [PATCH] sata_sil: fix uninitialized variable use when sil_scr_read() fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 26 Oct 2009 16:12:43 +0100
Tejun Heo <tj@xxxxxxxxxx> wrote:

> Yuasa Yoichi wrote:
> >> The first usage of that is
> >>
> >>  sil_scr_read(&ap->link, SCR_ERROR, &serror);
> >>
> >> which sets the value.  So, I don't think the patch is necessary.  If
> >> it triggers a compile warning, putting uninitialized_var() macro will
> >> be more appropriate.
> > 
> > If sil_scr_read() is error, 'serror' is not initialized.
> > After that, the wrong bits add to 'ap->link.eh_info.serror' when
> > 'serror & SERR_PHYRDT_CHG' is true.
> 
> On the controller, sil_scr_read(SCR_ERROR) can never fail.  If it ever
> fails, the whole thing will break anyway.

OK, I got it.

Thanks,

Yoichi
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux