Commit dd7a9e67 authored by Liang He's avatar Liang He Committed by sanglipeng
Browse files

block: sunvdc: add check for mdesc_grab() returning NULL

stable inclusion
from stable-v5.10.176
commit 2f28cb5c2a510185fec4a52e9ca20d78ce72f57d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8CHVQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2f28cb5c2a510185fec4a52e9ca20d78ce72f57d



--------------------------------

[ Upstream commit 60303631 ]

In vdc_port_probe(), we should check the return value of mdesc_grab() as
it may return NULL, which can cause potential NPD bug.

Fixes: 43fdf274 ("[SPARC64]: Abstract out mdesc accesses for better MD update handling.")
Signed-off-by: default avatarLiang He <windhl@126.com>
Link: https://lore.kernel.org/r/20230315062032.1741692-1-windhl@126.com


[axboe: style cleanup]
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 4a274f7e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment