Le jeudi 20 octobre 2011 à 10:44 +0800, Alex,Shi a écrit :
> > Acked-by: Christoph Lameter <[email protected]>
> 
> Thanks, Christoph! 
> and resend for code style problem correction. 
> 

Sorry this huge patch brings too many potential bugs.

I ask you a separate patch for the networking part, because I dont want
to Ack all the other parts.

> diff --git a/net/socket.c b/net/socket.c
> index ffe92ca..2845d38 100644
> --- a/net/socket.c
> +++ b/net/socket.c
> @@ -479,7 +479,7 @@ static struct socket *sock_alloc(void)
>       inode->i_uid = current_fsuid();
>       inode->i_gid = current_fsgid();
>  
> -     percpu_add(sockets_in_use, 1);
> +     __this_cpu_add(sockets_in_use, 1);

No, we are in process context, you need

        this_cpu_add(sockets_in_use, 1);

>       return sock;
>  }
>  
> @@ -522,7 +522,7 @@ void sock_release(struct socket *sock)
>       if (rcu_dereference_protected(sock->wq, 1)->fasync_list)
>               printk(KERN_ERR "sock_release: fasync list not empty!\n");
>  
> -     percpu_sub(sockets_in_use, 1);
> +     __this_cpu_sub(sockets_in_use, 1);

        this_cpu_sub();

>       if (!sock->file) {
>               iput(SOCK_INODE(sock));
>               return;



--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to