Skip to content

Commit

Permalink
Merge branch 'rxrpc-fixes-for-af_rxrpc'
Browse files Browse the repository at this point in the history
David Howells says:

====================
rxrpc: Fixes for AF_RXRPC

Here are a couple of fixes for the AF_RXRPC changes[1] in net-next.

 (1) Fix a runtime warning introduced by a patch that changed how
     page_frag_alloc_align() works.

 (2) Fix an is-NULL vs IS_ERR error handling bug.

The patches are tagged here:

	git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags/rxrpc-iothread-20240312

And can be found on this branch:

	http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-iothread

Link: https://lore.kernel.org/r/20240306000655.1100294-1-dhowells@redhat.com/ [1]
====================

Link: https://lore.kernel.org/r/20240312233723.2984928-1-dhowells@redhat.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Paolo Abeni committed Mar 14, 2024
2 parents ddbec99 + 89e4354 commit 7278c70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions net/rxrpc/sendmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ static int rxrpc_send_data(struct rxrpc_sock *rx,
*/
remain = more ? INT_MAX : msg_data_left(msg);
txb = call->conn->security->alloc_txbuf(call, remain, sk->sk_allocation);
if (IS_ERR(txb)) {
ret = PTR_ERR(txb);
if (!txb) {
ret = -ENOMEM;
goto maybe_error;
}
}
Expand Down
4 changes: 2 additions & 2 deletions net/rxrpc/txbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ struct rxrpc_txbuf *rxrpc_alloc_data_txbuf(struct rxrpc_call *call, size_t data_
total = hoff + sizeof(*whdr) + data_size;

mutex_lock(&call->conn->tx_data_alloc_lock);
buf = page_frag_alloc_align(&call->conn->tx_data_alloc, total, gfp,
~(data_align - 1) & ~(L1_CACHE_BYTES - 1));
buf = __page_frag_alloc_align(&call->conn->tx_data_alloc, total, gfp,
~(data_align - 1) & ~(L1_CACHE_BYTES - 1));
mutex_unlock(&call->conn->tx_data_alloc_lock);
if (!buf) {
kfree(txb);
Expand Down

0 comments on commit 7278c70

Please sign in to comment.