From: "Q (Igor Mammedov)" <niallain@gmail.com>
To: "Marcin Slusarz" <marcin.slusarz@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Steve French" <sfrench@samba.org>,
linux-cifs-client@lists.samba.org, stable@kernel.org
Subject: Re: [linux-cifs-client] [PATCH] cifs: fix oops on mount when CONFIG_CIFS_DFS_UPCALL is enabled
Date: Sun, 8 Jun 2008 15:28:23 +0400 [thread overview]
Message-ID: <71bff3710806080428n18c8e56dwcda54c5c9460d265@mail.gmail.com> (raw)
In-Reply-To: <20080607190055.GA5726@joi>
[-- Attachment #1: Type: text/plain, Size: 225 bytes --]
A quick look trough cifs_mount and cifs_parse_mount_options functions shows
that mount will fail anyway with error EINVAL when 'data' = NULL.
May be moving NULL check at the beginning of function will be better
in this case.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-CIFS-Fix-OOPs-when-data-is-NULL.patch --]
[-- Type: text/x-patch; name=0001-CIFS-Fix-OOPs-when-data-is-NULL.patch, Size: 769 bytes --]
From 83d523d13556e98283d0fe34394819f83368efb3 Mon Sep 17 00:00:00 2001
From: q <q@q-desktop.(none)>
Date: Sun, 8 Jun 2008 08:15:07 -0400
Subject: [PATCH] [CIFS] Fix OOPs when 'data' is NULL
Signed-off-by: niallain@gmail.com <q@q-desktop.(none)>
---
fs/cifs/cifsfs.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index e9f4ec7..aee6b9d 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -102,6 +102,9 @@ cifs_read_super(struct super_block *sb, void *data,
#endif
int rc = 0;
+ if (!data)
+ return -EINVAL;
+
/* BB should we make this contingent on mount parm? */
sb->s_flags |= MS_NODIRATIME | MS_NOATIME;
sb->s_fs_info = kzalloc(sizeof(struct cifs_sb_info), GFP_KERNEL);
--
1.5.4.3
next prev parent reply other threads:[~2008-06-08 11:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-07 19:00 Marcin Slusarz
2008-06-08 11:28 ` Q (Igor Mammedov) [this message]
2008-06-08 20:16 ` [linux-cifs-client] " Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=71bff3710806080428n18c8e56dwcda54c5c9460d265@mail.gmail.com \
--to=niallain@gmail.com \
--cc=linux-cifs-client@lists.samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcin.slusarz@gmail.com \
--cc=sfrench@samba.org \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®