* Race in svcsock.c in 2.5.61
@ 2003-02-17 14:40 Trond Myklebust
0 siblings, 0 replies; only message in thread
From: Trond Myklebust @ 2003-02-17 14:40 UTC (permalink / raw)
To: Neil Brown; +Cc: Linux Kernel
Hi Neil,
knfsd needs to disable soft interrupts when calling
csum_partial_copy_to_xdr().
At the moment there's a nasty conflict between the RPC server and
client. The problem arises when you get to xdr_partial_copy_from_skb()
(and the kmap_atomic()); the RPC client can end up calling the same
function from a ->data_ready() soft interrupt, and corrupt any data
the knfsd process may have copied.
Cheers,
Trond
--- linux-2.5.61-up/net/sunrpc/svcsock.c.orig 2003-01-11 02:00:08.000000000 +0100
+++ linux-2.5.61-up/net/sunrpc/svcsock.c 2003-02-17 15:04:07.000000000 +0100
@@ -577,12 +577,15 @@
if (skb_is_nonlinear(skb)) {
/* we have to copy */
+ local_bh_disable();
if (csum_partial_copy_to_xdr(&rqstp->rq_arg, skb)) {
+ local_bh_enable();
/* checksum error */
skb_free_datagram(svsk->sk_sk, skb);
svc_sock_received(svsk);
return 0;
}
+ local_bh_enable();
skb_free_datagram(svsk->sk_sk, skb);
} else {
/* we can use it in-place */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-02-17 14:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-17 14:40 Race in svcsock.c in 2.5.61 Trond Myklebust
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®