]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
md/raid10: fix memory leak when reshaping a RAID10.
authorNeilBrown <neilb@suse.de>
Mon, 18 Aug 2014 03:56:38 +0000 (13:56 +1000)
committerJiri Slaby <jslaby@suse.cz>
Wed, 17 Sep 2014 15:06:51 +0000 (17:06 +0200)
commit9fdaa2cdfcc03ae10c27863d601dccaac184403a
tree6c0e8a5a4b15a5a23fa8d0e251ade183da9d002e
parentedb42d7292c2fe60a01163e15193e1657bdd2a10
md/raid10: fix memory leak when reshaping a RAID10.

commit ce0b0a46955d1bb389684a2605dbcaa990ba0154 upstream.

raid10 reshape clears unwanted bits from a bio->bi_flags using
a method which, while clumsy, worked until 3.10 when BIO_OWNS_VEC
was added.
Since then it clears that bit but shouldn't.  This results in a
memory leak.

So change to used the approved method of clearing unwanted bits.

As this causes a memory leak which can consume all of memory
the fix is suitable for -stable.

Fixes: a38352e0ac02dbbd4fa464dc22d1352b5fbd06fd
Reported-by: mdraid.pkoch@dfgh.net (Peter Koch)
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/md/raid10.c