From: Jens Axboe <jaxboe@fusionio.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] block: avoid using uninitialized value in from queue_var_store
Date: Wed, 3 Apr 2013 21:52:26 +0200 [thread overview]
Message-ID: <20130403195226.GC4667@kernel.dk> (raw)
In-Reply-To: <201304031530.52712.arnd@arndb.de>
On Wed, Apr 03 2013, Arnd Bergmann wrote:
> As found by gcc-4.8, the QUEUE_SYSFS_BIT_FNS macro creates functions
> that use a value generated by queue_var_store independent of whether
> that value was set or not.
>
> block/blk-sysfs.c: In function 'queue_store_nonrot':
> block/blk-sysfs.c:244:385: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> Unlike most other such warnings, this one is not a false positive,
> writing any non-number string into the sysfs files indeed has
> an undefined result, rather than returning an error.
Huh indeed, thanks Arnd. Queued up.
--
Jens Axboe
prev parent reply other threads:[~2013-04-03 19:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-03 15:30 [PATCH] block: avoid using uninitialized value in from queue_var_store Arnd Bergmann
2013-04-03 19:52 ` Jens Axboe [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=20130403195226.GC4667@kernel.dk \
--to=jaxboe@fusionio.com \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.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