From: Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx> Date: Thu, 17 Sep 2009 17:58:32 -0700 > From: John Fastabend <john.r.fastabend@xxxxxxxxx> > > 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@xxxxxxxxx> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx> 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 linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html