[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090917.182745.230999703.davem@davemloft.net>
Date: Thu, 17 Sep 2009 18:27:45 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: jeffrey.t.kirsher@...el.com
Cc: netdev@...r.kernel.org, gospo@...hat.com,
linux-scsi@...r.kernel.org, john.r.fastabend@...el.com
Subject: Re: [net-2.6 PATCH 5/6] net: fix sock locking for sk_err field in
netlink.
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Date: Thu, 17 Sep 2009 17:58:32 -0700
> From: John Fastabend <john.r.fastabend@...el.com>
>
> This adds the sock lock around setting the sk_err field
> in sock struct. Without the lock multiple threads may
> write to this field.
>
> Signed-off-by: John Fastabend <john.r.fastabend@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
This isn't right.
Writes to sk->sk_err can occur asynchronously just fine and
without any locking.
The only requirement is that consumers of the sk_err value
use sock_error() which uses xchg() to get and clear the
value atomically.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists