From: Tejun Heo <tj@kernel.org>
To: Yuasa Yoichi <yuasa@linux-mips.org>
Cc: Jeff Garzik <jgarzik@pobox.com>, linux-ide@vger.kernel.org
Subject: Re: [PATCH] sata_sil: fix uninitialized variable use when sil_scr_read() fails
Date: Mon, 26 Oct 2009 16:12:43 +0100 [thread overview]
Message-ID: <4AE5BC6B.7060804@kernel.org> (raw)
In-Reply-To: <21eaeb5a0910211717w5692ce4em74482c7e5d4f5b9c@mail.gmail.com>
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.
Thanks.
--
tejun
next prev parent reply other threads:[~2009-10-26 15:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 6:34 [PATCH] sata_sil: fix uninitialized variable use when sil_scr_read() fails Yoichi Yuasa
2009-10-21 5:00 ` Tejun Heo
2009-10-22 0:17 ` Yuasa Yoichi
2009-10-26 15:12 ` Tejun Heo [this message]
2009-10-27 1:37 ` Yoichi Yuasa
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=4AE5BC6B.7060804@kernel.org \
--to=tj@kernel.org \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=yuasa@linux-mips.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;
as well as URLs for NNTP newsgroup(s).