Skip to content

Commit 7888da9

Browse files
Dan Carpenterdhowells
authored andcommitted
afs: Potential uninitialized variable in afs_extract_data()
Smatch warns that: fs/afs/rxrpc.c:922 afs_extract_data() error: uninitialized symbol 'remote_abort'. Smatch is right that "remote_abort" might be uninitialized when we pass it to afs_set_call_complete(). I don't know if that function uses the uninitialized variable. Anyway, the comment for rxrpc_kernel_recv_data(), says that "*_abort should also be initialised to 0." and this patch does that. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David Howells <dhowells@redhat.com>
1 parent 9880150 commit 7888da9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/afs/rxrpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ int afs_extract_data(struct afs_call *call, void *buf, size_t count,
885885
{
886886
struct afs_net *net = call->net;
887887
enum afs_call_state state;
888-
u32 remote_abort;
888+
u32 remote_abort = 0;
889889
int ret;
890890

891891
_enter("{%s,%zu},,%zu,%d",

0 commit comments

Comments
 (0)