lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4AD73723.80604@gmail.com>
Date:	Thu, 15 Oct 2009 16:52:19 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Rémi Denis-Courmont <remi@...lab.net>
CC:	netdev@...r.kernel.org,
	Rémi Denis-Courmont 
	<remi.denis-courmont@...ia.com>
Subject: Re: [PATCH] Phonet: hold socket before giving it to sk_deliver_skb()

Rémi Denis-Courmont a écrit :
> From: Rémi Denis-Courmont <remi.denis-courmont@...ia.com>
> 
> Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@...ia.com>
> ---
>  net/phonet/socket.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/net/phonet/socket.c b/net/phonet/socket.c
> index 8c84190..0412beb 100644
> --- a/net/phonet/socket.c
> +++ b/net/phonet/socket.c
> @@ -112,8 +112,10 @@ void pn_deliver_sock_broadcast(struct net *net, struct sk_buff *skb)
>  			continue;
>  
>  		clone = skb_clone(skb, GFP_ATOMIC);
> -		if (clone)
> +		if (clone) {
> +			sock_hold(sknode);
>  			sk_receive_skb(sknode, clone, 0);
> +		}
>  	}
>  	spin_unlock(&pnsocks.lock);
>  }

Indeed sk_receive_skb() does a sock_put(sk)

Acked-by: Eric Dumazet <eric.dumazet@...il.com>
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