* re: bcache: Fix error handling in init code
@ 2014-07-07 14:15 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-07-07 14:15 UTC (permalink / raw)
To: koverstreet; +Cc: linux-bcache
Hello Kent Overstreet,
This is a semi-automatic email about new static checker warnings.
The patch f59fce847fc8: "bcache: Fix error handling in init code"
from May 15, 2013, leads to the following Smatch complaint:
drivers/md/bcache/super.c:1088 cached_dev_free()
error: we previously assumed 'dc->bdev->bd_disk' could be null (see line 1085)
drivers/md/bcache/super.c
1084 if (!IS_ERR_OR_NULL(dc->bdev)) {
1085 if (dc->bdev->bd_disk)
^^^^^^^^^^^^^^^^^
The patch introduces a new check.
1086 blk_sync_queue(bdev_get_queue(dc->bdev));
1087
1088 blkdev_put(dc->bdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL);
But "dc->bdev->bd_disk" is dereferenced inside the call to blkdev_put().
1089 }
1090
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-07 14:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-07 14:15 bcache: Fix error handling in init code 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.