Commit 0ed9bc09 authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds

[PATCH] Fix Oops due to use of incorrect km_type in RPC socket code...

The following has been vetted with davem w.r.t. the change to
KM_SKB_DATA. Apologies for the bug...

include/asm-*/kmap_types.h:
   Replace the unused km_type slot KM_SKB_DATA with
   KM_SKB_SUNRPC_DATA.

net/sunrpc/xdr.c:
   Replace the use of KM_USER0 with KM_SKB_SUNRPC_DATA for copying
   data from an skb into the page cache when in the sk->data_ready()
   callback.
parent 8e9c3ec4
......@@ -11,7 +11,7 @@
enum km_type {
D(0) KM_BOUNCE_READ,
D(1) KM_SKB_DATA,
D(1) KM_SKB_SUNRPC_DATA,
D(2) KM_SKB_DATA_SOFTIRQ,
D(3) KM_USER0,
D(4) KM_USER1,
......
......@@ -7,7 +7,7 @@
enum km_type {
KM_BOUNCE_READ,
KM_SKB_DATA,
KM_SKB_SUNRPC_DATA,
KM_SKB_DATA_SOFTIRQ,
KM_USER0,
KM_USER1,
......
......@@ -3,7 +3,7 @@
enum km_type {
KM_BOUNCE_READ,
KM_SKB_DATA,
KM_SKB_SUNRPC_DATA,
KM_SKB_DATA_SOFTIRQ,
KM_USER0,
KM_USER1,
......
......@@ -3,7 +3,7 @@
enum km_type {
KM_BOUNCE_READ,
KM_SKB_DATA,
KM_SKB_SUNRPC_DATA,
KM_SKB_DATA_SOFTIRQ,
KM_USER0,
KM_USER1,
......
......@@ -290,7 +290,7 @@ xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base,
char *kaddr;
len = PAGE_CACHE_SIZE;
kaddr = kmap_atomic(*ppage, KM_USER0);
kaddr = kmap_atomic(*ppage, KM_SKB_SUNRPC_DATA);
if (base) {
len -= base;
if (pglen < len)
......@@ -302,7 +302,7 @@ xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base,
len = pglen;
ret = copy_actor(desc, kaddr, len);
}
kunmap_atomic(kaddr, KM_USER0);
kunmap_atomic(kaddr, KM_SKB_SUNRPC_DATA);
if (ret != len || !desc->count)
return;
ppage++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment