projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linvil...
[powerpc.git]
/
fs
/
ecryptfs
/
netlink.c
diff --git
a/fs/ecryptfs/netlink.c
b/fs/ecryptfs/netlink.c
index
aba061d
..
fe91863
100644
(file)
--- a/
fs/ecryptfs/netlink.c
+++ b/
fs/ecryptfs/netlink.c
@@
-97,7
+97,7
@@
out:
*/
static int ecryptfs_process_nl_response(struct sk_buff *skb)
{
*/
static int ecryptfs_process_nl_response(struct sk_buff *skb)
{
- struct nlmsghdr *nlh =
(struct nlmsghdr*)skb->data
;
+ struct nlmsghdr *nlh =
nlmsg_hdr(skb)
;
struct ecryptfs_message *msg = NLMSG_DATA(nlh);
int rc;
struct ecryptfs_message *msg = NLMSG_DATA(nlh);
int rc;
@@
-107,8
+107,8
@@
static int ecryptfs_process_nl_response(struct sk_buff *skb)
"incorrectly specified data length\n");
goto out;
}
"incorrectly specified data length\n");
goto out;
}
- rc = ecryptfs_process_response(msg, NETLINK_CREDS(skb)->
p
id,
- nlh->nlmsg_seq);
+ rc = ecryptfs_process_response(msg, NETLINK_CREDS(skb)->
u
id,
+
NETLINK_CREDS(skb)->pid,
nlh->nlmsg_seq);
if (rc)
printk(KERN_ERR
"Error processing response message; rc = [%d]\n", rc);
if (rc)
printk(KERN_ERR
"Error processing response message; rc = [%d]\n", rc);
@@
-181,7
+181,7
@@
receive:
"rc = [%d]\n", rc);
return;
}
"rc = [%d]\n", rc);
return;
}
- nlh =
(struct nlmsghdr *)skb->data
;
+ nlh =
nlmsg_hdr(skb)
;
if (!NLMSG_OK(nlh, skb->len)) {
ecryptfs_printk(KERN_ERR, "Received corrupt netlink "
"message\n");
if (!NLMSG_OK(nlh, skb->len)) {
ecryptfs_printk(KERN_ERR, "Received corrupt netlink "
"message\n");
@@
-229,7
+229,7
@@
int ecryptfs_init_netlink(void)
ecryptfs_nl_sock = netlink_kernel_create(NETLINK_ECRYPTFS, 0,
ecryptfs_receive_nl_message,
ecryptfs_nl_sock = netlink_kernel_create(NETLINK_ECRYPTFS, 0,
ecryptfs_receive_nl_message,
- THIS_MODULE);
+
NULL,
THIS_MODULE);
if (!ecryptfs_nl_sock) {
rc = -EIO;
ecryptfs_printk(KERN_ERR, "Failed to create netlink socket\n");
if (!ecryptfs_nl_sock) {
rc = -EIO;
ecryptfs_printk(KERN_ERR, "Failed to create netlink socket\n");