]> git.baikalelectronics.ru Git - kernel.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)
committerNeilBrown <neilb@suse.de>
Tue, 19 Aug 2014 07:20:27 +0000 (17:20 +1000)
commitc099b9239fd6ee4aa7fcc4d32081d35023956bd7
tree70f9d9eeecb0cb9eb4fa69b2d161a2ab72c7e5e4
parentbb1129d8631698778a7e104afe073fdb27de3064
md/raid10: fix memory leak when reshaping a RAID10.

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: 91782917b7a538fd042d0e217cc2a4ceec1216bc
Cc: stable@vger.kernel.org (v3.10+)
Reported-by: mdraid.pkoch@dfgh.net (Peter Koch)
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid10.c