cifs: throw a warning if negotiate or sess_setup ops are passed NULL server or session pointers
These look pretty cargo-culty to me, but let's be certain. Leave them in place for now. Pop a WARN if it ever does happen. Also, move to a more standard idiom for setting the "server" pointer. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
Этот коммит содержится в:

коммит произвёл
Steve French

родитель
7d06645969
Коммит
3534b8508e
@@ -576,8 +576,10 @@ CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses,
|
||||
u16 blob_len;
|
||||
char *ntlmsspblob = NULL;
|
||||
|
||||
if (ses == NULL)
|
||||
if (ses == NULL) {
|
||||
WARN(1, "%s: ses == NULL!", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
type = ses->server->secType;
|
||||
cifs_dbg(FYI, "sess setup type %d\n", type);
|
||||
|
Ссылка в новой задаче
Block a user