Skip to content

Commit 5e6391d

Browse files
committed
Merge branch 'rxrpc-miscellaneous-fixes'
David Howells says: ==================== rxrpc: Miscellaneous fixes Here are some fixes for rxrpc, as found by Sashiko[1]: (1) Fix rxrpc_input_call_event() to only unshare DATA packets. (2) Fix re-decryption of RESPONSE packets where a partially decrypted skbuff gets requeued if there was a failure due to ENOMEM. (3) Fix error handling in rxgk_extract_token() where the ENOMEM case is unhandled. Link: https://sashiko.dev/#/patchset/[email protected] [1] ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 27ae4bc + 3476c8b commit 5e6391d

4 files changed

Lines changed: 5 additions & 14 deletions

File tree

include/trace/events/rxrpc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@
285285
EM(rxrpc_conn_put_unidle, "PUT unidle ") \
286286
EM(rxrpc_conn_put_work, "PUT work ") \
287287
EM(rxrpc_conn_queue_challenge, "QUE chall ") \
288-
EM(rxrpc_conn_queue_retry_work, "QUE retry-wk") \
289288
EM(rxrpc_conn_queue_rx_work, "QUE rx-work ") \
290289
EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \
291290
EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \

net/rxrpc/call_event.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ bool rxrpc_input_call_event(struct rxrpc_call *call)
332332

333333
saw_ack |= sp->hdr.type == RXRPC_PACKET_TYPE_ACK;
334334

335-
if (sp->hdr.securityIndex != 0 &&
335+
if (sp->hdr.type == RXRPC_PACKET_TYPE_DATA &&
336+
sp->hdr.securityIndex != 0 &&
336337
skb_cloned(skb)) {
337338
/* Unshare the packet so that it can be
338339
* modified by in-place decryption.

net/rxrpc/conn_event.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,6 @@ void rxrpc_process_delayed_final_acks(struct rxrpc_connection *conn, bool force)
389389
static void rxrpc_do_process_connection(struct rxrpc_connection *conn)
390390
{
391391
struct sk_buff *skb;
392-
int ret;
393392

394393
if (test_and_clear_bit(RXRPC_CONN_EV_CHALLENGE, &conn->events))
395394
rxrpc_secure_connection(conn);
@@ -398,17 +397,8 @@ static void rxrpc_do_process_connection(struct rxrpc_connection *conn)
398397
* connection that each one has when we've finished with it */
399398
while ((skb = skb_dequeue(&conn->rx_queue))) {
400399
rxrpc_see_skb(skb, rxrpc_skb_see_conn_work);
401-
ret = rxrpc_process_event(conn, skb);
402-
switch (ret) {
403-
case -ENOMEM:
404-
case -EAGAIN:
405-
skb_queue_head(&conn->rx_queue, skb);
406-
rxrpc_queue_conn(conn, rxrpc_conn_queue_retry_work);
407-
break;
408-
default:
409-
rxrpc_free_skb(skb, rxrpc_skb_put_conn_work);
410-
break;
411-
}
400+
rxrpc_process_event(conn, skb);
401+
rxrpc_free_skb(skb, rxrpc_skb_put_conn_work);
412402
}
413403
}
414404

net/rxrpc/rxgk_app.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ int rxgk_extract_token(struct rxrpc_connection *conn, struct sk_buff *skb,
245245
if (ret != -ENOMEM)
246246
return rxrpc_abort_conn(conn, skb, ec, ret,
247247
rxgk_abort_resp_tok_dec);
248+
return ret;
248249
}
249250

250251
ret = conn->security->default_decode_ticket(conn, skb, ticket_offset,

0 commit comments

Comments
 (0)