netfilter: use rcu_read_bh() in ipt_do_table()
[safe/jmp/linux-2.6] / net / socket.c
index 47a3dc0..0b14b79 100644 (file)
@@ -328,7 +328,7 @@ static char *sockfs_dname(struct dentry *dentry, char *buffer, int buflen)
                                dentry->d_inode->i_ino);
 }
 
-static struct dentry_operations sockfs_dentry_operations = {
+static const struct dentry_operations sockfs_dentry_operations = {
        .d_delete = sockfs_delete_dentry,
        .d_dname  = sockfs_dname,
 };
@@ -1074,6 +1074,13 @@ static int sock_fasync(int fd, struct file *filp, int on)
 
        lock_sock(sk);
 
+       spin_lock(&filp->f_lock);
+       if (on)
+               filp->f_flags |= FASYNC;
+       else
+               filp->f_flags &= ~FASYNC;
+       spin_unlock(&filp->f_lock);
+
        prev = &(sock->fasync_list);
 
        for (fa = *prev; fa != NULL; prev = &fa->fa_next, fa = *prev)