diff options
| author | NeilBrown <neilb@suse.de> | 2014-08-18 13:59:50 +1000 |
|---|---|---|
| committer | Jiri Slaby <jslaby@suse.cz> | 2014-09-17 17:06:51 +0200 |
| commit | 326d57f8a0437e8d1296e6e76f1ee81728b0afda (patch) | |
| tree | d4f2c4f6676db33cff77fe7a4ce05f25a74b80b7 | |
| parent | 9fdaa2cdfcc03ae10c27863d601dccaac184403a (diff) | |
md/raid10: Fix memory leak when raid10 reshape completes.
commit b39685526f46976bcd13aa08c82480092befa46c upstream.
When a raid10 commences a resync/recovery/reshape it allocates
some buffer space.
When a resync/recovery completes the buffer space is freed. But not
when the reshape completes.
This can result in a small memory leak.
There is a subtle side-effect of this bug. When a RAID10 is reshaped
to a larger array (more devices), the reshape is immediately followed
by a "resync" of the new space. This "resync" will use the buffer
space which was allocated for "reshape". This can cause problems
including a "BUG" in the SCSI layer. So this is suitable for -stable.
Fixes: 3ea7daa5d7fde47cd41f4d56c2deb949114da9d6
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
| -rw-r--r-- | drivers/md/raid10.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index d1cf7734e55e..9ccb107c982e 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -2969,6 +2969,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, */ if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { end_reshape(conf); + close_sync(conf); return 0; } |
