Message ID | 168321392193.16695.5713194659624553982.stgit@oracle-102.nfsv4bat.org (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Bug fixes for net/handshake | expand |
On Thu, May 04, 2023 at 11:25:32AM -0400, Chuck Lever wrote: > From: Chuck Lever <chuck.lever@oracle.com> > > trace_handshake_cmd_done_err() simply records the pointer in @req, > so initializing it to NULL is sufficient and safe. > > Reported-by: Dan Carpenter <dan.carpenter@linaro.org> > Fixes: 3b3009ea8abb ("net/handshake: Create a NETLINK service for handling handshake requests") > Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Simon Horman <simon.horman@corigine.com>
diff --git a/net/handshake/netlink.c b/net/handshake/netlink.c index 3508bc3e661d..8c2d13190314 100644 --- a/net/handshake/netlink.c +++ b/net/handshake/netlink.c @@ -152,8 +152,8 @@ int handshake_nl_accept_doit(struct sk_buff *skb, struct genl_info *info) int handshake_nl_done_doit(struct sk_buff *skb, struct genl_info *info) { struct net *net = sock_net(skb->sk); + struct handshake_req *req = NULL; struct socket *sock = NULL; - struct handshake_req *req; int fd, status, err; if (GENL_REQ_ATTR_CHECK(info, HANDSHAKE_A_DONE_SOCKFD))