]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bcache: fix memory corruption in init error path
authorSlava Pestov <sp@daterainc.com>
Thu, 19 Jun 2014 22:05:59 +0000 (15:05 -0700)
committerJiri Slaby <jslaby@suse.cz>
Fri, 31 Oct 2014 11:14:35 +0000 (12:14 +0100)
commit2c30554fdfb22f41d66d6c5f4114147bc60a5fd9
tree10d1a1d66f6ee67ff2aed5b6e7df18318024bf04
parent64521124425139ca5a5420660d2408b4f1c4770a
bcache: fix memory corruption in init error path

commit c9a78332b42cbdcdd386a95192a716b67d1711a4 upstream.

If register_cache_set() failed, we would touch ca->set after
it had already been freed. Also, fix an assertion to catch
this.

Change-Id: I748e5f5b223e2d9b2602075dec2f997cced2394d
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/md/bcache/super.c