Merge branch 'rxrpc-fixes-for-af_rxrpc'

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>
This commit is contained in:
Paolo Abeni 2024-03-14 13:09:53 +01:00
commit 7278c70ab7
2 changed files with 4 additions and 4 deletions

View File

@ -349,8 +349,8 @@ reload:
*/
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;
}
}

View File

@ -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);