Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224513
b: refs/heads/master
c: 74a7e44
h: refs/heads/master
i:
  224511: 44fef57
v: v3
  • Loading branch information
andrew hendry authored and David S. Miller committed Nov 28, 2010
1 parent 9c44788 commit 391f9f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 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: 5b7958dfa5db758e36e92e1790075b470b4947f8
refs/heads/master: 74a7e440807d34e586e9feb8e14851b5c80fbfe5
15 changes: 7 additions & 8 deletions trunk/net/x25/af_x25.c
Original file line number Diff line number Diff line change
Expand Up @@ -1538,23 +1538,22 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
}

case SIOCX25GCAUSEDIAG: {
struct x25_causediag causediag;
lock_kernel();
causediag = x25->causediag;
rc = copy_to_user(argp, &causediag,
sizeof(causediag)) ? -EFAULT : 0;
unlock_kernel();
lock_sock(sk);
rc = copy_to_user(argp, &x25->causediag,
sizeof(x25->causediag))
? -EFAULT : 0;
release_sock(sk);
break;
}

case SIOCX25SCAUSEDIAG: {
struct x25_causediag causediag;
rc = -EFAULT;
lock_kernel();
if (copy_from_user(&causediag, argp, sizeof(causediag)))
break;
lock_sock(sk);
x25->causediag = causediag;
unlock_kernel();
release_sock(sk);
rc = 0;
break;

Expand Down

0 comments on commit 391f9f9

Please sign in to comment.