]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: block: Fix use-after-free issue for rpmb
authorPeng Hao <richard.peng@oppo.com>
Fri, 22 May 2020 09:29:25 +0000 (09:29 +0000)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 25 May 2020 08:45:17 +0000 (10:45 +0200)
commit17b6fdb3c535a93a3ae766c057d8722215b229f8
tree1015cdcac9853fb6d34e28a0f4f660f80716ca54
parent3438286be63c01cadf84749a1933e75117617f93
mmc: block: Fix use-after-free issue for rpmb

The data structure member “rpmb->md” was passed to a call of the function
“mmc_blk_put” after a call of the function “put_device”. Reorder these
function calls to keep the data accesses consistent.

Fixes: ce8ff4a74f4a ("mmc: block: Fix bug when removing RPMB chardev ")
Signed-off-by: Peng Hao <richard.peng@oppo.com>
Cc: stable@vger.kernel.org
[Uffe: Fixed up mangled patch and updated commit message]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/block.c