* [PATCH net-next] wwan: mhi: Fix missing spin_lock_init() in mhi_mbim_probe()
@ 2021-08-08 6:33 Wei Yongjun
2021-08-08 10:23 ` Sergey Ryazanov
2021-08-09 9:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2021-08-08 6:33 UTC (permalink / raw)
To: weiyongjun1, Loic Poulain, Sergey Ryazanov, David S. Miller,
Jakub Kicinski
Cc: netdev, kernel-janitors, Hulk Robot
The driver allocates the spinlock but not initialize it.
Use spin_lock_init() on it to initialize it correctly.
Fixes: aa730a9905b7 ("net: wwan: Add MHI MBIM network driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/net/wwan/mhi_wwan_mbim.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
index f37232fb29c0..377529bbf124 100644
--- a/drivers/net/wwan/mhi_wwan_mbim.c
+++ b/drivers/net/wwan/mhi_wwan_mbim.c
@@ -601,6 +601,7 @@ static int mhi_mbim_probe(struct mhi_device *mhi_dev, const struct mhi_device_id
if (!mbim)
return -ENOMEM;
+ spin_lock_init(&mbim->tx_lock);
dev_set_drvdata(&mhi_dev->dev, mbim);
mbim->mdev = mhi_dev;
mbim->mru = mhi_dev->mhi_cntrl->mru ? mhi_dev->mhi_cntrl->mru : MHI_DEFAULT_MRU;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] wwan: mhi: Fix missing spin_lock_init() in mhi_mbim_probe()
2021-08-08 6:33 [PATCH net-next] wwan: mhi: Fix missing spin_lock_init() in mhi_mbim_probe() Wei Yongjun
@ 2021-08-08 10:23 ` Sergey Ryazanov
2021-08-09 9:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Sergey Ryazanov @ 2021-08-08 10:23 UTC (permalink / raw)
To: Wei Yongjun
Cc: Loic Poulain, David S. Miller, Jakub Kicinski, netdev,
kernel-janitors, Hulk Robot
On Sun, Aug 8, 2021 at 9:21 AM Wei Yongjun <weiyongjun1@huawei.com> wrote:
>
> The driver allocates the spinlock but not initialize it.
> Use spin_lock_init() on it to initialize it correctly.
>
> Fixes: aa730a9905b7 ("net: wwan: Add MHI MBIM network driver")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] wwan: mhi: Fix missing spin_lock_init() in mhi_mbim_probe()
2021-08-08 6:33 [PATCH net-next] wwan: mhi: Fix missing spin_lock_init() in mhi_mbim_probe() Wei Yongjun
2021-08-08 10:23 ` Sergey Ryazanov
@ 2021-08-09 9:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-08-09 9:20 UTC (permalink / raw)
To: Wei Yongjun
Cc: loic.poulain, ryazanov.s.a, davem, kuba, netdev, kernel-janitors, hulkci
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Sun, 8 Aug 2021 06:33:44 +0000 you wrote:
> The driver allocates the spinlock but not initialize it.
> Use spin_lock_init() on it to initialize it correctly.
>
> Fixes: aa730a9905b7 ("net: wwan: Add MHI MBIM network driver")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>
> [...]
Here is the summary with links:
- [net-next] wwan: mhi: Fix missing spin_lock_init() in mhi_mbim_probe()
https://git.kernel.org/netdev/net-next/c/94c0a6fbd5cf
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-09 9:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-08 6:33 [PATCH net-next] wwan: mhi: Fix missing spin_lock_init() in mhi_mbim_probe() Wei Yongjun
2021-08-08 10:23 ` Sergey Ryazanov
2021-08-09 9:20 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.