aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/genetlink.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 2fd6dbea327a..512718adb0d5 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -571,7 +571,7 @@ static int genl_family_rcv_msg(struct genl_family *family,
571 !capable(CAP_NET_ADMIN)) 571 !capable(CAP_NET_ADMIN))
572 return -EPERM; 572 return -EPERM;
573 573
574 if (nlh->nlmsg_flags & NLM_F_DUMP) { 574 if ((nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP) {
575 struct netlink_dump_control c = { 575 struct netlink_dump_control c = {
576 .dump = ops->dumpit, 576 .dump = ops->dumpit,
577 .done = ops->done, 577 .done = ops->done,
@@ -877,8 +877,10 @@ static int ctrl_getfamily(struct sk_buff *skb, struct genl_info *info)
877#ifdef CONFIG_MODULES 877#ifdef CONFIG_MODULES
878 if (res == NULL) { 878 if (res == NULL) {
879 genl_unlock(); 879 genl_unlock();
880 up_read(&cb_lock);
880 request_module("net-pf-%d-proto-%d-family-%s", 881 request_module("net-pf-%d-proto-%d-family-%s",
881 PF_NETLINK, NETLINK_GENERIC, name); 882 PF_NETLINK, NETLINK_GENERIC, name);
883 down_read(&cb_lock);
882 genl_lock(); 884 genl_lock();
883 res = genl_family_find_byname(name); 885 res = genl_family_find_byname(name);
884 } 886 }