netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.7 09/23] net: smsc95xx: add support for SYS TEC USB-SPEmodule1
       [not found] <20240311151217.317068-1-sashal@kernel.org>
@ 2024-03-11 15:11 ` Sasha Levin
  2024-03-11 15:11 ` [PATCH AUTOSEL 6.7 10/23] wifi: mac80211: only call drv_sta_rc_update for uploaded stations Sasha Levin
  2024-03-11 15:11 ` [PATCH AUTOSEL 6.7 14/23] selftests: mptcp: explicitly trigger the listener diag code-path Sasha Levin
  2 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-03-11 15:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Andre Werner, Jakub Kicinski, Sasha Levin, steve.glendinning,
	UNGLinuxDriver, davem, edumazet, pabeni, netdev, linux-usb

From: Andre Werner <andre.werner@systec-electronic.com>

[ Upstream commit 45532b21dc2a692444b6ad5f71c253cca53e8103 ]

This patch adds support for the SYS TEC USB-SPEmodule1 10Base-T1L
ethernet device to the existing smsc95xx driver by adding the new
USB VID/PID pair.

Signed-off-by: Andre Werner <andre.werner@systec-electronic.com>
Link: https://lore.kernel.org/r/20240219053413.4732-1-andre.werner@systec-electronic.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/usb/smsc95xx.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index a530f20ee2575..2fa46baa589e5 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -2104,6 +2104,11 @@ static const struct usb_device_id products[] = {
 		USB_DEVICE(0x0424, 0x9E08),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
+	{
+		/* SYSTEC USB-SPEmodule1 10BASE-T1L Ethernet Device */
+		USB_DEVICE(0x0878, 0x1400),
+		.driver_info = (unsigned long)&smsc95xx_info,
+	},
 	{
 		/* Microchip's EVB-LAN8670-USB 10BASE-T1S Ethernet Device */
 		USB_DEVICE(0x184F, 0x0051),
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 6.7 10/23] wifi: mac80211: only call drv_sta_rc_update for uploaded stations
       [not found] <20240311151217.317068-1-sashal@kernel.org>
  2024-03-11 15:11 ` [PATCH AUTOSEL 6.7 09/23] net: smsc95xx: add support for SYS TEC USB-SPEmodule1 Sasha Levin
@ 2024-03-11 15:11 ` Sasha Levin
  2024-03-11 15:11 ` [PATCH AUTOSEL 6.7 14/23] selftests: mptcp: explicitly trigger the listener diag code-path Sasha Levin
  2 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-03-11 15:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Felix Fietkau, Johannes Berg, Sasha Levin, johannes, davem,
	edumazet, kuba, pabeni, linux-wireless, netdev

From: Felix Fietkau <nbd@nbd.name>

[ Upstream commit 413dafc8170fcb925fb17af8842f06af305f8e0b ]

When a station has not been uploaded yet, receiving SMPS or channel width
notification action frames can lead to rate_control_rate_update calling
drv_sta_rc_update with uninitialized driver private data.
Fix this by adding a missing check for sta->uploaded.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://msgid.link/20240221140535.16102-1-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/mac80211/rate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index d5ea5f5bcf3a0..9d33fd2377c88 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -119,7 +119,8 @@ void rate_control_rate_update(struct ieee80211_local *local,
 		rcu_read_unlock();
 	}
 
-	drv_sta_rc_update(local, sta->sdata, &sta->sta, changed);
+	if (sta->uploaded)
+		drv_sta_rc_update(local, sta->sdata, &sta->sta, changed);
 }
 
 int ieee80211_rate_control_register(const struct rate_control_ops *ops)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 6.7 14/23] selftests: mptcp: explicitly trigger the listener diag code-path
       [not found] <20240311151217.317068-1-sashal@kernel.org>
  2024-03-11 15:11 ` [PATCH AUTOSEL 6.7 09/23] net: smsc95xx: add support for SYS TEC USB-SPEmodule1 Sasha Levin
  2024-03-11 15:11 ` [PATCH AUTOSEL 6.7 10/23] wifi: mac80211: only call drv_sta_rc_update for uploaded stations Sasha Levin
@ 2024-03-11 15:11 ` Sasha Levin
  2024-03-11 15:28   ` Matthieu Baerts
  2 siblings, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2024-03-11 15:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Paolo Abeni, Matthieu Baerts, Simon Horman, Jakub Kicinski,
	Sasha Levin, martineau, davem, edumazet, shuah, netdev, mptcp,
	linux-kselftest

From: Paolo Abeni <pabeni@redhat.com>

[ Upstream commit b4b51d36bbaa3ddb93b3e1ca3a1ef0aa629d6521 ]

The mptcp diag interface already experienced a few locking bugs
that lockdep and appropriate coverage have detected in advance.

Let's add a test-case triggering the relevant code path, to prevent
similar issues in the future.

Be careful to cope with very slow environments.

Note that we don't need an explicit timeout on the mptcp_connect
subprocess to cope with eventual bug/hang-up as the final cleanup
terminating the child processes will take care of that.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-10-162e87e48497@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 tools/testing/selftests/net/mptcp/diag.sh | 30 ++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh
index 4d8c59be1b30c..ff9a4f45f852f 100755
--- a/tools/testing/selftests/net/mptcp/diag.sh
+++ b/tools/testing/selftests/net/mptcp/diag.sh
@@ -20,7 +20,7 @@ flush_pids()
 
 	ip netns pids "${ns}" | xargs --no-run-if-empty kill -SIGUSR1 &>/dev/null
 
