ip_queue getting rtnetlink semaphore?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




In net/ipv4/netfilter/ip_queue.c, in netlink_receive_user_sk(), why does
it obtain the rtnl semaphore?

static void netlink_receive_user_sk(struct sock *sk, int len)
{
	do {
		struct sk_buff *skb;

		if (rtnl_shlock_nowait())
			return;
		while ((skb = skb_dequeue(&sk->receive_queue)) != NULL) {
			netlink_receive_user_skb(skb);
			kfree_skb(skb);
		}
		up(&rtnl_sem);
	} while (nfnl && nfnl->receive_queue.qlen);
}

What do routing netlink sockets have to do with the netlink sockets used
for userspace communication in ip_queue? If they're sharing that
semaphore, is it just named "rtnl" as a historical artifact?

thanks,

Jason
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux