Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98249
b: refs/heads/master
c: 6d1a3fb
h: refs/heads/master
i:
  98247: 90c9be6
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jun 18, 2008
1 parent 7247418 commit 7b07ccf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3a5be7d4b079f3a9ce1e8ce4a93ba15ae6d00111
refs/heads/master: 6d1a3fb567a728d31474636e167c324702a0c38b
15 changes: 6 additions & 9 deletions trunk/net/netlink/genetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,11 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
if (ops->dumpit == NULL)
return -EOPNOTSUPP;

return netlink_dump_start(genl_sock, skb, nlh,
ops->dumpit, ops->done);
genl_unlock();
err = netlink_dump_start(genl_sock, skb, nlh,
ops->dumpit, ops->done);
genl_lock();
return err;
}

if (ops->doit == NULL)
Expand Down Expand Up @@ -603,9 +606,6 @@ static int ctrl_dumpfamily(struct sk_buff *skb, struct netlink_callback *cb)
int chains_to_skip = cb->args[0];
int fams_to_skip = cb->args[1];

if (chains_to_skip != 0)
genl_lock();

for (i = 0; i < GENL_FAM_TAB_SIZE; i++) {
if (i < chains_to_skip)
continue;
Expand All @@ -623,9 +623,6 @@ static int ctrl_dumpfamily(struct sk_buff *skb, struct netlink_callback *cb)
}

errout:
if (chains_to_skip != 0)
genl_unlock();

cb->args[0] = i;
cb->args[1] = n;

Expand Down Expand Up @@ -770,7 +767,7 @@ static int __init genl_init(void)

/* we'll bump the group number right afterwards */
genl_sock = netlink_kernel_create(&init_net, NETLINK_GENERIC, 0,
genl_rcv, NULL, THIS_MODULE);
genl_rcv, &genl_mutex, THIS_MODULE);
if (genl_sock == NULL)
panic("GENL: Cannot initialize generic netlink\n");

Expand Down

0 comments on commit 7b07ccf

Please sign in to comment.