From: Yoichi Yuasa <yuasa@linux-mips.org>
To: Tejun Heo <tj@kernel.org>
Cc: yuasa@linux-mips.org, 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: Tue, 27 Oct 2009 10:37:49 +0900 [thread overview]
Message-ID: <20091027103749.871199e8.yuasa@linux-mips.org> (raw)
In-Reply-To: <4AE5BC6B.7060804@kernel.org>
On Mon, 26 Oct 2009 16:12:43 +0100
Tejun Heo <tj@kernel.org> 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
prev parent reply other threads:[~2009-10-27 1:37 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
2009-10-27 1:37 ` Yoichi Yuasa [this message]
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=20091027103749.871199e8.yuasa@linux-mips.org \
--to=yuasa@linux-mips.org \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=tj@kernel.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).