Subject: Re: [PATCH 2/11] [NET] Convert sk_zapped into SOCK_ZAPPED flag

From: Patrick McHardy <[email-masked]>
Date: Wed, 09 Mar 2005 21:05:50 +0100

Thomas Graf wrote:
> * Patrick McHardy <[email-masked]> 2005-03-09 20:54
>>
>>What about volatile ? sock_set_flag() uses __set_bit(), so its not
>>the same.
> 
> 
> I thought about this for a while but couldn't find a reason
> why it shouldn't work. Actually I don't even see any reason for
> having sk_zapped be volatile.

You're probably right. I believe this piece of code from 2.4 is the
reason for it beeing volatile:

#ifdef TCP_DEBUG
         if (sk->zapped) {
                 printk(KERN_DEBUG "TCP: double destroy sk=%p\n", sk);
                 sock_hold(sk);
         }
         sk->zapped = 1;
#endif

Regards
Patrick