diff options
author | Haoxiang Li <haoxiang_li2024@163.com> | 2025-02-27 10:34:09 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2025-03-06 08:36:19 +0300 |
commit | b2ef51c74b0171fde7eb69b6152d3d2f743ef269 (patch) | |
tree | 546885f206051f8148f57c3b23dfc24c0676bbd5 /scripts/extract-fwblobs | |
parent | 88f5a9a945bf25df1f90032baf95457370c2206e (diff) | |
download | linux-b2ef51c74b0171fde7eb69b6152d3d2f743ef269.tar.xz |
rapidio: fix an API misues when rio_add_net() fails
rio_add_net() calls device_register() and fails when device_register()
fails. Thus, put_device() should be used rather than kfree(). Add
"mport->net = NULL;" to avoid a use after free issue.
Link: https://lkml.kernel.org/r/20250227073409.3696854-1-haoxiang_li2024@163.com
Fixes: e8de370188d0 ("rapidio: add mport char device driver")
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Alexandre Bounine <alex.bou9@gmail.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Yang Yingliang <yangyingliang@huawei.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'scripts/extract-fwblobs')
0 files changed, 0 insertions, 0 deletions