* [PATCH] Networking: Core: netpoll: Fixed a missing spin_unlock
@ 2016-07-30 0:53 Salil Kapur
2016-07-30 21:58 ` Francois Romieu
0 siblings, 1 reply; 3+ messages in thread
From: Salil Kapur @ 2016-07-30 0:53 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-kernel, salilkapur93
In the case when the loop breaks at line 390, the txq lock is not
released. Added an unlock statement before the break statement.
Signed-off-by: Salil Kapur <salilkapur93@gmail.com>
---
net/core/netpoll.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index fc75c9e..9124f76 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -386,8 +386,10 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
!vlan_hw_offload_capable(netif_skb_features(skb),
skb->vlan_proto)) {
skb = __vlan_put_tag(skb, skb->vlan_proto, vlan_tx_tag_get(skb));
- if (unlikely(!skb))
+ if (unlikely(!skb)) {
+ __netif_tx_unlock(txq);
break;
+ }
skb->vlan_tci = 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Networking: Core: netpoll: Fixed a missing spin_unlock
2016-07-30 0:53 [PATCH] Networking: Core: netpoll: Fixed a missing spin_unlock Salil Kapur
@ 2016-07-30 21:58 ` Francois Romieu
[not found] ` <CAJksCdT5DkbrQ_OAigJim_qT3WXo6sPv07KrBcAtTsHFLMzO4w@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Francois Romieu @ 2016-07-30 21:58 UTC (permalink / raw)
To: Salil Kapur; +Cc: davem, netdev, linux-kernel
Salil Kapur <salilkapur93@gmail.com> :
[...]
> diff --git a/net/core/netpoll.c b/net/core/netpoll.c
> index fc75c9e..9124f76 100644
> --- a/net/core/netpoll.c
> +++ b/net/core/netpoll.c
> @@ -386,8 +386,10 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
> !vlan_hw_offload_capable(netif_skb_features(skb),
> skb->vlan_proto)) {
> skb = __vlan_put_tag(skb, skb->vlan_proto, vlan_tx_tag_get(skb));
> - if (unlikely(!skb))
> + if (unlikely(!skb)) {
> + __netif_tx_unlock(txq);
> break;
> + }
> skb->vlan_tci = 0;
> }
>
Your kernel is outdated: __vlan_put_tag has disappeared from net/core/netpoll.c
since 62749e2cb3c4a7da3eaa5c01a7e787aebeff8536 ("vlan: rename __vlan_put_tag to
vlan_insert_tag_set_proto") by Jiri Pirko somewhere in 2014.
--
Ueimor
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Networking: Core: netpoll: Fixed a missing spin_unlock
[not found] ` <CAJksCdT5DkbrQ_OAigJim_qT3WXo6sPv07KrBcAtTsHFLMzO4w@mail.gmail.com>
@ 2016-07-31 22:09 ` Francois Romieu
0 siblings, 0 replies; 3+ messages in thread
From: Francois Romieu @ 2016-07-31 22:09 UTC (permalink / raw)
To: Salil Kapur; +Cc: linux-kernel, davem, netdev
Salil Kapur <salilkapur93@gmail.com> :
> I was looking at v3.12. Can we submit patches for stable versions?
It has already been fixed in 3.12.8 as 56399d8b44beae5b80e1eda0350ab6af72baf4d0
("netpoll: Fix missing TXQ unlock and and OOPS.") by davem.
3.12.8 dates back to 2014/01. The current 3.12.x version is 3.12.62.
--
Ueimor
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-31 22:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-30 0:53 [PATCH] Networking: Core: netpoll: Fixed a missing spin_unlock Salil Kapur
2016-07-30 21:58 ` Francois Romieu
[not found] ` <CAJksCdT5DkbrQ_OAigJim_qT3WXo6sPv07KrBcAtTsHFLMzO4w@mail.gmail.com>
2016-07-31 22:09 ` Francois Romieu
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.