From: "Bryan O'Sullivan" <bos@pathscale.com>
To: rdreier@cisco.com
Cc: skyhover.pi@gmail.com, linux-kernel@vger.kernel.org
Subject: [PATCH] IB/ipath: check return value of lookup_one_len
Date: Wed, 21 Mar 2007 15:18:14 -0700 [thread overview]
Message-ID: <e3e94873cfa04ae59dbc.1174515494@eng-12.pathscale.com> (raw)
This fixes kernel.org bug 8003.
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
diff -r 2a2b2b882891 -r e3e94873cfa0 drivers/infiniband/hw/ipath/ipath_fs.c
--- a/drivers/infiniband/hw/ipath/ipath_fs.c Wed Mar 21 15:16:07 2007 -0700
+++ b/drivers/infiniband/hw/ipath/ipath_fs.c Wed Mar 21 15:16:07 2007 -0700
@@ -456,11 +456,17 @@ bail:
return ret;
}
-static void remove_file(struct dentry *parent, char *name)
+static int remove_file(struct dentry *parent, char *name)
{
struct dentry *tmp;
+ int ret;
tmp = lookup_one_len(name, parent, strlen(name));
+
+ if (IS_ERR(tmp)) {
+ ret = PTR_ERR(tmp);
+ goto bail;
+ }
spin_lock(&dcache_lock);
spin_lock(&tmp->d_lock);
@@ -474,6 +480,14 @@ static void remove_file(struct dentry *p
spin_unlock(&tmp->d_lock);
spin_unlock(&dcache_lock);
}
+
+ ret = 0;
+bail:
+ /*
+ * We don't expect clients to care about the return value, but
+ * it's there if they need it.
+ */
+ return ret;
}
static int remove_device_files(struct super_block *sb,
next reply other threads:[~2007-03-21 22:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-21 22:18 Bryan O'Sullivan [this message]
2007-03-22 17:53 ` Roland Dreier
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=e3e94873cfa04ae59dbc.1174515494@eng-12.pathscale.com \
--to=bos@pathscale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdreier@cisco.com \
--cc=skyhover.pi@gmail.com \
/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®