diff options
| author | Haoxiang Li <[email protected]> | 2025-02-27 07:34:09 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-03-06 05:36:19 +0000 |
| commit | b2ef51c74b0171fde7eb69b6152d3d2f743ef269 (patch) | |
| tree | 546885f206051f8148f57c3b23dfc24c0676bbd5 /tools/testing/selftests/kvm/x86/nested_exceptions_test.c | |
| parent | MAINTAINERS: .mailmap: update Sumit Garg's email address (diff) | |
| download | kernel-b2ef51c74b0171fde7eb69b6152d3d2f743ef269.tar.gz kernel-b2ef51c74b0171fde7eb69b6152d3d2f743ef269.zip | |
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/[email protected]
Fixes: e8de370188d0 ("rapidio: add mport char device driver")
Signed-off-by: Haoxiang Li <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Cc: Alexandre Bounine <[email protected]>
Cc: Matt Porter <[email protected]>
Cc: Yang Yingliang <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/testing/selftests/kvm/x86/nested_exceptions_test.c')
0 files changed, 0 insertions, 0 deletions
