Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224512
b: refs/heads/master
c: 5b7958d
h: refs/heads/master
v: v3
  • Loading branch information
andrew hendry authored and David S. Miller committed Nov 28, 2010
1 parent 44fef57 commit 9c44788
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f90de660678cf553f63c387945830a2e4d26dd3e
refs/heads/master: 5b7958dfa5db758e36e92e1790075b470b4947f8
14 changes: 7 additions & 7 deletions trunk/net/x25/af_x25.c
Original file line number Diff line number Diff line change
Expand Up @@ -1512,27 +1512,27 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
}

case SIOCX25GCALLUSERDATA: {
struct x25_calluserdata cud = x25->calluserdata;
lock_kernel();
rc = copy_to_user(argp, &cud,
sizeof(cud)) ? -EFAULT : 0;
unlock_kernel();
lock_sock(sk);
rc = copy_to_user(argp, &x25->calluserdata,
sizeof(x25->calluserdata))
? -EFAULT : 0;
release_sock(sk);
break;
}

case SIOCX25SCALLUSERDATA: {
struct x25_calluserdata calluserdata;

rc = -EFAULT;
lock_kernel();
if (copy_from_user(&calluserdata, argp,
sizeof(calluserdata)))
break;
rc = -EINVAL;
if (calluserdata.cudlength > X25_MAX_CUD_LEN)
break;
lock_sock(sk);
x25->calluserdata = calluserdata;
unlock_kernel();
release_sock(sk);
rc = 0;
break;
}
Expand Down

0 comments on commit 9c44788

Please sign in to comment.