Go to file
Ivan Vecera 2e5dd07d9d rtnetlink: Fix handling of disabled L3 stats in RTM_GETSTATS replies
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2140149

commit 23cfe941b52e2fa645bdfd770087128a74c7dbee
Author: Petr Machata <petrm@nvidia.com>
Date:   Tue Apr 12 22:25:06 2022 +0200

    rtnetlink: Fix handling of disabled L3 stats in RTM_GETSTATS replies

    When L3 stats are disabled, rtnl_offload_xstats_get_size_stats() returns
    size of 0, which is supposed to be an indication that the corresponding
    attribute should not be emitted. However, instead, the current code
    reserves a 0-byte attribute.

    The reason this does not show up as a citation on a kasan kernel is that
    netdev_offload_xstats_get(), which is supposed to fill in the data, never
    ends up getting called, because rtnl_offload_xstats_get_stats() notices
    that the stats are not actually used and skips the call.

    Thus a zero-length IFLA_OFFLOAD_XSTATS_L3_STATS attribute ends up in a
    response, confusing the userspace.

    Fix by skipping the L3-stats related block in rtnl_offload_xstats_fill().

    Fixes: 0e7788fd7622 ("net: rtnetlink: Add UAPI for obtaining L3 offload xstats")
    Signed-off-by: Petr Machata <petrm@nvidia.com>
    Reviewed-by: Ido Schimmel <idosch@nvidia.com>
    Link: https://lore.kernel.org/r/591b58e7623edc3eb66dd1fcfa8c8f133d090974.1649794741.git.petrm@nvidia.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2022-11-04 17:16:05 +01:00
Documentation Merge: perf/arm-cmn: cmn updates, cmn650/700 support 2022-11-03 13:30:05 -04:00
LICENSES LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes" 2021-07-15 06:31:24 -06:00
arch Merge: Update ACPI to match Linux v6.0 2022-11-03 13:13:02 -04:00
block Merge: block: update with v6.1-rc2 2022-11-03 13:30:02 -04:00
certs certs: Move load_certificate_list() to be with the asymmetric keys code 2022-06-23 11:32:02 +01:00
crypto fs: get rid of the res2 iocb->ki_complete argument 2022-10-27 12:59:04 -04:00
drivers Merge: perf/arm-cmn: cmn updates, cmn650/700 support 2022-11-03 13:30:05 -04:00
fs Merge: block: update with v6.1-rc2 2022-11-03 13:30:02 -04:00
include net: rtnetlink: Add UAPI toggle for IFLA_OFFLOAD_XSTATS_L3_STATS 2022-11-04 17:15:58 +01:00
init Merge: KVM: x86: Rebase to upstream 6.0 2022-10-27 08:25:59 -04:00
ipc mm,hugetlb: remove mlock ulimit for SHM_HUGETLB 2022-10-12 07:27:31 -04:00
kernel Merge: block: update with v6.1-rc2 2022-11-03 13:30:02 -04:00
lib Merge: block: update with v6.1-rc2 2022-11-03 13:30:02 -04:00
mm Merge: memcg: Add memory.reclaim support 2022-11-03 13:30:04 -04:00
net rtnetlink: Fix handling of disabled L3 stats in RTM_GETSTATS replies 2022-11-04 17:16:05 +01:00
redhat [redhat] kernel-5.14.0-186.el9 2022-11-03 13:39:41 -04:00
samples Merge: VFIO 9.2 backports 2022-10-21 09:47:28 -04:00
scripts Merge: KVM: x86: Rebase to upstream 6.0 2022-10-27 08:25:59 -04:00
security net: rtnetlink: Add RTM_SETSTATS 2022-11-04 17:15:41 +01:00
sound Merge: Update kernel's PCI subsystem to v6.0 2022-11-02 03:26:51 -04:00
tools selftests: forwarding: hw_stats_l3: Add a new test 2022-11-04 17:16:05 +01:00
usr .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
virt KVM: Drop unnecessary initialization of "ops" in kvm_ioctl_create_device() 2022-10-25 13:53:38 +02:00
.clang-format clang-format: Update with the latest for_each macro list 2021-05-12 23:32:39 +02:00
.cocciconfig
.get_maintainer.conf get_maintainer.conf: Update with new location of RHMAINTAINERS 2022-01-19 14:26:16 -05:00
.get_maintainer.ignore
.gitattributes gitattributes: Remove unnecesary export restrictions 2021-08-30 10:50:35 -04:00
.gitignore gitlab: Add CI job for packaging scripts 2021-08-30 10:49:13 -04:00
.gitlab-ci.yml CI: Add automotive-check for rt branches 2022-09-22 17:14:55 +02:00
.mailmap mailmap: remove my redhat.com address from RHEL9's .mailmap file 2022-09-26 09:34:38 -04:00
COPYING
CREDITS MAINTAINERS: move Murali Karicheri to credits 2021-04-29 15:47:30 -07:00
Kbuild
Kconfig Introduce CONFIG_RH_DISABLE_DEPRECATED 2021-08-30 10:50:55 -04:00
Kconfig.redhat Rename RH_DISABLE_DEPRECATED to RHEL_DIFFERENCES 2021-08-30 14:29:36 -04:00
MAINTAINERS Merge: Update kernel's PCI subsystem to v6.0 2022-11-02 03:26:51 -04:00
Makefile kbuild: expose explicit .symversions targets 2022-08-10 17:01:39 +02:00
Makefile.rhelver [redhat] kernel-5.14.0-186.el9 2022-11-03 13:39:41 -04:00
README
makefile redhat: Change Makefile target names to dist- 2021-08-30 10:50:11 -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.