From ab554a9950d2150514d0a2656a2341fe7eaabaa7 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Fri, 5 Sep 2025 12:22:09 +0000 Subject: [PATCH] Import of kernel-4.18.0-553.63.1.el8_10 --- Kconfig | 6 ++++ Makefile.rhelver | 2 +- configs/kernel-4.18.0-aarch64-debug.config | 1 + configs/kernel-4.18.0-aarch64.config | 1 + configs/kernel-4.18.0-ppc64le-debug.config | 1 + configs/kernel-4.18.0-ppc64le.config | 1 + configs/kernel-4.18.0-s390x-debug.config | 1 + configs/kernel-4.18.0-s390x-zfcpdump.config | 1 + configs/kernel-4.18.0-s390x.config | 1 + configs/kernel-4.18.0-x86_64-debug.config | 1 + configs/kernel-4.18.0-x86_64.config | 1 + drivers/net/usb/ch9200.c | 7 ++-- fs/dlm/lock.c | 38 +++++++++++++++++---- include/linux/rh_kabi.h | 23 +++++++++++++ mm/swapfile.c | 1 + net/ipv4/inet_connection_sock.c | 19 ++++++++--- 16 files changed, 92 insertions(+), 13 deletions(-) diff --git a/Kconfig b/Kconfig index 37afe2ac86..5aa8f2dac3 100644 --- a/Kconfig +++ b/Kconfig @@ -20,4 +20,10 @@ config RH_KABI_SIZE_ALIGN_CHECKS This option enables more stringent kabi checks. Those must be disable in case of a debug-build because they allow to change struct sizes. +config RH_KABI_STABLE_ASM_OFFSETS + bool "Enables asm-offsets.c constant stabilization" + default n + help + This option extends check-kabi to test a subset of asm-offsets.c + constants. diff --git a/Makefile.rhelver b/Makefile.rhelver index 14768af14e..98539901aa 100644 --- a/Makefile.rhelver +++ b/Makefile.rhelver @@ -12,7 +12,7 @@ RHEL_MINOR = 10 # # Use this spot to avoid future merge conflicts. # Do not trim this comment. -RHEL_RELEASE = 553.62.1 +RHEL_RELEASE = 553.63.1 # # ZSTREAM diff --git a/configs/kernel-4.18.0-aarch64-debug.config b/configs/kernel-4.18.0-aarch64-debug.config index ff092b6060..805851a6d3 100644 --- a/configs/kernel-4.18.0-aarch64-debug.config +++ b/configs/kernel-4.18.0-aarch64-debug.config @@ -5991,3 +5991,4 @@ CONFIG_OBJAGG=m # CONFIG_RHEL_DIFFERENCES=y # CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set +# CONFIG_RH_KABI_STABLE_ASM_OFFSETS is not set diff --git a/configs/kernel-4.18.0-aarch64.config b/configs/kernel-4.18.0-aarch64.config index 4e3361799e..cfe4a888fc 100644 --- a/configs/kernel-4.18.0-aarch64.config +++ b/configs/kernel-4.18.0-aarch64.config @@ -5963,3 +5963,4 @@ CONFIG_OBJAGG=m # CONFIG_RHEL_DIFFERENCES=y CONFIG_RH_KABI_SIZE_ALIGN_CHECKS=y +CONFIG_RH_KABI_STABLE_ASM_OFFSETS=y diff --git a/configs/kernel-4.18.0-ppc64le-debug.config b/configs/kernel-4.18.0-ppc64le-debug.config index b8248521e1..7f0efc81ee 100644 --- a/configs/kernel-4.18.0-ppc64le-debug.config +++ b/configs/kernel-4.18.0-ppc64le-debug.config @@ -6398,3 +6398,4 @@ CONFIG_KVM_XIVE=y # CONFIG_RHEL_DIFFERENCES=y # CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set +# CONFIG_RH_KABI_STABLE_ASM_OFFSETS is not set diff --git a/configs/kernel-4.18.0-ppc64le.config b/configs/kernel-4.18.0-ppc64le.config index d042f3de5c..cdbcbbc628 100644 --- a/configs/kernel-4.18.0-ppc64le.config +++ b/configs/kernel-4.18.0-ppc64le.config @@ -6354,3 +6354,4 @@ CONFIG_KVM_XIVE=y # CONFIG_RHEL_DIFFERENCES=y CONFIG_RH_KABI_SIZE_ALIGN_CHECKS=y +CONFIG_RH_KABI_STABLE_ASM_OFFSETS=y diff --git a/configs/kernel-4.18.0-s390x-debug.config b/configs/kernel-4.18.0-s390x-debug.config index 2adfad5868..409207966d 100644 --- a/configs/kernel-4.18.0-s390x-debug.config +++ b/configs/kernel-4.18.0-s390x-debug.config @@ -3564,3 +3564,4 @@ CONFIG_S390_GUEST=y # CONFIG_RHEL_DIFFERENCES=y # CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set +# CONFIG_RH_KABI_STABLE_ASM_OFFSETS is not set diff --git a/configs/kernel-4.18.0-s390x-zfcpdump.config b/configs/kernel-4.18.0-s390x-zfcpdump.config index f2c773f167..3853c2ea3d 100644 --- a/configs/kernel-4.18.0-s390x-zfcpdump.config +++ b/configs/kernel-4.18.0-s390x-zfcpdump.config @@ -1489,3 +1489,4 @@ CONFIG_HAVE_KVM=y # CONFIG_RHEL_DIFFERENCES=y CONFIG_RH_KABI_SIZE_ALIGN_CHECKS=y +# CONFIG_RH_KABI_STABLE_ASM_OFFSETS is not set diff --git a/configs/kernel-4.18.0-s390x.config b/configs/kernel-4.18.0-s390x.config index 87b40bdce3..96dc6a4b1c 100644 --- a/configs/kernel-4.18.0-s390x.config +++ b/configs/kernel-4.18.0-s390x.config @@ -3540,3 +3540,4 @@ CONFIG_S390_GUEST=y # CONFIG_RHEL_DIFFERENCES=y CONFIG_RH_KABI_SIZE_ALIGN_CHECKS=y +CONFIG_RH_KABI_STABLE_ASM_OFFSETS=y diff --git a/configs/kernel-4.18.0-x86_64-debug.config b/configs/kernel-4.18.0-x86_64-debug.config index 0920063e53..01f19e0aef 100644 --- a/configs/kernel-4.18.0-x86_64-debug.config +++ b/configs/kernel-4.18.0-x86_64-debug.config @@ -8280,3 +8280,4 @@ CONFIG_OBJAGG=m # CONFIG_RHEL_DIFFERENCES=y # CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set +# CONFIG_RH_KABI_STABLE_ASM_OFFSETS is not set diff --git a/configs/kernel-4.18.0-x86_64.config b/configs/kernel-4.18.0-x86_64.config index a54947c290..ca488c3b58 100644 --- a/configs/kernel-4.18.0-x86_64.config +++ b/configs/kernel-4.18.0-x86_64.config @@ -8221,3 +8221,4 @@ CONFIG_OBJAGG=m # CONFIG_RHEL_DIFFERENCES=y CONFIG_RH_KABI_SIZE_ALIGN_CHECKS=y +CONFIG_RH_KABI_STABLE_ASM_OFFSETS=y diff --git a/drivers/net/usb/ch9200.c b/drivers/net/usb/ch9200.c index d7f3b70d54..421853410f 100644 --- a/drivers/net/usb/ch9200.c +++ b/drivers/net/usb/ch9200.c @@ -178,6 +178,7 @@ static int ch9200_mdio_read(struct net_device *netdev, int phy_id, int loc) { struct usbnet *dev = netdev_priv(netdev); unsigned char buff[2]; + int ret; netdev_dbg(netdev, "%s phy_id:%02x loc:%02x\n", __func__, phy_id, loc); @@ -185,8 +186,10 @@ static int ch9200_mdio_read(struct net_device *netdev, int phy_id, int loc) if (phy_id != 0) return -ENODEV; - control_read(dev, REQUEST_READ, 0, loc * 2, buff, 0x02, - CONTROL_TIMEOUT_MS); + ret = control_read(dev, REQUEST_READ, 0, loc * 2, buff, 0x02, + CONTROL_TIMEOUT_MS); + if (ret < 0) + return ret; return (buff[0] | buff[1] << 8); } diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 0733727c25..1199205060 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -2923,11 +2923,23 @@ static int validate_lock_args(struct dlm_ls *ls, struct dlm_lkb *lkb, lkb->lkb_timeout_cs = args->timeout; rv = 0; out: - if (rv) - log_debug(ls, "validate_lock_args %d %x %x %x %d %d %s", + switch (rv) { + case 0: + break; + case -EINVAL: + /* annoy the user because dlm usage is wrong */ + WARN_ON(1); + log_error(ls, "%s %d %x %x %x %d %d", __func__, rv, lkb->lkb_id, lkb->lkb_flags, args->flags, - lkb->lkb_status, lkb->lkb_wait_type, - lkb->lkb_resource->res_name); + lkb->lkb_status, lkb->lkb_wait_type); + break; + default: + log_debug(ls, "%s %d %x %x %x %d %d", __func__, + rv, lkb->lkb_id, lkb->lkb_flags, args->flags, + lkb->lkb_status, lkb->lkb_wait_type); + break; + } + return rv; } @@ -3060,11 +3072,25 @@ static int validate_unlock_args(struct dlm_lkb *lkb, struct dlm_args *args) lkb->lkb_astparam = args->astparam; rv = 0; out: - if (rv) - log_debug(ls, "validate_unlock_args %d %x %x %x %x %d %s", rv, + switch (rv) { + case 0: + break; + case -EINVAL: + /* annoy the user because dlm usage is wrong */ + WARN_ON(1); + log_error(ls, "%s %d %x %x %x %x %d %s", __func__, rv, lkb->lkb_id, lkb->lkb_flags, lkb->lkb_exflags, args->flags, lkb->lkb_wait_type, lkb->lkb_resource->res_name); + break; + default: + log_debug(ls, "%s %d %x %x %x %x %d %s", __func__, rv, + lkb->lkb_id, lkb->lkb_flags, lkb->lkb_exflags, + args->flags, lkb->lkb_wait_type, + lkb->lkb_resource->res_name); + break; + } + return rv; } diff --git a/include/linux/rh_kabi.h b/include/linux/rh_kabi.h index c7b42c1f16..64fca9aa1a 100644 --- a/include/linux/rh_kabi.h +++ b/include/linux/rh_kabi.h @@ -348,6 +348,11 @@ * Adds a new field to an enumeration type. This must always be added to * the end of the enum. Before using this macro, make sure this is actually * safe to do. + * + * RH_KABI_ASSERT_EQ_CONST + * RH_KABI_ASSERT_EQ_CONSTEXPR + * Static assertion equality check against a C preprocessor (or a C constant + * expression). */ #undef linux @@ -512,4 +517,22 @@ (_ptr)->_struct##_size_rh > __off ? true : false; \ }) +#if IS_BUILTIN(CONFIG_RH_KABI_STABLE_ASM_OFFSETS) +# define RH_KABI_ASSERT_EQ_CONSTEXPR(kind, sym, expval, val) { \ + typedef char kind; \ + kind (*expected)[expval]; \ + kind (*actual)[val]; \ + _Static_assert((expval) == (val), "unexpected value of " sym); \ + expected = actual = NULL; \ +} +# define RH_KABI_ASSERT_EQ_CONST(expval, val) \ + _Static_assert((expval) == (val), \ + "unexpected value of " #val " (" \ + "actual: " __stringify(val) ", " \ + "expected: " __stringify(expval) ")") +#else +# define RH_KABI_ASSERT_EQ_CONSTEXPR(kind, sym, expval, val) +# define RH_KABI_ASSERT_EQ_CONST(expval, val) +#endif + #endif /* _LINUX_RH_KABI_H */ diff --git a/mm/swapfile.c b/mm/swapfile.c index 59ba5232e0..ac7691f912 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -1098,6 +1098,7 @@ start_over: goto check_out; pr_debug("scan_swap_map of si %d failed to find offset\n", si->type); + cond_resched(); spin_lock(&swap_avail_lock); nextsi: diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 85cf0e0b52..962dd37e98 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c @@ -717,21 +717,31 @@ static bool reqsk_queue_unlink(struct request_sock *req) found = __sk_nulls_del_node_init_rcu(req_to_sk(req)); spin_unlock(lock); } - if (timer_pending(&req->rsk_timer) && del_timer_sync(&req->rsk_timer)) - reqsk_put(req); + return found; } -bool inet_csk_reqsk_queue_drop(struct sock *sk, struct request_sock *req) +static bool __inet_csk_reqsk_queue_drop(struct sock *sk, + struct request_sock *req, + bool from_timer) { bool unlinked = reqsk_queue_unlink(req); + if (!from_timer && timer_delete_sync(&req->rsk_timer)) + reqsk_put(req); + if (unlinked) { reqsk_queue_removed(&inet_csk(sk)->icsk_accept_queue, req); reqsk_put(req); } + return unlinked; } + +bool inet_csk_reqsk_queue_drop(struct sock *sk, struct request_sock *req) +{ + return __inet_csk_reqsk_queue_drop(sk, req, false); +} EXPORT_SYMBOL(inet_csk_reqsk_queue_drop); void inet_csk_reqsk_queue_drop_and_put(struct sock *sk, struct request_sock *req) @@ -804,7 +814,8 @@ static void reqsk_timer_handler(struct timer_list *t) return; } drop: - inet_csk_reqsk_queue_drop_and_put(sk_listener, req); + __inet_csk_reqsk_queue_drop(sk_listener, req, true); + reqsk_put(req); } static void reqsk_queue_hash_req(struct request_sock *req,