diff mbox series

[net-next] octeon_ep: unlock the correct lock on error path

Message ID 251aa2a2-913e-4868-aac9-0a90fc3eeeda@kili.mountain (mailing list archive)
State Accepted
Commit 765f3604641e1524389e1d6431974d2bbcab14a7
Delegated to: Netdev Maintainers
Headers show
Series [net-next] octeon_ep: unlock the correct lock on error path | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
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: 18 this patch: 18
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 18 this patch: 18
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: 18 this patch: 18
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Dan Carpenter March 29, 2023, 6:51 a.m. UTC
The h and the f letters are swapped so it unlocks the wrong lock.

Fixes: 577f0d1b1c5f ("octeon_ep: add separate mailbox command and response queues")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
Thees vairable nmaes are terirble.  The huamn mnid deos not raed ervey
lteter by istlef, but the wrod as a wlohe.

https://www.dictionary.com/e/typoglycemia/

 drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky March 29, 2023, 6:21 p.m. UTC | #1
On Wed, Mar 29, 2023 at 09:51:37AM +0300, Dan Carpenter wrote:
> The h and the f letters are swapped so it unlocks the wrong lock.
> 
> Fixes: 577f0d1b1c5f ("octeon_ep: add separate mailbox command and response queues")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> Thees vairable nmaes are terirble.  The huamn mnid deos not raed ervey
> lteter by istlef, but the wrod as a wlohe.
> 
> https://www.dictionary.com/e/typoglycemia/
> 
>  drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
patchwork-bot+netdevbpf@kernel.org March 30, 2023, 5:20 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 29 Mar 2023 09:51:37 +0300 you wrote:
> The h and the f letters are swapped so it unlocks the wrong lock.
> 
> Fixes: 577f0d1b1c5f ("octeon_ep: add separate mailbox command and response queues")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> Thees vairable nmaes are terirble.  The huamn mnid deos not raed ervey
> lteter by istlef, but the wrod as a wlohe.
> 
> [...]

Here is the summary with links:
  - [net-next] octeon_ep: unlock the correct lock on error path
    https://git.kernel.org/netdev/net-next/c/765f3604641e

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c b/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c
index a4ee6f3ae354..035ead7935c7 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c
@@ -167,7 +167,7 @@  int octep_ctrl_mbox_send(struct octep_ctrl_mbox *mbox, struct octep_ctrl_mbox_ms
 	ci = readl(q->hw_cons);
 
 	if (octep_ctrl_mbox_circq_space(pi, ci, q->sz) < (msg->hdr.s.sz + mbox_hdr_sz)) {
-		mutex_unlock(&mbox->f2hq_lock);
+		mutex_unlock(&mbox->h2fq_lock);
 		return -EAGAIN;
 	}