stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, Paolo Abeni <pabeni@redhat.com>,
	Mat Martineau <martineau@kernel.org>,
	"Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Subject: [PATCH 6.6 115/121] mptcp: fix bad RCVPRUNED mib accounting
Date: Wed,  7 Aug 2024 17:00:47 +0200	[thread overview]
Message-ID: <20240807150023.163401966@linuxfoundation.org> (raw)
In-Reply-To: <20240807150019.412911622@linuxfoundation.org>

6.6-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Paolo Abeni <pabeni@redhat.com>

commit 0a567c2a10033bf04ed618368d179bce6977984b upstream.

Since its introduction, the mentioned MIB accounted for the wrong
event: wake-up being skipped as not-needed on some edge condition
instead of incoming skb being dropped after landing in the (subflow)
receive queue.

Move the increment in the correct location.

Fixes: ce599c516386 ("mptcp: properly account bulk freed memory")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/mptcp/protocol.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -352,8 +352,10 @@ static bool __mptcp_move_skb(struct mptc
 	skb_orphan(skb);
 
 	/* try to fetch required memory from subflow */
-	if (!mptcp_rmem_schedule(sk, ssk, skb->truesize))
+	if (!mptcp_rmem_schedule(sk, ssk, skb->truesize)) {
+		MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_RCVPRUNED);
 		goto drop;
+	}
 
 	has_rxtstamp = TCP_SKB_CB(skb)->has_rxtstamp;
 
@@ -842,10 +844,8 @@ void mptcp_data_ready(struct sock *sk, s
 		sk_rbuf = ssk_rbuf;
 
 	/* over limit? can't append more skbs to msk, Also, no need to wake-up*/
-	if (__mptcp_rmem(sk) > sk_rbuf) {
-		MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_RCVPRUNED);
+	if (__mptcp_rmem(sk) > sk_rbuf)
 		return;
-	}
 
 	/* Wake-up the reader only for in-sequence data */
 	mptcp_data_lock(sk);



  parent reply	other threads:[~2024-08-07 15:12 UTC|newest]

