RxRPC rewrite
-----BEGIN PGP SIGNATURE----- iQIVAwUAV/+wwfSw1s6N8H32AQLpVA/+NByreKyI8cHL1zgz816iTrzYbEP5Gbtw RI9TI5iweUa9ySe4PFQUw+VC0yaAP9brY8tTtss8KHk808Wu4xhlg8fAClOaZXwy WmHASdwnRaDWguEpPHyHRST+s9ZO/VD5vwGhREB/hojzdzd135bq1d6GKaHoLFx2 XDwDeyZc1z+aSzdMCoQuKJlqw9mfujsIOK5xZJ/h/JquYJ3iER55vdofettNCT+S hjueVBgWV988oORBtduPrfUYBbQI83QyiWl0xdo6QXWAoN784NfpVti8YAA9B7To qfup5aE6ky3LhuRD8GS00yWb96b43FGuPqt27LTH7SGnALX7KbETbBcgasyWqFeV UvPbVlk5R+0OXLxqOHvn20gRFS2c6HIdVAW6h7QHB0qwnLS1JJJToAczhK4QTsHQ eOXSGK4Gj0CiTd23bL7egaULKnD7eiZbagoty1UL05k8TAgPRnXXaMCRc0cupvKo 5Amk7xT7ZN1Iyh9TQSt2MRIBIG6AOJogsmjSqgKJZY4YdCD5rYAWyAzc7K2l/L0e oUwDaPFWwNAfVYxJIXSd223squyxaXen0B+NlY501tqw4Ce4NnuEssqsSWk6OTHZ R9HCT200HvvZthPOStP7rdFiQ6VRDH3aSdl3zU4ila7cxr4wfdVslShuj91OiLqI /7zodCmls/8= =7krl -----END PGP SIGNATURE----- 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>
This commit is contained in:
commit
f1f081cef0
|
@ -91,11 +91,9 @@ static const struct afs_call_type afs_SRXCBTellMeAboutYourself = {
|
|||
*/
|
||||
bool afs_cm_incoming_call(struct afs_call *call)
|
||||
{
|
||||
u32 operation_id = ntohl(call->operation_ID);
|
||||
_enter("{CB.OP %u}", call->operation_ID);
|
||||
|
||||
_enter("{CB.OP %u}", operation_id);
|
||||
|
||||
switch (operation_id) {
|
||||
switch (call->operation_ID) {
|
||||
case CBCallBack:
|
||||
call->type = &afs_SRXCBCallBack;
|
||||
return true;
|
||||
|
|
|
@ -364,7 +364,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)
|
|||
buffer = kmap(page);
|
||||
ret = afs_extract_data(call, buffer,
|
||||
call->count, true);
|
||||
kunmap(buffer);
|
||||
kunmap(page);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
@ -397,7 +397,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)
|
|||
page = call->reply3;
|
||||
buffer = kmap(page);
|
||||
memset(buffer + call->count, 0, PAGE_SIZE - call->count);
|
||||
kunmap(buffer);
|
||||
kunmap(page);
|
||||
}
|
||||
|
||||
_leave(" = 0 [done]");
|
||||
|
|
|
@ -112,7 +112,7 @@ struct afs_call {
|
|||
bool need_attention; /* T if RxRPC poked us */
|
||||
u16 service_id; /* RxRPC service ID to call */
|
||||
__be16 port; /* target UDP port */
|
||||
__be32 operation_ID; /* operation ID for an incoming call */
|
||||
u32 operation_ID; /* operation ID for an incoming call */
|
||||
u32 count; /* count for use in unmarshalling */
|
||||
__be32 tmp; /* place to extract temporary data */
|
||||
afs_dataversion_t store_version; /* updated version expected from store */
|
||||
|
|
|
@ -676,10 +676,11 @@ static int afs_deliver_cm_op_id(struct afs_call *call)
|
|||
ASSERTCMP(call->offset, <, 4);
|
||||
|
||||
/* the operation ID forms the first four bytes of the request data */
|
||||
ret = afs_extract_data(call, &call->operation_ID, 4, true);
|
||||
ret = afs_extract_data(call, &call->tmp, 4, true);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
call->operation_ID = ntohl(call->tmp);
|
||||
call->state = AFS_CALL_AWAIT_REQUEST;
|
||||
call->offset = 0;
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ struct rxrpc_call *rxrpc_new_client_call(struct rxrpc_sock *rx,
|
|||
goto error;
|
||||
|
||||
trace_rxrpc_call(call, rxrpc_call_connected, atomic_read(&call->usage),
|
||||
here, ERR_PTR(ret));
|
||||
here, NULL);
|
||||
|
||||
spin_lock_bh(&call->conn->params.peer->lock);
|
||||
hlist_add_head(&call->error_link,
|
||||
|
|
|
@ -193,8 +193,8 @@ static void rxrpc_assess_MTU_size(struct rxrpc_peer *peer)
|
|||
fl6->fl6_dport = htons(7001);
|
||||
fl6->fl6_sport = htons(7000);
|
||||
dst = ip6_route_output(&init_net, NULL, fl6);
|
||||
if (IS_ERR(dst)) {
|
||||
_leave(" [route err %ld]", PTR_ERR(dst));
|
||||
if (dst->error) {
|
||||
_leave(" [route err %d]", dst->error);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue