summaryrefslogtreecommitdiff
path: root/Documentation/trace/boottime-trace.rst
diff options
context:
space:
mode:
authorYuan Can <yuancan@huawei.com>2022-11-05 09:43:09 +0000
committerJon Mason <jdmason@kudzu.us>2023-07-08 10:51:55 -0400
commit98af0a33c1101c29b3ce4f0cf4715fd927c717f9 (patch)
tree116b8fbd37c4a78e2fa39ed48a7c529f9dcb1df8 /Documentation/trace/boottime-trace.rst
parentc012968259b451dc4db407f2310fe131eaefd800 (diff)
downloadlwn-98af0a33c1101c29b3ce4f0cf4715fd927c717f9.tar.gz
lwn-98af0a33c1101c29b3ce4f0cf4715fd927c717f9.zip
NTB: amd: Fix error handling in amd_ntb_pci_driver_init()
A problem about ntb_hw_amd create debugfs failed is triggered with the following log given: [ 618.431232] AMD(R) PCI-E Non-Transparent Bridge Driver 1.0 [ 618.433284] debugfs: Directory 'ntb_hw_amd' with parent '/' already present! The reason is that amd_ntb_pci_driver_init() returns pci_register_driver() directly without checking its return value, if pci_register_driver() failed, it returns without destroy the newly created debugfs, resulting the debugfs of ntb_hw_amd can never be created later. amd_ntb_pci_driver_init() debugfs_create_dir() # create debugfs directory pci_register_driver() driver_register() bus_add_driver() priv = kzalloc(...) # OOM happened # return without destroy debugfs directory Fix by removing debugfs when pci_register_driver() returns error. Fixes: a1b3695820aa ("NTB: Add support for AMD PCI-Express Non-Transparent Bridge") Signed-off-by: Yuan Can <yuancan@huawei.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'Documentation/trace/boottime-trace.rst')
0 files changed, 0 insertions, 0 deletions