Subject: Re: [PATCH net v3] net: cxgb4/ch_ipsec: fix potential use-after-free in ch_ipsec_xfrm_add_state() callback

From: Jakub Kicinski <[email-masked]>
Date: Wed, 15 Oct 2025 17:26:49 -0700

On Mon, 13 Oct 2025 12:58:08 +0300 Pavel Zhigulin wrote:
> +	if (unlikely(!try_module_get(THIS_MODULE))) {
> +		NL_SET_ERR_MSG_MOD(extack, "Failed to acquire module reference");
> +		return -ENODEV;
> +	}
> +
>  	sa_entry = kzalloc(sizeof(*sa_entry), GFP_KERNEL);
>  	if (!sa_entry) {
>  		res = -ENOMEM;

I think now you're missing a module put if something fails later.
-- 
pw-bot: cr