mirror of
https://github.com/torvalds/linux.git
synced 2024-09-20 06:53:04 +00:00
rxrpc: Fix error check on ->alloc_txbuf()
rxrpc_alloc_*_txbuf() and ->alloc_txbuf() return NULL to indicate no
memory, but rxrpc_send_data() uses IS_ERR().
Fix rxrpc_send_data() to check for NULL only and set -ENOMEM if it sees
that.
Fixes: 49489bb03a
("rxrpc: Do zerocopy using MSG_SPLICE_PAGES and page frags")
Signed-off-by: David Howells <dhowells@redhat.com>
Reported-by: Marc Dionne <marc.dionne@auristor.com>
cc: "David S. Miller" <davem@davemloft.net>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: linux-afs@lists.infradead.org
cc: netdev@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
6b2536462f
commit
89e4354110
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user