Commit 1ecd66bf authored by andrew hendry's avatar andrew hendry Committed by David S. Miller

X25: remove bkl in timestamp ioctls

Signed-off-by: default avatarAndrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 70be998c
...@@ -1387,19 +1387,15 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -1387,19 +1387,15 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case SIOCGSTAMP: case SIOCGSTAMP:
rc = -EINVAL; rc = -EINVAL;
lock_kernel();
if (sk) if (sk)
rc = sock_get_timestamp(sk, rc = sock_get_timestamp(sk,
(struct timeval __user *)argp); (struct timeval __user *)argp);
unlock_kernel();
break; break;
case SIOCGSTAMPNS: case SIOCGSTAMPNS:
rc = -EINVAL; rc = -EINVAL;
lock_kernel();
if (sk) if (sk)
rc = sock_get_timestampns(sk, rc = sock_get_timestampns(sk,
(struct timespec __user *)argp); (struct timespec __user *)argp);
unlock_kernel();
break; break;
case SIOCGIFADDR: case SIOCGIFADDR:
case SIOCSIFADDR: case SIOCSIFADDR:
...@@ -1689,19 +1685,15 @@ static int compat_x25_ioctl(struct socket *sock, unsigned int cmd, ...@@ -1689,19 +1685,15 @@ static int compat_x25_ioctl(struct socket *sock, unsigned int cmd,
break; break;
case SIOCGSTAMP: case SIOCGSTAMP:
rc = -EINVAL; rc = -EINVAL;
lock_kernel();
if (sk) if (sk)
rc = compat_sock_get_timestamp(sk, rc = compat_sock_get_timestamp(sk,
(struct timeval __user*)argp); (struct timeval __user*)argp);
unlock_kernel();
break; break;
case SIOCGSTAMPNS: case SIOCGSTAMPNS:
rc = -EINVAL; rc = -EINVAL;
lock_kernel();
if (sk) if (sk)
rc = compat_sock_get_timestampns(sk, rc = compat_sock_get_timestampns(sk,
(struct timespec __user*)argp); (struct timespec __user*)argp);
unlock_kernel();
break; break;
case SIOCGIFADDR: case SIOCGIFADDR:
case SIOCSIFADDR: case SIOCSIFADDR:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment