From: Rashika Kheria Date: Sun, 10 Nov 2013 16:43:53 +0000 (+0530) Subject: Staging: zram: Fix memory leak by refcount mismatch X-Git-Tag: v3.2.54~91 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e06c33874253cf44ae5d3484111db7b17bc09b5f;p=pandora-kernel.git Staging: zram: Fix memory leak by refcount mismatch commit 1b672224d128ec2570eb37572ff803cfe452b4f7 upstream. As suggested by Minchan Kim and Jerome Marchand "The code in reset_store get the block device (bdget_disk()) but it does not put it (bdput()) when it's done using it. The usage count is therefore incremented but never decremented." This patch also puts bdput() for all error cases. Acked-by: Minchan Kim Acked-by: Jerome Marchand Signed-off-by: Rashika Kheria Signed-off-by: Greg Kroah-Hartman [bwh: Backported to 3.2: adjust filename, context] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed