Commit 7278c70a authored by Paolo Abeni's avatar Paolo Abeni

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.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parents ddbec99f 89e43541
......@@ -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;
}
}
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment