mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Yajun Deng <yajun.deng@linux.dev>
Cc: davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org,
	kuba@kernel.org, mathew.j.martineau@linux.intel.com,
	matthieu.baerts@tessares.net, kadlec@netfilter.org, fw@strlen.de,
	vyasevich@gmail.com, nhorman@tuxdriver.com,
	marcelo.leitner@gmail.com, johannes.berg@intel.com,
	ast@kernel.org, yhs@fb.com, 0x7f454c46@gmail.com,
	aahringo@redhat.com, rdunlap@infradead.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	mptcp@lists.linux.dev, netfilter-devel@vger.kernel.org,
	coreteam@netfilter.org, linux-sctp@vger.kernel.org
Subject: Re: [PATCH] net: Use nlmsg_unicast() instead of netlink_unicast()
Date: Mon, 12 Jul 2021 18:49:04 +0200	[thread overview]
Message-ID: <20210712164904.GA16733@salvia> (raw)
In-Reply-To: <20210712125301.14248-1-yajun.deng@linux.dev>

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

      reply	other threads:[~2021-07-12 16:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12 12:53 [PATCH] net: Use nlmsg_unicast() instead of netlink_unicast() Yajun Deng
2021-07-12 16:49 ` Pablo Neira Ayuso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210712164904.GA16733@salvia \
    --to=pablo@netfilter.org \
    --cc=0x7f454c46@gmail.com \
    --cc=aahringo@redhat.com \
    --cc=ast@kernel.org \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=fw@strlen.de \
    --cc=johannes.berg@intel.com \
    --cc=kadlec@netfilter.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=mathew.j.martineau@linux.intel.com \
    --cc=matthieu.baerts@tessares.net \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=rdunlap@infradead.org \
    --cc=vyasevich@gmail.com \
    --cc=yajun.deng@linux.dev \
    --cc=yhs@fb.com \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).