From: Slava Pestov Date: Sun, 13 Jul 2014 04:53:11 +0000 (-0700) Subject: bcache: fix use-after-free in btree_gc_coalesce() X-Git-Tag: cleanup-for-v3.18~33^2^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=400ffaa2acd72274e2c7293a9724382383bebf3e;p=pandora-kernel.git bcache: fix use-after-free in btree_gc_coalesce() If we goto out_nocoalesce after we free new_nodes[0], we end up freeing new_nodes[0] again. This was generating a lockdep warning. The fix is to set new_nodes[0] to NULL, since the out_nocoalesce path safely ignores NULL entries in the new_nodes array. This regression was introduced in 2d7f9531. Change-Id: I76564d7257800583214376b4bacf236cda90c89c --- Reading git-diff-tree failed