Commit 433dc24f authored by Steve French's avatar Steve French Committed by Linus Torvalds

[PATCH] cifs: remove cifs_kcalloc and check for NULL return on kcalloc in session initialization

Suggested by: Adrian Bunk and Dave Miller

Signed-off-by: Steve French (sfrench@us.ibm.com)
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 099a58f6
......@@ -89,6 +89,12 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
list_for_each(tmp, &GlobalSMBSessionList) {
i++;
ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList);
if((ses->serverDomain == NULL) || (ses->serverOS == NULL) ||
(ses->serverNOS == NULL)) {
buf += sprintf("\nentry for %s not fully displayed\n\t",
ses->serverName);
} else {
length =
sprintf(buf,
"\n%d) Name: %s Domain: %s Mounts: %d ServerOS: %s \n\tServerNOS: %s\tCapabilities: 0x%x\n\tSMB session status: %d\t",
......@@ -97,6 +103,7 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
ses->serverOS, ses->serverNOS,
ses->capabilities,ses->status);
buf += length;
}
if(ses->server) {
buf += sprintf(buf, "TCP status: %d\n\tLocal Users To Server: %d SecMode: 0x%x Req Active: %d",
ses->server->tcpStatus,
......
This diff is collapsed.
Markdown is supported
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