Thread overview: 136+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07 14:58 [PATCH 6.6 000/121] 6.6.45-rc1 review Greg Kroah-Hartman
2024-08-07 14:58 ` [PATCH 6.6 001/121] arm64: dts: qcom: sc7180: switch USB+DP QMP PHY to new style of bindings Greg Kroah-Hartman
2024-08-07 14:58 ` [PATCH 6.6 002/121] arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode Greg Kroah-Hartman
2024-08-07 14:58 ` [PATCH 6.6 003/121] arm64: dts: qcom: sc7280: switch USB+DP QMP PHY to new style of bindings Greg Kroah-Hartman
2024-08-07 14:58 ` [PATCH 6.6 004/121] arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode Greg Kroah-Hartman
2024-08-07 14:58 ` [PATCH 6.6 005/121] arm64: dts: qcom: msm8998: switch USB QMP PHY to new style of bindings Greg Kroah-Hartman
2024-08-07 14:58 ` [PATCH 6.6 006/121] arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB Greg Kroah-Hartman
2024-08-07 14:58 ` [PATCH 6.6 007/121] arm64: dts: qcom: ipq8074: " Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 008/121] arm64: dts: qcom: sdm845: switch USB+DP QMP PHY to new style of bindings Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 009/121] arm64: dts: qcom: sdm845: switch USB " Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 010/121] arm64: dts: qcom: sdm845: Disable SS instance in Parkmode for USB Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 011/121] thermal: bcm2835: Convert to platform remove callback returning void Greg Kroah-Hartman
2024-08-08  6:11   ` Uwe Kleine-König
2024-08-11 10:46     ` Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 012/121] thermal/drivers/broadcom: Fix race between removal and clock disable Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 013/121] sysctl: allow change system v ipc sysctls inside ipc namespace Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 014/121] sysctl: allow to change limits for posix messages queues Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 015/121] sysctl: treewide: drop unused argument ctl_table_root::set_ownership(table) Greg Kroah-Hartman
2024-08-07 16:38   ` Thomas Weißschuh
2024-08-11 10:45     ` Greg Kroah-Hartman
2024-08-11 11:22       ` Thomas Weißschuh 
2024-08-07 14:59 ` [PATCH 6.6 016/121] sysctl: always initialize i_uid/i_gid Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 017/121] ext4: refactor ext4_da_map_blocks() Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 018/121] ext4: convert to exclusive lock while inserting delalloc extents Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 019/121] ext4: factor out a common helper to query extent map Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 020/121] ext4: check the extent status again before inserting delalloc block Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 021/121] cpufreq: qcom-nvmem: Simplify driver data allocation Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 022/121] cpufreq: qcom-nvmem: fix memory leaks in probe error paths Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 023/121] leds: trigger: Remove unused function led_trigger_rename_static() Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 024/121] leds: trigger: Store brightness set by led_trigger_event() Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 025/121] leds: trigger: Call synchronize_rcu() before calling trig->activate() Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 026/121] leds: triggers: Flush pending brightness before activating trigger Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 027/121] KVM: VMX: Split off vmx_onhyperv.{ch} from hyperv.{ch} Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 028/121] KVM: VMX: Move posted interrupt descriptor out of VMX code Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 029/121] KVM: nVMX: Add a helper to get highest pending from Posted Interrupt vector Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 030/121] KVM: nVMX: Check for pending posted interrupts when looking for nested events Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 031/121] PCI: Add pci_get_base_class() helper Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 032/121] fbdev/vesafb: Replace references to global screen_info by local pointer Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 033/121] video: Add helpers for decoding screen_info Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 034/121] video: Provide screen_info_get_pci_dev() to find screen_infos PCI device Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 035/121] firmware/sysfb: Update screen_info for relocated EFI framebuffers Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 036/121] fbdev: vesafb: Detect VGA compatibility from screen infos VESA attributes Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 037/121] mm: restrict the pcp batch scale factor to avoid too long latency Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 038/121] mm: page_alloc: control latency caused by zone PCP draining Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 039/121] mm/page_alloc: fix pcp->count race between drain_pages_zone() vs __rmqueue_pcplist() Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 040/121] f2fs: fix to avoid use SSR allocate when do defragment Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 041/121] f2fs: assign CURSEG_ALL_DATA_ATGC if blkaddr is valid Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 042/121] dmaengine: fsl-edma: add address for channel mux register in fsl_edma_chan Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 043/121] dmaengine: fsl-edma: add i.MX8ULP edma support Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 044/121] dmaengine: fsl-edma: clean up unused "fsl,imx8qm-adma" compatible string Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 045/121] dmaengine: fsl-edma: change the memory access from local into remote mode in i.MX 8QM Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 046/121] perf: imx_perf: fix counter start and config sequence Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 047/121] MIPS: Loongson64: DTS: Fix PCIe port nodes for ls7a Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 048/121] MIPS: dts: loongson: Fix liointc IRQ polarity Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 049/121] MIPS: dts: loongson: Fix ls2k1000-rtc interrupt Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 050/121] ARM: 9406/1: Fix callchain_trace() return value Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 051/121] HID: amd_sfh: Move sensor discovery before HID device initialization Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 052/121] perf tool: fix dereferencing NULL al->maps Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 053/121] drm/nouveau: prime: fix refcount underflow Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 054/121] drm/vmwgfx: Fix overlay when using Screen Targets Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 055/121] drm/vmwgfx: Trigger a modeset when the screen moves Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 056/121] sched: act_ct: take care of padding in struct zones_ht_key Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 057/121] wifi: cfg80211: fix reporting failed MLO links status with cfg80211_connect_done Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 058/121] net: phy: realtek: add support for RTL8366S Gigabit PHY Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 059/121] ALSA: hda: conexant: Reduce CONFIG_PM dependencies Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 060/121] ALSA: hda: conexant: Fix headset auto detect fail in the polling mode Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 061/121] Bluetooth: btintel: Fail setup on error Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 062/121] Bluetooth: hci_sync: Fix suspending with wrong filter policy Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 063/121] mptcp: give rcvlowat some love Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 064/121] tcp: annotate data-races around tp->window_clamp Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 065/121] tcp: Adjust clamping window for applications specifying SO_RCVBUF Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 066/121] net: axienet: start napi before enabling Rx/Tx Greg Kroah-Hartman
2024-08-07 14:59 ` [PATCH 6.6 067/121] rtnetlink: Dont ignore IFLA_TARGET_NETNSID when ifname is specified in rtnl_dellink() Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 068/121] i915/perf: Remove code to update PWR_CLK_STATE for gen12 Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 069/121] ice: respect netif readiness in AF_XDP ZC related ndos Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 070/121] ice: dont busy wait for Rx queue disable in ice_qp_dis() Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 071/121] ice: replace synchronize_rcu with synchronize_net Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 072/121] ice: add missing WRITE_ONCE when clearing ice_rx_ring::xdp_prog Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 073/121] net/iucv: fix use after free in iucv_sock_close() Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 074/121] drm/i915/hdcp: Fix HDCP2_STREAM_STATUS macro Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 075/121] net: mvpp2: Dont re-use loop iterator Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 076/121] net: phy: micrel: Fix the KSZ9131 MDI-X status issue Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 077/121] ALSA: hda: Conditionally use snooping for AMD HDMI Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 078/121] netfilter: iptables: Fix null-ptr-deref in iptable_nat_table_init() Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 079/121] netfilter: iptables: Fix potential null-ptr-deref in ip6table_nat_table_init() Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 080/121] net/mlx5: Always drain health in shutdown callback Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 081/121] net/mlx5: Fix error handling in irq_pool_request_irq Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 082/121] net/mlx5: Lag, dont use the hardcoded value of the first port Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 083/121] net/mlx5: Fix missing lock on sync reset reload Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 084/121] net/mlx5e: Require mlx5 tc classifier action support for IPsec prio capability Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 085/121] net/mlx5e: Fix CT entry update leaks of modify header context Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 086/121] net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 087/121] igc: Fix double reset adapter triggered from a single taprio cmd Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 088/121] ipv6: fix ndisc_is_useropt() handling for PIO Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 089/121] riscv: remove unused functions in traps_misaligned.c Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 090/121] perf: riscv: Fix selecting counters in legacy mode Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 091/121] riscv/mm: Add handling for VM_FAULT_SIGSEGV in mm_fault_error() Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 092/121] riscv: Fix linear mapping checks for non-contiguous memory regions Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 093/121] arm64: jump_label: Ensure patched jump_labels are visible to all CPUs Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 094/121] rust: SHADOW_CALL_STACK is incompatible with Rust Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 095/121] platform/chrome: cros_ec_proto: Lock device when updating MKBP version Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 096/121] HID: wacom: Modify pen IDs Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 097/121] btrfs: zoned: fix zone_unusable accounting on making block group read-write again Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 098/121] btrfs: do not subtract delalloc from avail bytes Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 099/121] protect the fetch of ->fd[fd] in do_dup2() from mispredictions Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 100/121] mptcp: sched: check both directions for backup Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 101/121] ALSA: usb-audio: Correct surround channels in UAC1 channel map Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 102/121] ALSA: hda/realtek: Add quirk for Acer Aspire E5-574G Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 103/121] ALSA: seq: ump: Optimize conversions from SysEx to UMP Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 104/121] Revert "ALSA: firewire-lib: obsolete workqueue for period update" Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 105/121] Revert "ALSA: firewire-lib: operate for period elapse event in process context" Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 106/121] drm/vmwgfx: Fix a deadlock in dma buf fence polling Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 107/121] drm/virtio: Fix type of dma-fence context variable Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 108/121] drm/i915: Fix possible int overflow in skl_ddi_calculate_wrpll() Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 109/121] net: usb: sr9700: fix uninitialized variable use in sr_mdio_read Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 110/121] r8169: dont increment tx_dropped in case of NETDEV_TX_BUSY Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 111/121] mptcp: fix user-space PM announced address accounting Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 112/121] mptcp: distinguish rcv vs sent backup flag in requests Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 113/121] mptcp: fix NL PM announced address accounting Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 114/121] mptcp: mib: count MPJ with backup flag Greg Kroah-Hartman
2024-08-07 15:00 ` Greg Kroah-Hartman [this message]
2024-08-07 15:00 ` [PATCH 6.6 116/121] mptcp: pm: only set request_bkup flag when sending MP_PRIO Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 117/121] mptcp: fix duplicate data handling Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 118/121] selftests: mptcp: always close inputs FD if opened Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 119/121] selftests: mptcp: join: validate backup in MPJ Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 120/121] selftests: mptcp: join: check backup support in signal endp Greg Kroah-Hartman
2024-08-07 15:00 ` [PATCH 6.6 121/121] mptcp: prevent BPF accessing lowat from a subflow socket Greg Kroah-Hartman
2024-08-07 21:30 ` [PATCH 6.6 000/121] 6.6.45-rc1 review Florian Fainelli
2024-08-07 21:37 ` Shuah Khan
2024-08-08  6:21 ` Anders Roxell
2024-08-08 10:37 ` Miguel Ojeda
2024-08-08 12:24 ` Takeshi Ogasawara
2024-08-08 23:00 ` Allen
2024-08-09  6:35 ` Peter Schneider
2024-08-09 10:54 ` Jon Hunter
2024-08-09 12:01 ` Shreeya Patel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240807150023.163401966@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=martineau@kernel.org \
    --cc=matttbe@kernel.org \
    --cc=pabeni@redhat.com \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).