Free path selector if the arguments are invalid. This command (note that it is invalid) causes reference leak on module "dm_round_robin" and prevents the module from being removed. echo 0 `blockdev --getsize /dev/mapper/loop-mp` multipath 0 0 1 1 round-robin /dev/mapper/mp-linear-1 |dmsetup create multi Signed-off-by: Mikulas Patocka --- drivers/md/dm-mpath.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: linux-2.6.25.3/drivers/md/dm-mpath.c =================================================================== --- linux-2.6.25.3.orig/drivers/md/dm-mpath.c 2008-05-14 01:26:26.000000000 +0200 +++ linux-2.6.25.3/drivers/md/dm-mpath.c 2008-05-14 01:35:50.000000000 +0200 @@ -531,8 +531,10 @@ static int parse_path_selector(struct ar } r = read_param(_params, shift(as), &ps_argc, &ti->error); - if (r) + if (r) { + dm_put_path_selector(pst); return -EINVAL; + } r = pst->create(&pg->ps, ps_argc, as->argv); if (r) {