Performance oriented customized Linux kernel based on the mainline kernel.
Find a file
Fedor Pchelkin 0c0cf3db83 net: macsec: fix double free of percpu stats
Inside macsec_add_dev() we free percpu macsec->secy.tx_sc.stats and
macsec->stats on some of the memory allocation failure paths. However, the
net_device is already registered to that moment: in macsec_newlink(), just
before calling macsec_add_dev(). This means that during unregister process
its priv_destructor - macsec_free_netdev() - will be called and will free
the stats again.

Remove freeing percpu stats inside macsec_add_dev() because
macsec_free_netdev() will correctly free the already allocated ones. The
pointers to unallocated stats stay NULL, and free_percpu() treats that
correctly.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Fixes: 0a28bfd497 ("net/macsec: Add MACsec skb_metadata_dst Tx Data path support")
Fixes: c09440f7dc ("macsec: introduce IEEE 802.1AE driver")
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-06-15 11:41:01 +01:00
arch ARM: 2023-06-04 07:16:53 -04:00
block block: fix revalidate performance regression 2023-05-29 08:40:32 -06:00
certs
crypto KEYS: asymmetric: Copy sig and digest in public_key_verify_signature() 2023-06-02 15:36:23 +02:00
Documentation Networking fixes for 6.4-rc6, including fixes from can, wifi, netfilter, 2023-06-08 09:27:19 -07:00
drivers net: macsec: fix double free of percpu stats 2023-06-15 11:41:01 +01:00
fs xfs: fixes for 6.4-rc5 2023-06-08 08:46:58 -07:00
include net/sched: qdisc_destroy() old ingress and clsact Qdiscs before grafting 2023-06-14 10:31:39 +02:00
init
io_uring io_uring: undeprecate epoll_ctl support 2023-05-26 20:22:41 -06:00
ipc
kernel Networking fixes for 6.4-rc6, including fixes from can, wifi, netfilter, 2023-06-08 09:27:19 -07:00
lib Networking fixes for 6.4-rc6, including fixes from can, wifi, netfilter, 2023-06-08 09:27:19 -07:00
LICENSES
mm mm: page_table_check: Ensure user pages are not slab pages 2023-05-29 16:14:28 +01:00
net net/sched: cls_api: Fix lockup on flushing explicitly created chain 2023-06-14 23:03:16 -07:00
rust
samples
scripts
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 selftests: forwarding: hw_stats_l3: Set addrgenmode in a separate step 2023-06-14 12:40:02 +02:00
usr
virt KVM: Fix vcpu_array[0] races 2023-05-19 13:56:26 -04:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: add reviewers for SMC Sockets 2023-06-15 08:53:16 +01: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.