Fix afs_deliver_cb_init_call_back_state3() and afs_deliver_cb_probe_uuid()
to pass back -EAGAIN when returned afs_extract_data() as that indicates
that more data is needed.
Fixes: d001648ec7cf ("rxrpc: Don't expose skbs to in-kernel users [ver #2]")
Fixes: 9396d496d745 ("afs: support the CB.ProbeUuid RPC op")
Closes: https://sashiko.dev/#/patchset/20260702144919.172295-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: "David S. Miller" <davem@davemloft.net>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: stable@kernel.org
---
fs/afs/cmservice.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c
index d579a665e3da..3c12a0ecee8e 100644
--- a/fs/afs/cmservice.c
+++ b/fs/afs/cmservice.c
@@ -332,11 +332,8 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call)
case 1:
_debug("extract UUID");
ret = afs_extract_data(call, false);
- switch (ret) {
- case 0: break;
- case -EAGAIN: return 0;
- default: return ret;
- }
+ if (ret < 0)
+ return ret;
_debug("unmarshall UUID");
call->request = kmalloc_obj(struct afs_uuid);@@ -450,11 +447,8 @@ static int afs_deliver_cb_probe_uuid(struct afs_call *call)
case 1:
_debug("extract UUID");
ret = afs_extract_data(call, false);
- switch (ret) {
- case 0: break;
- case -EAGAIN: return 0;
- default: return ret;
- }
+ if (ret < 0)
+ return ret;
_debug("unmarshall UUID");
call->request = kmalloc_obj(struct afs_uuid);