|
@@ -760,7 +760,8 @@ static int bcache_device_init(struct bcache_device *d, unsigned block_size,
|
|
if (!d->nr_stripes ||
|
|
if (!d->nr_stripes ||
|
|
d->nr_stripes > INT_MAX ||
|
|
d->nr_stripes > INT_MAX ||
|
|
d->nr_stripes > SIZE_MAX / sizeof(atomic_t)) {
|
|
d->nr_stripes > SIZE_MAX / sizeof(atomic_t)) {
|
|
- pr_err("nr_stripes too large");
|
|
|
|
|
|
+ pr_err("nr_stripes too large or invalid: %u (start sector beyond end of disk?)",
|
|
|
|
+ (unsigned)d->nr_stripes);
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
}
|
|
}
|
|
|
|
|