aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2024-03-14 13:09:53 +0100
committerPaolo Abeni <pabeni@redhat.com>2024-03-14 13:09:53 +0100
commit7278c70ab74956462d30ebe7b5506c5dd0b4b19c (patch)
tree6a9e4f74e7e9eb3d454c285e7fcf4b0581159680
parentddbec99f58571301679addbc022256970ca3eac6 (diff)
parent89e4354110ca64bf4949cca83b55149bc80733bc (diff)
downloadlinux-can-7278c70ab74956462d30ebe7b5506c5dd0b4b19c.tar.gz
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>
-rw-r--r--net/rxrpc/sendmsg.c4
-rw-r--r--net/rxrpc/txbuf.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c
index 6f765768c49c5..894b8fa68e5e9 100644
--- a/net/rxrpc/sendmsg.c
+++ b/net/rxrpc/sendmsg.c
@@ -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;
}
}
diff --git a/net/rxrpc/txbuf.c b/net/rxrpc/txbuf.c
index b2a82ab756c24..e0679658d9de0 100644
--- a/net/rxrpc/txbuf.c
+++ b/net/rxrpc/txbuf.c
@@ -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);