[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130607231055.GA23081@kroah.com>
Date: Fri, 7 Jun 2013 16:10:55 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Kees Cook <keescook@...omium.org>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Jens Axboe <axboe@...nel.dk>,
"David S. Miller" <davem@...emloft.net>,
Herbert Xu <herbert@...dor.hengli.com.au>,
David Woodhouse <dwmw2@...radead.org>,
Anton Vorontsov <cbou@...l.ru>,
Karsten Keil <isdn@...ux-pingi.de>
Subject: Re: [PATCH 5/8] device: avoid format string in dev_set_name
On Thu, Jun 06, 2013 at 01:52:22PM -0700, Kees Cook wrote:
> --- a/mm/backing-dev.c
> +++ b/mm/backing-dev.c
> @@ -515,7 +515,6 @@ EXPORT_SYMBOL(bdi_destroy);
> int bdi_setup_and_register(struct backing_dev_info *bdi, char *name,
> unsigned int cap)
> {
> - char tmp[32];
> int err;
>
> bdi->name = name;
> @@ -524,8 +523,8 @@ int bdi_setup_and_register(struct backing_dev_info *bdi, char *name,
> if (err)
> return err;
>
> - sprintf(tmp, "%.28s%s", name, "-%d");
> - err = bdi_register(bdi, NULL, tmp, atomic_long_inc_return(&bdi_seq));
> + err = bdi_register(bdi, NULL, "%.28s-%d", name,
> + atomic_long_inc_return(&bdi_seq));
> if (err) {
> bdi_destroy(bdi);
> return err;
This chunk causes the following build warning to now show up:
mm/backing-dev.c: In function ‘bdi_setup_and_register’:
mm/backing-dev.c:527:7: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long int’ [-Wformat]
Care to fix it up and resend it?
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists