* re: IB/ipath: sysfs and ipathfs support for core driver
@ 2014-07-08 10:57 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-07-08 10:57 UTC (permalink / raw)
To: bos-Hl0AACgZOF5l57MIdRCFDg; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Hello Bryan O'Sullivan,
This is a semi-automatic email about new static checker warnings.
The patch 3e9b4a5eb4ae: "IB/ipath: sysfs and ipathfs support for core
driver" from Mar 29, 2006, leads to the following Smatch complaint:
drivers/infiniband/hw/ipath/ipath_fs.c:285 remove_file()
error: we previously assumed 'tmp->d_inode' could be null (see line 281)
drivers/infiniband/hw/ipath/ipath_fs.c
280 spin_lock(&tmp->d_lock);
281 if (!(d_unhashed(tmp) && tmp->d_inode)) {
^^^^^^^^^^^^
We allow that ->d_inode to be NULL.
282 dget_dlock(tmp);
283 __d_drop(tmp);
284 spin_unlock(&tmp->d_lock);
285 simple_unlink(parent->d_inode, tmp);
^^^
But we dereference it inside the call to simple_unlink(). This code is
probably cut-and-pasted from configfs because I reported a bug in that
code as well yesterday but haven't heard back.
286 } else
287 spin_unlock(&tmp->d_lock);
drivers/infiniband/hw/qib/qib_fs.c
458 spin_lock(&tmp->d_lock);
459 if (!(d_unhashed(tmp) && tmp->d_inode)) {
^^^^^^^^^^^^
460 __d_drop(tmp);
461 spin_unlock(&tmp->d_lock);
462 simple_unlink(parent->d_inode, tmp);
^^^
And another one here in qib_fs.c.
463 } else {
464 spin_unlock(&tmp->d_lock);
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-08 10:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-08 10:57 IB/ipath: sysfs and ipathfs support for core driver Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.