summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_files.py
diff options
context:
space:
mode:
authorMa Ke <make24@iscas.ac.cn>2025-07-19 15:58:56 +0800
committerJens Axboe <axboe@kernel.dk>2025-07-22 10:02:17 -0600
commit63ce53724637e2e7ba51fe3a4f78351715049905 (patch)
tree65ad54e46b30d6120a9d562b2329d7cc67dc0bc9 /scripts/lib/kdoc/kdoc_files.py
parentc20413b799255a53e300f052b6b6c54d8fa58a7a (diff)
sunvdc: Balance device refcount in vdc_port_mpgroup_check
Using device_find_child() to locate a probed virtual-device-port node causes a device refcount imbalance, as device_find_child() internally calls get_device() to increment the device’s reference count before returning its pointer. vdc_port_mpgroup_check() directly returns true upon finding a matching device without releasing the reference via put_device(). We should call put_device() to decrement refcount. As comment of device_find_child() says, 'NOTE: you will need to drop the reference with put_device() after use'. Found by code review. Cc: stable@vger.kernel.org Fixes: 3ee70591d6c4 ("sunvdc: prevent sunvdc panic when mpgroup disk added to guest domain") Signed-off-by: Ma Ke <make24@iscas.ac.cn> Link: https://lore.kernel.org/r/20250719075856.3447953-1-make24@iscas.ac.cn Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions