Skip to content

Commit 7278c70

Browse files
author
Paolo Abeni
committed
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>
2 parents ddbec99 + 89e4354 commit 7278c70

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

net/rxrpc/sendmsg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ static int rxrpc_send_data(struct rxrpc_sock *rx,
349349
*/
350350
remain = more ? INT_MAX : msg_data_left(msg);
351351
txb = call->conn->security->alloc_txbuf(call, remain, sk->sk_allocation);
352-
if (IS_ERR(txb)) {
353-
ret = PTR_ERR(txb);
352+
if (!txb) {
353+
ret = -ENOMEM;
354354
goto maybe_error;
355355
}
356356
}

net/rxrpc/txbuf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ struct rxrpc_txbuf *rxrpc_alloc_data_txbuf(struct rxrpc_call *call, size_t data_
3333
total = hoff + sizeof(*whdr) + data_size;
3434

3535
mutex_lock(&call->conn->tx_data_alloc_lock);
36-
buf = page_frag_alloc_align(&call->conn->tx_data_alloc, total, gfp,
37-
~(data_align - 1) & ~(L1_CACHE_BYTES - 1));
36+
buf = __page_frag_alloc_align(&call->conn->tx_data_alloc, total, gfp,
37+
~(data_align - 1) & ~(L1_CACHE_BYTES - 1));
3838
mutex_unlock(&call->conn->tx_data_alloc_lock);
3939
if (!buf) {
4040
kfree(txb);

0 commit comments

Comments
 (0)