diff options
author | David S. Miller <davem@davemloft.net> | 2016-10-14 10:44:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-14 10:44:45 -0400 |
commit | f1f081cef09697d97f20ea6b8b545b1b61613880 (patch) | |
tree | 7bd5627657f8bafe32117ece705b8aa5e33e6092 /fs | |
parent | f56f7d2e1cbe6a34dbda177d4d6245d8f8cb94bd (diff) | |
parent | 50a2c95381a7d0e453d7bdfde81d0c5f8351ba54 (diff) |
Merge tag 'rxrpc-rewrite-20161013' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
David Howells says:
====================
rxrpc: Fixes
This set of patches contains a bunch of fixes:
(1) Fix use of kunmap() after change from kunmap_atomic() within AFS.
(2) Don't use of ERR_PTR() with an always zero value.
(3) Check the right error when using ip6_route_output().
(4) Be consistent about whether call->operation_ID is BE or CPU-E within
AFS.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/afs/cmservice.c | 6 | ||||
-rw-r--r-- | fs/afs/fsclient.c | 4 | ||||
-rw-r--r-- | fs/afs/internal.h | 2 | ||||
-rw-r--r-- | fs/afs/rxrpc.c | 3 |
4 files changed, 7 insertions, 8 deletions
diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index 2037e7a77a37..d764236072b1 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c | |||
@@ -91,11 +91,9 @@ static const struct afs_call_type afs_SRXCBTellMeAboutYourself = { | |||
91 | */ | 91 | */ |
92 | bool afs_cm_incoming_call(struct afs_call *call) | 92 | bool afs_cm_incoming_call(struct afs_call *call) |
93 | { | 93 | { |
94 | u32 operation_id = ntohl(call->operation_ID); | 94 | _enter("{CB.OP %u}", call->operation_ID); |
95 | 95 | ||
96 | _enter("{CB.OP %u}", operation_id); | 96 | switch (call->operation_ID) { |
97 | |||
98 | switch (operation_id) { | ||
99 | case CBCallBack: | 97 | case CBCallBack: |
100 | call->type = &afs_SRXCBCallBack; | 98 | call->type = &afs_SRXCBCallBack; |
101 | return true; | 99 | return true; |
diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c index 96f4d764d1a6..31c616ab9b40 100644 --- a/fs/afs/fsclient.c +++ b/fs/afs/fsclient.c | |||
@@ -364,7 +364,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call) | |||
364 | buffer = kmap(page); | 364 | buffer = kmap(page); |
365 | ret = afs_extract_data(call, buffer, | 365 | ret = afs_extract_data(call, buffer, |
366 | call->count, true); | 366 | call->count, true); |
367 | kunmap(buffer); | 367 | kunmap(page); |
368 | if (ret < 0) | 368 | if (ret < 0) |
369 | return ret; | 369 | return ret; |
370 | } | 370 | } |
@@ -397,7 +397,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call) | |||
397 | page = call->reply3; | 397 | page = call->reply3; |
398 | buffer = kmap(page); | 398 | buffer = kmap(page); |
399 | memset(buffer + call->count, 0, PAGE_SIZE - call->count); | 399 | memset(buffer + call->count, 0, PAGE_SIZE - call->count); |
400 | kunmap(buffer); | 400 | kunmap(page); |
401 | } | 401 | } |
402 | 402 | ||
403 | _leave(" = 0 [done]"); | 403 | _leave(" = 0 [done]"); |
diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 5497c8496055..535a38d2c1d0 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h | |||
@@ -112,7 +112,7 @@ struct afs_call { | |||
112 | bool need_attention; /* T if RxRPC poked us */ | 112 | bool need_attention; /* T if RxRPC poked us */ |
113 | u16 service_id; /* RxRPC service ID to call */ | 113 | u16 service_id; /* RxRPC service ID to call */ |
114 | __be16 port; /* target UDP port */ | 114 | __be16 port; /* target UDP port */ |
115 | __be32 operation_ID; /* operation ID for an incoming call */ | 115 | u32 operation_ID; /* operation ID for an incoming call */ |
116 | u32 count; /* count for use in unmarshalling */ | 116 | u32 count; /* count for use in unmarshalling */ |
117 | __be32 tmp; /* place to extract temporary data */ | 117 | __be32 tmp; /* place to extract temporary data */ |
118 | afs_dataversion_t store_version; /* updated version expected from store */ | 118 | afs_dataversion_t store_version; /* updated version expected from store */ |
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index 477928b25940..25f05a8d21b1 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c | |||
@@ -676,10 +676,11 @@ static int afs_deliver_cm_op_id(struct afs_call *call) | |||
676 | ASSERTCMP(call->offset, <, 4); | 676 | ASSERTCMP(call->offset, <, 4); |
677 | 677 | ||
678 | /* the operation ID forms the first four bytes of the request data */ | 678 | /* the operation ID forms the first four bytes of the request data */ |
679 | ret = afs_extract_data(call, &call->operation_ID, 4, true); | 679 | ret = afs_extract_data(call, &call->tmp, 4, true); |
680 | if (ret < 0) | 680 | if (ret < 0) |
681 | return ret; | 681 | return ret; |
682 | 682 | ||
683 | call->operation_ID = ntohl(call->tmp); | ||
683 | call->state = AFS_CALL_AWAIT_REQUEST; | 684 | call->state = AFS_CALL_AWAIT_REQUEST; |
684 | call->offset = 0; | 685 | call->offset = 0; |
685 | 686 | ||