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-next>] [day] [month] [year] [list]
Message-ID: <54FE8BB0.9050508@hartkopp.net>
Date:	Tue, 10 Mar 2015 07:14:08 +0100
From:	Oliver Hartkopp <socketcan@...tkopp.net>
To:	Florian Westphal <fw@...len.de>
CC:	netdev@...r.kernel.org, mkl@...gutronix.de,
	"linux-can@...r.kernel.org" <linux-can@...r.kernel.org>
Subject: Re: [PATCH] can: use sock_efree instead of own destructor

On 10.03.2015 04:48, Florian Westphal wrote:
> It is identical to the can destructor.
>
> Signed-off-by: Florian Westphal <fw@...len.de>

Acked-by: Oliver Hartkopp <socketcan@...tkopp.net>

Hello Florian,

the other callers use it in the same way so it's a good simplification.
Btw. the name of sock_efree() is a bit misleading - nothing is free'd here.

Won't it be better to rename sock_efree(skb) with sock_put_skb(skb) or 
something like that? sock_efree() has no comment why it's named like this.

Regards,
Oliver

ps. changed from linux ML to netdev and linux-can ML in CC

> ---
>   include/linux/can/skb.h | 7 +------
>   1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/include/linux/can/skb.h b/include/linux/can/skb.h
> index cc00d15..b6a52a4 100644
> --- a/include/linux/can/skb.h
> +++ b/include/linux/can/skb.h
> @@ -44,16 +44,11 @@ static inline void can_skb_reserve(struct sk_buff *skb)
>   	skb_reserve(skb, sizeof(struct can_skb_priv));
>   }
>
> -static inline void can_skb_destructor(struct sk_buff *skb)
> -{
> -	sock_put(skb->sk);
> -}
> -
>   static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk)
>   {
>   	if (sk) {
>   		sock_hold(sk);
> -		skb->destructor = can_skb_destructor;
> +		skb->destructor = sock_efree;
>   		skb->sk = sk;
>   	}
>   }
>
--
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