aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifs_debug.c
diff options
context:
space:
mode:
authorSteve French <smfrench@austin.rr.com>2005-04-28 22:41:08 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-28 22:41:08 -0700
commit433dc24f24b409fb130f638aa85470a0eb666206 (patch)
treec64f3c478297b38361f91fea0609fb4fbedaffaf /fs/cifs/cifs_debug.c
parent099a58f681ed951434574ec39bdfe87055bafe73 (diff)
[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: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/cifs/cifs_debug.c')
-rw-r--r--fs/cifs/cifs_debug.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index bff2ec6e054..4061e43471c 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -89,14 +89,21 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
list_for_each(tmp, &GlobalSMBSessionList) {
i++;
ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList);
- 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",
+ 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",
i, ses->serverName, ses->serverDomain,
atomic_read(&ses->inUse),
ses->serverOS, ses->serverNOS,
ses->capabilities,ses->status);
- buf += length;
+ 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,