aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto/mpi/mpiutil.c
diff options
context:
space:
mode:
authorSu Hui <suhui@nfschina.com>2024-08-08 20:23:32 +0800
committerSteve French <stfrench@microsoft.com>2024-08-15 15:32:30 -0500
commit74c2ab6d653b4c2354df65a7f7f2df1925a40a51 (patch)
tree7023b5c25ac30814e680d9a8863f4bac9bce535e /lib/crypto/mpi/mpiutil.c
parent7c626ce4bae1ac14f60076d00eafe71af30450ba (diff)
smb/client: avoid possible NULL dereference in cifs_free_subrequest()
Clang static checker (scan-build) warning: cifsglob.h:line 890, column 3 Access to field 'ops' results in a dereference of a null pointer. Commit 519be989717c ("cifs: Add a tracepoint to track credits involved in R/W requests") adds a check for 'rdata->server', and let clang throw this warning about NULL dereference. When 'rdata->credits.value != 0 && rdata->server == NULL' happens, add_credits_and_wake_if() will call rdata->server->ops->add_credits(). This will cause NULL dereference problem. Add a check for 'rdata->server' to avoid NULL dereference. Cc: stable@vger.kernel.org Fixes: 69c3c023af25 ("cifs: Implement netfslib hooks") Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Su Hui <suhui@nfschina.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'lib/crypto/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions