Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 193cc89e authored by Steve French's avatar Steve French
Browse files

cifs: fix potential null pointer use in destroy_workqueue in init_cifs error path

Dan Carpenter reported a Smack static checker warning:
   fs/smb/client/cifsfs.c:1981 init_cifs()
   error: we previously assumed 'serverclose_wq' could be null (see line 1895)

The patch which introduced the serverclose workqueue used the wrong
oredering in error paths in init_cifs() for freeing it on errors.

Fixes: 173217bd

 ("smb3: retrying on failed server close")
Cc: stable@vger.kernel.org
Cc: Ritvik Budhiraja <rbudhiraja@microsoft.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarDavid Howells <dhowell@redhat.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 33c9de29
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment