From: Masashi Honma <masashi.honma@gmail.com>
To: netdev@vger.kernel.org, netfilter-devel@vger.kernel.org,
linux-wireless@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-audit@redhat.com, cluster-devel@redhat.com
Cc: davem@davemloft.net, johannes@sipsolutions.net,
pablo@netfilter.org, kaber@trash.net, kadlec@blackhole.kfki.hu,
dledford@redhat.com, sean.hefty@intel.com,
hal.rosenstock@gmail.com, paul@paul-moore.com, eparis@redhat.com,
zbr@ioremap.net, pshelar@nicira.com, ccaulfie@redhat.com,
teigland@redhat.com, bsingharora@gmail.com,
Masashi Honma <masashi.honma@gmail.com>
Subject: [RFC 2/7] netfilter: Add allocation flag to nfnetlink_unicast()
Date: Wed, 6 Jul 2016 09:28:31 +0900 [thread overview]
Message-ID: <1467764916-4983-3-git-send-email-masashi.honma@gmail.com> (raw)
In-Reply-To: <1467764916-4983-1-git-send-email-masashi.honma@gmail.com>
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
---
include/linux/netfilter/nfnetlink.h | 2 +-
net/netfilter/nfnetlink.c | 4 ++--
net/netfilter/nfnetlink_log.c | 4 ++--
net/netfilter/nfnetlink_queue.c | 3 ++-
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h
index 1d82dd5..a1c7808 100644
--- a/include/linux/netfilter/nfnetlink.h
+++ b/include/linux/netfilter/nfnetlink.h
@@ -38,7 +38,7 @@ int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 portid,
unsigned int group, int echo, gfp_t flags);
int nfnetlink_set_err(struct net *net, u32 portid, u32 group, int error);
int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u32 portid,
- int flags);
+ int flags, gfp_t allocation);
void nfnl_lock(__u8 subsys_id);
void nfnl_unlock(__u8 subsys_id);
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index f6193e7..b0910c7 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -141,9 +141,9 @@ int nfnetlink_set_err(struct net *net, u32 portid, u32 group, int error)
EXPORT_SYMBOL_GPL(nfnetlink_set_err);
int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u32 portid,
- int flags)
+ int flags, gfp_t allocation)
{
- return netlink_unicast(net->nfnl, skb, portid, flags, 0);
+ return netlink_unicast(net->nfnl, skb, portid, flags, allocation);
}
EXPORT_SYMBOL_GPL(nfnetlink_unicast);
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 11f81c8..c834306 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -357,8 +357,8 @@ __nfulnl_send(struct nfulnl_instance *inst)
goto out;
}
}
- nfnetlink_unicast(inst->skb, inst->net, inst->peer_portid,
- MSG_DONTWAIT);
+ nfnetlink_unicast(inst->skb, inst->net, inst->peer_portid, MSG_DONTWAIT,
+ gfp_any());
out:
inst->qlen = 0;
inst->skb = NULL;
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 5d36a09..8d7b6ff 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -638,7 +638,8 @@ __nfqnl_enqueue_packet(struct net *net, struct nfqnl_instance *queue,
*packet_id_ptr = htonl(entry->id);
/* nfnetlink_unicast will either free the nskb or add it to a socket */
- err = nfnetlink_unicast(nskb, net, queue->peer_portid, MSG_DONTWAIT);
+ err = nfnetlink_unicast(nskb, net, queue->peer_portid, MSG_DONTWAIT,
+ GFP_ATOMIC);
if (err < 0) {
if (queue->flags & NFQA_CFG_F_FAIL_OPEN) {
failopen = 1;
--
2.7.4
next prev parent reply other threads:[~2016-07-06 0:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 0:28 [RFC 0/7] netlink: Add allocation flag to netlink_unicast() Masashi Honma
2016-07-06 0:28 ` [RFC 1/7] " Masashi Honma
2016-07-06 0:28 ` Masashi Honma [this message]
2016-07-06 0:28 ` [RFC 3/7] netlink: Add allocation flag to nlmsg_unicast() Masashi Honma
2016-07-06 0:28 ` [RFC 4/7] infiniband: Add allocation flag to ibnl_unicast() Masashi Honma
2016-07-06 0:28 ` [RFC 5/7] net: Add allocation flag to rtnl_unicast() Masashi Honma
2016-07-08 2:56 ` Eric Dumazet
2016-07-08 3:15 ` Masashi Honma
[not found] ` <577F1AD7.8040800-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-08 4:00 ` Eric Dumazet
[not found] ` <1467764916-4983-1-git-send-email-masashi.honma-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-06 0:28 ` [RFC 6/7] genetlink: Add allocation flag to genlmsg_unicast() Masashi Honma
2016-07-06 0:28 ` [RFC 7/7] genetlink: Add allocation flag to genlmsg_reply() Masashi Honma
2016-07-06 3:22 ` [RFC 0/7] netlink: Add allocation flag to netlink_unicast() David Miller
2016-07-09 3:54 ` Masashi Honma
2016-07-07 0:35 ` Masashi Honma
[not found] ` <20160708160821.GA2048@redhat.com>
[not found] ` <20160708160821.GA2048-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-07-09 3:52 ` Masashi Honma
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=1467764916-4983-3-git-send-email-masashi.honma@gmail.com \
--to=masashi.honma@gmail.com \
--cc=bsingharora@gmail.com \
--cc=ccaulfie@redhat.com \
--cc=cluster-devel@redhat.com \
--cc=davem@davemloft.net \
--cc=dledford@redhat.com \
--cc=eparis@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-audit@redhat.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=paul@paul-moore.com \
--cc=pshelar@nicira.com \
--cc=sean.hefty@intel.com \
--cc=teigland@redhat.com \
--cc=zbr@ioremap.net \
/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).