No description
Find a file
Dan Carpenter cef09673c3 serial: core: fix -EPROBE_DEFER handling in init
The -EPROBE_DEFER error path in serial_base_device_init() is a bit
awkward.  Before the call to device_initialize(dev) then we need to
manually release all the device resources.  And after the call then we
need to call put_device() to release the resources.  Doing either one
wrong will result in a leak or a use after free.

So let's wait to return -EPROBE_DEFER until after the call to
device_initialize(dev) so that way callers do not have to handle
-EPROBE_DEFER as a special case.  Now callers can just use put_device()
for clean up.

The second issue with the -EPROBE_DEFER path is that deferring is not
supposed to be a fatal error, but instead it's normal part of the
init process and the kernel recovers from it automatically.  That means
we should not print an error message but just a debug message on this
path.

Fixes: 539914240a ("serial: core: Fix probing serial_base_bus devices")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Message-ID: <18318adb-ab2c-4dcc-9f96-498a13d16b80@moroto.mountain>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-15 12:20:51 +02:00
arch powerpc/legacy_serial: Handle SERIAL_8250_FSL=n build failures 2023-06-13 12:27:04 +02:00
block block: fix revalidate performance regression 2023-05-29 08:40:32 -06:00
certs
crypto This push fixes the following problems: 2023-05-07 10:57:14 -07:00
Documentation Char/Misc driver fixes for 6.4-rc5 2023-06-04 08:32:30 -04:00
drivers serial: core: fix -EPROBE_DEFER handling in init 2023-06-15 12:20:51 +02:00
fs Fix an ext4 regression which landed during the 6.4 merge window. 2023-06-02 17:25:22 -04:00
include Merge 6.4-rc5 into tty-next 2023-06-05 07:41:04 +02:00
init
io_uring io_uring: undeprecate epoll_ctl support 2023-05-26 20:22:41 -06:00
ipc
kernel Probes fixes for 6.4-rc4: 2023-06-03 08:23:16 -04:00
lib test_firmware: fix the memory leak of the allocated firmware buffer 2023-05-31 20:31:07 +01:00
LICENSES
mm mm: page_table_check: Ensure user pages are not slab pages 2023-05-29 16:14:28 +01:00
net nfsd-6.4 fixes: 2023-06-02 13:38:55 -04:00
rust
samples samples/bpf: Drop unnecessary fallthrough 2023-05-16 19:44:05 +02:00
scripts Locking changes in v6.4: 2023-05-05 12:56:55 -07:00
security selinux: don't use make's grouped targets feature yet 2023-06-01 13:56:13 -04:00
sound ALSA: hda/realtek: Enable headset onLenovo M70/M90 2023-05-24 14:18:59 +02:00
tools ARM: 2023-06-04 07:16:53 -04:00
usr
virt KVM: Fix vcpu_array[0] races 2023-05-19 13:56:26 -04:00
.clang-format cxl for v6.4 2023-04-30 11:51:51 -07:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap mailmap: add entries for Nikolay Aleksandrov 2023-05-17 09:35:05 +01:00
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: sctp: move Neil to CREDITS 2023-05-12 08:51:32 +01:00
Kbuild
Kconfig
MAINTAINERS Char/Misc driver fixes for 6.4-rc5 2023-06-04 08:32:30 -04:00
Makefile Linux 6.4-rc5 2023-06-04 14:04:27 -04: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.