netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: use right lock in __dev_remove_offload
@ 2012-11-16 18:08 Eric Dumazet
  2012-11-16 18:15 ` Vlad Yasevich
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2012-11-16 18:08 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Vlad Yasevich

From: Eric Dumazet <edumazet@google.com>

offload_base is protected by offload_lock, not ptype_lock

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Vlad Yasevich <vyasevic@redhat.com>
---
 net/core/dev.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index cf105e8..2705a2a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -513,7 +513,7 @@ void __dev_remove_offload(struct packet_offload *po)
 	struct list_head *head = &offload_base;
 	struct packet_offload *po1;
 
-	spin_lock(&ptype_lock);
+	spin_lock(&offload_lock);
 
 	list_for_each_entry(po1, head, list) {
 		if (po == po1) {
@@ -524,7 +524,7 @@ void __dev_remove_offload(struct packet_offload *po)
 
 	pr_warn("dev_remove_offload: %p not found\n", po);
 out:
-	spin_unlock(&ptype_lock);
+	spin_unlock(&offload_lock);
 }
 EXPORT_SYMBOL(__dev_remove_offload);
 

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

* Re: [PATCH net-next] net: use right lock in __dev_remove_offload
  2012-11-16 18:08 [PATCH net-next] net: use right lock in __dev_remove_offload Eric Dumazet
@ 2012-11-16 18:15 ` Vlad Yasevich
  2012-11-16 18:41   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Vlad Yasevich @ 2012-11-16 18:15 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev

On 11/16/2012 01:08 PM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> offload_base is protected by offload_lock, not ptype_lock
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Vlad Yasevich <vyasevic@redhat.com>
> ---
>   net/core/dev.c |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index cf105e8..2705a2a 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -513,7 +513,7 @@ void __dev_remove_offload(struct packet_offload *po)
>   	struct list_head *head = &offload_base;
>   	struct packet_offload *po1;
>
> -	spin_lock(&ptype_lock);
> +	spin_lock(&offload_lock);
>
>   	list_for_each_entry(po1, head, list) {
>   		if (po == po1) {
> @@ -524,7 +524,7 @@ void __dev_remove_offload(struct packet_offload *po)
>
>   	pr_warn("dev_remove_offload: %p not found\n", po);
>   out:
> -	spin_unlock(&ptype_lock);
> +	spin_unlock(&offload_lock);
>   }
>   EXPORT_SYMBOL(__dev_remove_offload);
>

Acked-by: Vlad Yasevich <vyasevic@redhat.com>

I distinctly remember changing that, but just look at my patches and 
it's there.... Sorry...

-vlad

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

* Re: [PATCH net-next] net: use right lock in __dev_remove_offload
  2012-11-16 18:15 ` Vlad Yasevich
@ 2012-11-16 18:41   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2012-11-16 18:41 UTC (permalink / raw)
  To: vyasevic; +Cc: eric.dumazet, netdev

From: Vlad Yasevich <vyasevic@redhat.com>
Date: Fri, 16 Nov 2012 13:15:54 -0500

> On 11/16/2012 01:08 PM, Eric Dumazet wrote:
>> From: Eric Dumazet <edumazet@google.com>
>>
>> offload_base is protected by offload_lock, not ptype_lock
>>
>> Signed-off-by: Eric Dumazet <edumazet@google.com>
 ...
> Acked-by: Vlad Yasevich <vyasevic@redhat.com>

Applied, thanks everyone.

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

end of thread, other threads:[~2012-11-16 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-16 18:08 [PATCH net-next] net: use right lock in __dev_remove_offload Eric Dumazet
2012-11-16 18:15 ` Vlad Yasevich
2012-11-16 18:41   ` David Miller

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