Find a file
Jakub Kicinski fda6c89fe3 net: mpls: fix stale pointer if allocation fails during device rename
lianhui reports that when MPLS fails to register the sysctl table
under new location (during device rename) the old pointers won't
get overwritten and may be freed again (double free).

Handle this gracefully. The best option would be unregistering
the MPLS from the device completely on failure, but unfortunately
mpls_ifdown() can fail. So failing fully is also unreliable.

Another option is to register the new table first then only
remove old one if the new one succeeds. That requires more
code, changes order of notifications and two tables may be
visible at the same time.

sysctl point is not used in the rest of the code - set to NULL
on failures and skip unregister if already NULL.

Reported-by: lianhui tang <bluetlh@gmail.com>
Fixes: 0fae3bf018 ("mpls: handle device renames for per-device sysctls")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-02-15 10:26:37 +00:00
arch - Prevent the compiler from reordering accesses to debug regs which could cause 2023-02-05 11:28:42 -08:00
block block-6.2-2023-02-03 2023-02-03 11:35:42 -08:00
certs certs: Fix build error when PKCS#11 URI contains semicolon 2023-01-31 17:53:01 +09:00
crypto This update includes the following changes: 2022-12-14 12:31:09 -08:00
Documentation Networking fixes for 6.2-rc8, including fixes from can and 2023-02-09 09:17:38 -08:00
drivers igb: Fix PPS input and output using 3rd and 4th SDP 2023-02-14 20:44:18 -08:00
fs small fix for use after free 2023-02-09 09:00:26 -08:00
include dccp/tcp: Avoid negative sk_forward_alloc by ipv6_pinfo.pktoptions. 2023-02-10 19:53:42 -08:00
init Kbuild fixes for v6.2 (3rd) 2023-01-21 10:56:37 -08:00
io_uring io_uring: always prep_async for drain requests 2023-01-27 06:29:29 -07:00
ipc
kernel Fix regression in poll() and select() 2023-02-07 07:54:40 -08:00
lib - Lock the proper critical section when dealing with perf event context 2023-02-05 11:03:56 -08:00
LICENSES
mm 25 hotfixes, mainly for MM. 13 are cc:stable. 2023-02-03 10:01:57 -08:00
net net: mpls: fix stale pointer if allocation fails during device rename 2023-02-15 10:26:37 +00:00
rust rust: print: avoid evaluating arguments in pr_* macros in unsafe blocks 2023-01-16 00:54:35 +01:00
samples ftrace: Export ftrace_free_filter() to modules 2023-01-24 11:20:58 -05:00
scripts Kbuild fixes for v6.2 (4th) 2023-02-04 11:30:23 -08:00
security tomoyo: Update website link 2023-01-13 23:11:38 +09:00
sound sound fixes for 6.2-rc7 2023-02-01 10:26:23 -08:00
tools selftests: fib_rule_tests: Test UDP and TCP connections with DSCP rules. 2023-02-09 22:49:04 -08:00
usr
virt VFIO fixes for v6.2-rc6 2023-01-23 11:56:07 -08:00
.clang-format iommufd for 6.2 2022-12-14 09:15:43 -08:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore .gitignore: ignore *.rpm 2022-12-30 17:22:14 +09:00
.mailmap 25 hotfixes, mainly for MM. 13 are cc:stable. 2023-02-03 10:01:57 -08:00
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: update SCTP maintainers 2023-02-02 11:35:33 -08:00
Kbuild
Kconfig
MAINTAINERS USB fixes for 6.2-rc7 2023-02-05 12:19:55 -08:00
Makefile Linux 6.2-rc7 2023-02-05 13:13:28 -08: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.