[lkml]   [2003]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRace in svcsock.c in 2.5.61

Hi Neil,

knfsd needs to disable soft interrupts when calling

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.


--- 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);
return 0;
+ local_bh_enable();
skb_free_datagram(svsk->sk_sk, skb);
} else {
/* we can use it in-place */
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 13:33    [W:0.022 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site