Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24 /fs/ecryptfs/netlink.c

Filename:/fs/ecryptfs/netlink.c
Lines Added:2
Lines Deleted:14
Also changed in: (Previous) 2.6.24-rc8  2.6.24-rc7  2.6.24-rc6  2.6.24-rc5  2.6.24-rc4  2.6.24-rc3 
(Following) 2.6.24-git6  2.6.24-git7  2.6.24-git8  2.6.24-git9  2.6.24-git10  2.6.24-git11 

Location
[  2.6.24
  [  fs
    [  ecryptfs
       o  netlink.c

Patch

diff --git a/fs/ecryptfs/netlink.c b/fs/ecryptfs/netlink.c
index fe91863..9aa3451 100644
--- a/fs/ecryptfs/netlink.c
+++ b/fs/ecryptfs/netlink.c
@@ -165,22 +165,10 @@ static int ecryptfs_process_nl_quit(struct sk_buff *skb)
  * it to its desired netlink context element and wake up the process
  * that is waiting for a response.
  */
-static void ecryptfs_receive_nl_message(struct sock *sk, int len)
+static void ecryptfs_receive_nl_message(struct sk_buff *skb)
 {
-   struct sk_buff *skb;
    struct nlmsghdr *nlh;
-   int rc = 0;   /* skb_recv_datagram requires this */
 
-receive:
-   skb = skb_recv_datagram(sk, 0, 0, &rc);
-   if (rc == -EINTR)
-      goto receive;
-   else if (rc < 0) {
-      ecryptfs_printk(KERN_ERR, "Error occurred while "
-            "receiving eCryptfs netlink message; "
-            "rc = [%d]\n", rc);
-      return;
-   }
    nlh = nlmsg_hdr(skb);
    if (!NLMSG_OK(nlh, skb->len)) {
       ecryptfs_printk(KERN_ERR, "Received corrupt netlink "
@@ -227,7 +215,7 @@ int ecryptfs_init_netlink(void)
 {
    int rc;
 
-   ecryptfs_nl_sock = netlink_kernel_create(NETLINK_ECRYPTFS, 0,
+   ecryptfs_nl_sock = netlink_kernel_create(&init_net, NETLINK_ECRYPTFS, 0,
                    ecryptfs_receive_nl_message,
                    NULL, THIS_MODULE);
    if (!ecryptfs_nl_sock) {


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.