aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2015-05-11 14:39:59 +0530
committerAmit Pundir <amit.pundir@linaro.org>2015-05-11 14:54:29 +0530
commitbf3015849c3e9e7befda3f877e7646756b5925ee (patch)
tree962f5530631e51aa65fbd3c09c3e02d96761935f /net
parent7cf5e6fb3a5ad78072e2a6eea041667cadca8676 (diff)
downloadlinux-linaro-stable-bf3015849c3e9e7befda3f877e7646756b5925ee.tar.gz
nf: IDLETIMER: Fix broken uid field in the msg
Create uid from kuid to fix the broken uid field in the message notifications introduced in Change-Id: I18fc73eada512e370d7ab24fc9f890845037b729, Otherwise we run into following build error: --------------- CC net/netfilter/xt_IDLETIMER.o net/netfilter/xt_IDLETIMER.c: In function ‘reset_timer’: net/netfilter/xt_IDLETIMER.c:360:16: error: incompatible types when assigning to type ‘uid_t’ from type ‘kuid_t’ make[2]: *** [net/netfilter/xt_IDLETIMER.o] Error 1 --------------- Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/xt_IDLETIMER.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c
index ddf77f7fbe24..31f76cd19d39 100644
--- a/net/netfilter/xt_IDLETIMER.c
+++ b/net/netfilter/xt_IDLETIMER.c
@@ -353,12 +353,8 @@ static void reset_timer(const struct idletimer_tg_info *info,
/* Stores the uid resposible for waking up the radio */
if (skb && (skb->sk)) {
- struct sock *sk = skb->sk;
- read_lock_bh(&sk->sk_callback_lock);
- if ((sk->sk_socket) && (sk->sk_socket->file) &&
- (sk->sk_socket->file->f_cred))
- timer->uid = sk->sk_socket->file->f_cred->uid;
- read_unlock_bh(&sk->sk_callback_lock);
+ timer->uid = from_kuid_munged(current_user_ns(),
+ sock_i_uid(skb->sk));
}
/* checks if there is a pending inactive notification*/