* [PATCH] afs: Add missing init for srx_service member
@ 2025-01-30 21:39 Cyrill Gorcunov
0 siblings, 0 replies; only message in thread
From: Cyrill Gorcunov @ 2025-01-30 21:39 UTC (permalink / raw)
To: LKML, linux-afs; +Cc: David Howells, Marc Dionne
Both afs_merge_fs_addr4 and afs_merge_fs_addr6 helpers allocate
sockaddr_rxrpc structure on kernel stack and never init srx_service
member before passing it down for peer lookup/creation. Looks
insignificant in current context but better be on a safe side for
future use. Thus initialize them explicitly.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Marc Dionne <marc.dionne@auristor.com>
---
fs/afs/addr_list.c | 2 ++
1 file changed, 2 insertions(+)
Index: linux-tip.git/fs/afs/addr_list.c
===================================================================
--- linux-tip.git.orig/fs/afs/addr_list.c
+++ linux-tip.git/fs/afs/addr_list.c
@@ -291,6 +291,7 @@ int afs_merge_fs_addr4(struct afs_net *n
return 0;
srx.srx_family = AF_RXRPC;
+ srx.srx_service = 0;
srx.transport_type = SOCK_DGRAM;
srx.transport_len = sizeof(srx.transport.sin);
srx.transport.sin.sin_family = AF_INET;
@@ -335,6 +336,7 @@ int afs_merge_fs_addr6(struct afs_net *n
return 0;
srx.srx_family = AF_RXRPC;
+ srx.srx_service = 0;
srx.transport_type = SOCK_DGRAM;
srx.transport_len = sizeof(srx.transport.sin6);
srx.transport.sin6.sin6_family = AF_INET6;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-01-30 21:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-30 21:39 [PATCH] afs: Add missing init for srx_service member Cyrill Gorcunov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox