* [PATCH net-next 4/5] X25 remove bkl from causediag ioctls
@ 2010-11-25 12:18 Andrew Hendry
2010-11-28 19:13 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Hendry @ 2010-11-25 12:18 UTC (permalink / raw)
To: netdev
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
---
net/x25/af_x25.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index e2eea0a..8cfc419 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -1538,23 +1538,22 @@ out_dtefac_release:
}
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;
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next 4/5] X25 remove bkl from causediag ioctls
2010-11-25 12:18 [PATCH net-next 4/5] X25 remove bkl from causediag ioctls Andrew Hendry
@ 2010-11-28 19:13 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-11-28 19:13 UTC (permalink / raw)
To: andrew.hendry; +Cc: netdev
From: Andrew Hendry <andrew.hendry@gmail.com>
Date: Thu, 25 Nov 2010 23:18:43 +1100
>
> Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-28 19:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-25 12:18 [PATCH net-next 4/5] X25 remove bkl from causediag ioctls Andrew Hendry
2010-11-28 19:13 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).