Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
3
-
9223372036854775807
Description
smatch highlighted this in class_newdev:
if (result == NULL && i >= class_devno_max()) {
CERROR("all %u OBD devices used, increase MAX_OBD_DEVICES\n",
class_devno_max());
GOTO(out, result = ERR_PTR(-EOVERFLOW));
}
if (IS_ERR(result))
GOTO(out, result);
CDEBUG(D_IOCTL, "Adding new device %s (%p)\n",
result->obd_name, result);
So this totally seems to assume that if result == NULL, but we did not go beyond the obd device limit, we are ok to print this NULL pointer?
I suspect we should chance the IS_ERRO to either result == NULL || IS_ERR?
Attachments
Issue Links
- is related to
-
LU-4134 obdfilter-suvery bugs and panics (ioctl API isn't protected over shutdown/setup property).
-
- Resolved
-