+4
−3
Loading
stable inclusion from stable-v5.10.208 commit c29da60e1f6b25ed4ab4d57db77c44afc9a9f4e7 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9T22K Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c29da60e1f6b25ed4ab4d57db77c44afc9a9f4e7 -------------------------------- commit e7794c14fd73e5eb4a3e0ecaa5334d5a17377c50 upstream. When RPMB was converted to a character device, it added support for multiple RPMB partitions (Commit 97548575 ("mmc: block: Convert RPMB to a character device"). One of the changes in this commit was transforming the variable target_part defined in __mmc_blk_ioctl_cmd into a bitmask. This inadvertently regressed the validation check done in mmc_blk_part_switch_pre() and mmc_blk_part_switch_post(), so let's fix it. Fixes: 97548575 ("mmc: block: Convert RPMB to a character device") Signed-off-by:Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20231201153143.1449753-1-jorge@foundries.io Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
sanglipeng1 <sanglipeng1@jd.com>