]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: fix compilation after memory mapped patches
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Wed, 24 Apr 2013 08:36:23 +0000 (10:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Apr 2013 18:26:55 +0000 (14:26 -0400)
commit49498dc3136540db1d4c1bba6ae192b13fbe1e79
tree3e9e3815e8a7becbe26ce0cd9e46440d2ddceef7
parentc9ddbff980f5a284292c6a84dc6e3692c8fd5331
netlink: fix compilation after memory mapped patches

Depending of the kernel configuration (CONFIG_UIDGID_STRICT_TYPE_CHECKS), we can
get the following errors:

net/netlink/af_netlink.c: In function ‘netlink_queue_mmaped_skb’:
net/netlink/af_netlink.c:663:14: error: incompatible types when assigning to type ‘__u32’ from type ‘kuid_t’
net/netlink/af_netlink.c:664:14: error: incompatible types when assigning to type ‘__u32’ from type ‘kgid_t’
net/netlink/af_netlink.c: In function ‘netlink_ring_set_copied’:
net/netlink/af_netlink.c:693:14: error: incompatible types when assigning to type ‘__u32’ from type ‘kuid_t’
net/netlink/af_netlink.c:694:14: error: incompatible types when assigning to type ‘__u32’ from type ‘kgid_t’

We must use the helpers to get the uid and gid, and also take care of user_ns.

Fix suggested by Eric W. Biederman <ebiederm@xmission.com>.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/af_netlink.c