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: <47CB0EE9.9060707@katalix.com>
Date:	Sun, 02 Mar 2008 20:32:41 +0000
From:	James Chapman <jchapman@...alix.com>
To:	Jarek Poplawski <jarkao2@...il.com>
CC:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH][PPPOL2TP] add missing sock_put() in	pppol2tp_tunnel_closeall()

Jarek Poplawski wrote:
> 
> Subject: [PPPOL2TP] add missing sock_put() in pppol2tp_tunnel_closeall()
> 
> Every skb removed from session->reorder_q needs sock_put().
> 
> 
> Signed-off-by: Jarek Poplawski <jarkao2@...il.com>

Acked-by: James Chapman <jchapman@...alix.com>

>  drivers/net/pppol2tp.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
> index e0b072d..ee9e2a7 100644
> --- a/drivers/net/pppol2tp.c
> +++ b/drivers/net/pppol2tp.c
> @@ -1110,6 +1110,8 @@ static void pppol2tp_tunnel_closeall(struct pppol2tp_tunnel *tunnel)
>  	for (hash = 0; hash < PPPOL2TP_HASH_SIZE; hash++) {
>  again:
>  		hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) {
> +			struct sk_buff *skb;
> +
>  			session = hlist_entry(walk, struct pppol2tp_session, hlist);
>  
>  			sk = session->sock;
> @@ -1138,7 +1140,10 @@ again:
>  			/* Purge any queued data */
>  			skb_queue_purge(&sk->sk_receive_queue);
>  			skb_queue_purge(&sk->sk_write_queue);
> -			skb_queue_purge(&session->reorder_q);
> +			while ((skb = skb_dequeue(&session->reorder_q))) {
> +				kfree_skb(skb);
> +				sock_put(sk);
> +			}
>  
>  			release_sock(sk);
>  			sock_put(sk);


-- 
James Chapman
Katalix Systems Ltd
http://www.katalix.com
Catalysts for your Embedded Linux software development

--
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