From: Kees Cook Date: Wed, 11 Sep 2013 04:41:34 +0000 (-0700) Subject: bcache: defensively handle format strings X-Git-Tag: accepted/tizen/common/20141203.182822~868^2~8^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c86949486d41d9e7d7681fc72923555114fd702f;p=platform%2Fkernel%2Flinux-arm64.git bcache: defensively handle format strings Just to be safe, call the error reporting function with "%s" to avoid any possible future format string leak. Signed-off-by: Kees Cook Signed-off-by: Kent Overstreet --- diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 70708ab..dec15cd 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1670,7 +1670,7 @@ static void run_cache_set(struct cache_set *c) err: closure_sync(&cl); /* XXX: test this, it's broken */ - bch_cache_set_error(c, err); + bch_cache_set_error(c, "%s", err); } static bool can_attach_cache(struct cache *ca, struct cache_set *c)