LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] IB/ipath: check return value of lookup_one_len
@ 2007-03-21 22:18 Bryan O'Sullivan
2007-03-22 17:53 ` Roland Dreier
0 siblings, 1 reply; 2+ messages in thread
From: Bryan O'Sullivan @ 2007-03-21 22:18 UTC (permalink / raw)
To: rdreier; +Cc: skyhover.pi, linux-kernel
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,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] IB/ipath: check return value of lookup_one_len
2007-03-21 22:18 [PATCH] IB/ipath: check return value of lookup_one_len Bryan O'Sullivan
@ 2007-03-22 17:53 ` Roland Dreier
0 siblings, 0 replies; 2+ messages in thread
From: Roland Dreier @ 2007-03-22 17:53 UTC (permalink / raw)
To: Bryan O'Sullivan; +Cc: skyhover.pi, linux-kernel
Thanks, applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-22 17:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-21 22:18 [PATCH] IB/ipath: check return value of lookup_one_len Bryan O'Sullivan
2007-03-22 17:53 ` Roland Dreier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).