lkml.org 
[lkml]   [2021]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] net: Use nlmsg_unicast() instead of netlink_unicast()
On Mon, Jul 12, 2021 at 08:53:01PM +0800, Yajun Deng wrote:
> diff --git a/net/netfilter/nft_compat.c b/net/netfilter/nft_compat.c
> index 639c337c885b..aa3397eec330 100644
> --- a/net/netfilter/nft_compat.c
> +++ b/net/netfilter/nft_compat.c
> @@ -683,10 +683,8 @@ static int nfnl_compat_get_rcu(struct sk_buff *skb,
> goto out_put;
> }
>
> - ret = netlink_unicast(info->sk, skb2, NETLINK_CB(skb).portid,
> - MSG_DONTWAIT);
> - if (ret > 0)
> - ret = 0;
> + ret = nlmsg_unicast(info->sk, skb2, NETLINK_CB(skb).portid);

netfilter needs nfnetlink_unicast to deal with EAGAIN, see e0241ae6ac59

So either:

a) use nfnetlink_unicast.
b) remove this chunk and I'll route a patch to fix this in the
netfilter tree.

Pick one at your choice.

Thanks.

> out_put:
> rcu_read_lock();
> module_put(THIS_MODULE);

\
 
 \ /
  Last update: 2021-07-12 18:49    [W:0.028 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site