summaryrefslogtreecommitdiff
path: root/scripts/bpf_helpers_doc.py
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2018-10-24 04:50:33 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-14 00:02:40 +0300
commitb4d965a37d89cd8611984ea16c85903d01ac967a (patch)
tree9944f669a245ff47e0a6eba576f78d87d80279a0 /scripts/bpf_helpers_doc.py
parente5d7b94cc435f0532d26a45166cc85e8ee15f314 (diff)
downloadlinux-b4d965a37d89cd8611984ea16c85903d01ac967a.tar.xz
cifs: allow calling SMB2_xxx_free(NULL)
commit 32a1fb36f6e50183871c2c1fcf5493c633e84732 upstream. Change these free functions to allow passing NULL as the argument and treat it as a no-op just like free(NULL) would. Or, if rqst->rq_iov is NULL. The second scenario could happen for smb2_queryfs() if the call to SMB2_query_info_init() fails and we go to qfs_exit to clean up and free all resources. In that case we have not yet assigned rqst[2].rq_iov and thus the rq_iov dereference in SMB2_close_free() will cause a NULL pointer dereference. [ bp: upstream patch also fixes SMB2_set_info_free which was introduced in 4.20 ] Fixes: 1eb9fb52040f ("cifs: create SMB2_open_init()/SMB2_open_free() helpers") Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Aurelien Aptel <aaptel@suse.com> CC: Stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
0 files changed, 0 insertions, 0 deletions