]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
bcache: defensively handle format strings
authorKees Cook <keescook@chromium.org>
Wed, 11 Sep 2013 04:41:34 +0000 (21:41 -0700)
committerKent Overstreet <kmo@daterainc.com>
Wed, 11 Sep 2013 05:10:07 +0000 (22:10 -0700)
Just to be safe, call the error reporting function with "%s" to avoid
any possible future format string leak.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
drivers/md/bcache/super.c

index 70708ab0b8f9270b1daf6c3677c073487e3995cc..dec15cd2d797eaaa7fa0585abf8867c9f70a4cef 100644 (file)
@@ -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)