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: <20231202112104.0ca43022@kernel.org>
Date: Sat, 2 Dec 2023 11:21:04 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Pedro Tammela <pctammela@...atatu.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
 pabeni@...hat.com, jhs@...atatu.com, xiyou.wangcong@...il.com,
 jiri@...nulli.us, marcelo.leitner@...il.com, vladbu@...dia.com
Subject: Re: [PATCH net-next 3/4] net/sched: act_api: conditional
 notification of events

On Fri,  1 Dec 2023 17:43:13 -0300 Pedro Tammela wrote:
> --- a/net/sched/act_api.c
> +++ b/net/sched/act_api.c
> @@ -1791,6 +1791,13 @@ tcf_reoffload_del_notify(struct net *net, struct tc_action *action)
>  	struct sk_buff *skb;
>  	int ret;
>  
> +	if (!tc_should_notify(net, 0)) {
> +		ret = tcf_idr_release_unsafe(action);
> +		if (ret == ACT_P_DELETED)
> +			module_put(ops->owner);
> +		return ret;
> +	}

I fell like we can do better than this.. let's refactor this code a bit
harder. Maybe factor out the alloc_skb() and fill()? Then add a wrapper
around rtnetlink_send() which does nothing if skb is NULL?

>  	skb = alloc_skb(attr_size <= NLMSG_GOODSIZE ? NLMSG_GOODSIZE : attr_size,
>  			GFP_KERNEL);
>  	if (!skb)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