diff mbox series

net: mvneta: fix locking in mvneta_cpu_online()

Message ID 20250121005002.3938236-1-harshit.m.mogalapalli@oracle.com (mailing list archive)
State New
Delegated to: Netdev Maintainers
Headers show
Series net: mvneta: fix locking in mvneta_cpu_online() | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 1 this patch: 1
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2025-01-21--03-00 (tests: 885)

Commit Message

Harshit Mogalapalli Jan. 21, 2025, 12:50 a.m. UTC
When port is stopped, unlock before returning

Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
---
This is based on static analysis, only compile tested
---
 drivers/net/ethernet/marvell/mvneta.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Harshit Mogalapalli Jan. 21, 2025, 12:53 a.m. UTC | #1
Hi,

On 21/01/25 06:20, Harshit Mogalapalli wrote:
> When port is stopped, unlock before returning
> 
Missed adding a period at the end of sentence. Should I send a V2 ?

Thanks,
Harshit
> Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()")
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
> ---
> This is based on static analysis, only compile tested
> ---
>   drivers/net/ethernet/marvell/mvneta.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> index 82f4333fb426..4fe121b9f94b 100644
> --- a/drivers/net/ethernet/marvell/mvneta.c
> +++ b/drivers/net/ethernet/marvell/mvneta.c
> @@ -4432,6 +4432,7 @@ static int mvneta_cpu_online(unsigned int cpu, struct hlist_node *node)
>   	 */
>   	if (pp->is_stopped) {
>   		spin_unlock(&pp->lock);
> +		netdev_unlock(port->napi.dev);
>   		return 0;
>   	}
>   	netif_tx_stop_all_queues(pp->dev);
Jakub Kicinski Jan. 21, 2025, 1:04 a.m. UTC | #2
On Tue, 21 Jan 2025 06:23:16 +0530 Harshit Mogalapalli wrote:
> On 21/01/25 06:20, Harshit Mogalapalli wrote:
> > When port is stopped, unlock before returning
> >   
> Missed adding a period at the end of sentence. Should I send a V2 ?

It's alright, we can add the period when applying.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 82f4333fb426..4fe121b9f94b 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -4432,6 +4432,7 @@  static int mvneta_cpu_online(unsigned int cpu, struct hlist_node *node)
 	 */
 	if (pp->is_stopped) {
 		spin_unlock(&pp->lock);
+		netdev_unlock(port->napi.dev);
 		return 0;
 	}
 	netif_tx_stop_all_queues(pp->dev);