No description
Find a file
Yuan Can d4317d41f0 NTB: amd: Fix error handling in amd_ntb_pci_driver_init()
[ Upstream commit 98af0a33c1 ]

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: a1b3695820 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-23 13:49:23 +02:00
arch sh: hd64461: Handle virq offset for offchip IRQ base and HD64461 IRQ 2023-07-19 16:22:18 +02:00
block blk-crypto: use dynamic lock class for blk_crypto_profile::lock 2023-07-23 13:49:21 +02:00
certs certs: Fix build error when PKCS#11 URI contains semicolon 2023-02-09 11:28:11 +01:00
crypto crypto: jitter - correct health test during initialization 2023-07-19 16:21:42 +02:00
Documentation fs: Lock moved directories 2023-07-19 16:22:12 +02:00
drivers NTB: amd: Fix error handling in amd_ntb_pci_driver_init() 2023-07-23 13:49:23 +02:00
fs ksmbd: fix out of bounds read in smb2_sess_setup 2023-07-23 13:49:19 +02:00
include blk-crypto: use dynamic lock class for blk_crypto_profile::lock 2023-07-23 13:49:21 +02:00
init gcc: disable '-Warray-bounds' for gcc-13 too 2023-04-26 14:28:43 +02:00
io_uring io_uring: Use io_schedule* in cqring wait 2023-07-19 16:22:18 +02:00
ipc ipc: fix memory leak in init_mqueue_fs() 2022-12-31 13:32:01 +01:00
kernel bpf: Fix max stack depth check for async callbacks 2023-07-23 13:49:22 +02:00
lib lib/bitmap: drop optimization of bitmap_{from,to}_arr64 2023-07-19 16:21:58 +02:00
LICENSES
mm mm/mmap: Fix extra maple tree write 2023-07-19 16:22:16 +02:00
net udp6: fix udp6_ehashfn() typo 2023-07-23 13:49:23 +02:00
rust rust: kernel: Mark rust_fmt_argument as extern "C" 2023-04-26 14:28:38 +02:00
samples samples/bpf: xdp1 and xdp2 reduce XDPBUFSIZE to 60 2023-07-19 16:21:07 +02:00
scripts kbuild: Disable GCOV for *.mod.o 2023-07-19 16:21:44 +02:00
security integrity: Fix possible multiple allocation in integrity_inode_get() 2023-07-19 16:22:11 +02:00
sound ASoC: mediatek: mt8173: Fix snd_soc_component_initialize error path 2023-07-19 16:22:14 +02:00
tools wireguard: netlink: send staged packets when setting initial private key 2023-07-19 16:22:17 +02:00
usr usr/gen_init_cpio.c: remove unnecessary -1 values from int file 2022-10-03 14:21:44 -07:00
virt KVM: Avoid illegal stage2 mapping on invalid memory slot 2023-06-28 11:12:23 +02:00
.clang-format inet: ping: use hlist_nulls rcu iterator during lookup 2022-12-01 12:42:46 +01:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore Kbuild: add Rust support 2022-09-28 09:02:20 +02:00
.mailmap 9 hotfixes. 6 for MM, 3 for other areas. Four of these patches address 2022-12-10 17:10:52 -08:00
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: Remove Michal Marek from Kbuild maintainers 2022-11-16 14:53:00 +09:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig
MAINTAINERS smb: move client and server files to common directory fs/smb 2023-06-28 11:12:40 +02:00
Makefile Linux 6.1.39 2023-07-19 16:22:18 +02:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.