-	for _ in $(seq 10); do
+	for _ in $(seq $((timeout_poll * 10))); do
 		[ -z "$(ip netns pids "${ns}")" ] && break
 		sleep 0.1
 	done
@@ -91,6 +91,15 @@ chk_msk_nr()
 	__chk_msk_nr "grep -c token:" "$@"
 }
 
+chk_listener_nr()
+{
+	local expected=$1
+	local msg="$2"
+
+	__chk_nr "ss -inmlHMON $ns | wc -l" "$expected" "$msg - mptcp" 0
+	__chk_nr "ss -inmlHtON $ns | wc -l" "$expected" "$msg - subflows"
+}
+
 wait_msk_nr()
 {
 	local condition="grep -c token:"
@@ -306,5 +315,24 @@ flush_pids
 chk_msk_inuse 0 "many->0"
 chk_msk_cestab 0 "many->0"
 
+chk_listener_nr 0 "no listener sockets"
+NR_SERVERS=100
+for I in $(seq 1 $NR_SERVERS); do
+	ip netns exec $ns ./mptcp_connect -p $((I + 20001)) \
+		-t ${timeout_poll} -l 0.0.0.0 >/dev/null 2>&1 &
+done
+
+for I in $(seq 1 $NR_SERVERS); do
+	mptcp_lib_wait_local_port_listen $ns $((I + 20001))
+done
+
+chk_listener_nr $NR_SERVERS "many listener sockets"
+
+# graceful termination
+for I in $(seq 1 $NR_SERVERS); do
+	echo a | ip netns exec $ns ./mptcp_connect -p $((I + 20001)) 127.0.0.1 >/dev/null 2>&1 &
+done
+flush_pids
+
 mptcp_lib_result_print_all_tap
 exit $ret
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH AUTOSEL 6.7 14/23] selftests: mptcp: explicitly trigger the listener diag code-path
  2024-03-11 15:11 ` [PATCH AUTOSEL 6.7 14/23] selftests: mptcp: explicitly trigger the listener diag code-path Sasha Levin
@ 2024-03-11 15:28   ` Matthieu Baerts
  2024-03-18 12:47     ` Sasha Levin
  0 siblings, 1 reply; 5+ messages in thread
From: Matthieu Baerts @ 2024-03-11 15:28 UTC (permalink / raw)
  To: Sasha Levin, linux-kernel, stable
  Cc: Paolo Abeni, Simon Horman, Jakub Kicinski, martineau, davem,
	edumazet, shuah, netdev, mptcp, linux-kselftest

Hi Sasha,

On 11/03/2024 16:11, Sasha Levin wrote:
> From: Paolo Abeni <pabeni@redhat.com>
> 
> [ Upstream commit b4b51d36bbaa3ddb93b3e1ca3a1ef0aa629d6521 ]

Thank you for having backported this patch to v6.7 and v6.6 versions.
But it looks like it depends on commit 9369777c2939 ("selftests: mptcp:
add mptcp_lib_wait_local_port_listen") which is not in these versions.

Because CIs will soon use the kselftests from the new v6.8, I think it
is better to drop this patch from v6.7 and v6.6 versions.

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH AUTOSEL 6.7 14/23] selftests: mptcp: explicitly trigger the listener diag code-path
  2024-03-11 15:28   ` Matthieu Baerts
@ 2024-03-18 12:47     ` Sasha Levin
  0 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-03-18 12:47 UTC (permalink / raw)
  To: Matthieu Baerts
  Cc: linux-kernel, stable, Paolo Abeni, Simon Horman, Jakub Kicinski,
	martineau, davem, edumazet, shuah, netdev, mptcp,
	linux-kselftest

On Mon, Mar 11, 2024 at 04:28:01PM +0100, Matthieu Baerts wrote:
>Hi Sasha,
>
>On 11/03/2024 16:11, Sasha Levin wrote:
>> From: Paolo Abeni <pabeni@redhat.com>
>>
>> [ Upstream commit b4b51d36bbaa3ddb93b3e1ca3a1ef0aa629d6521 ]
>
>Thank you for having backported this patch to v6.7 and v6.6 versions.
>But it looks like it depends on commit 9369777c2939 ("selftests: mptcp:
>add mptcp_lib_wait_local_port_listen") which is not in these versions.
>
>Because CIs will soon use the kselftests from the new v6.8, I think it
>is better to drop this patch from v6.7 and v6.6 versions.
>
>Cheers,
>Matt

I'll drop it, thanks.

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-18 12:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20240311151217.317068-1-sashal@kernel.org>
2024-03-11 15:11 ` [PATCH AUTOSEL 6.7 09/23] net: smsc95xx: add support for SYS TEC USB-SPEmodule1 Sasha Levin
2024-03-11 15:11 ` [PATCH AUTOSEL 6.7 10/23] wifi: mac80211: only call drv_sta_rc_update for uploaded stations Sasha Levin
2024-03-11 15:11 ` [PATCH AUTOSEL 6.7 14/23] selftests: mptcp: explicitly trigger the listener diag code-path Sasha Levin
2024-03-11 15:28   ` Matthieu Baerts
2024-03-18 12:47     ` Sasha Levin

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).