Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
3
-
9223372036854775807
Description
Passing of valid pointers to PTR_ERR is unlikely to lead to desired effects, so we really need to do something about it.
one example:
wobdo = object_update_param_get(update, 0, &size); if (IS_ERR(wobdo) || size != sizeof(*wobdo)) { CERROR("%s: obdo is NULL, invalid RPC: rc = %ld\n", tgt_name(tsi->tsi_tgt), PTR_ERR(wobdo)); RETURN(PTR_ERR(wobdo)); }
List of triggers:
lustre/target/out_handler.c:120 out_create() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:122 out_create() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:134 out_create() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:136 out_create() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:173 out_attr_set() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:175 out_attr_set() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:390 out_xattr_set() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:392 out_xattr_set() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:487 out_index_insert() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:489 out_index_insert() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:503 out_index_insert() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:505 out_index_insert() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:590 out_write() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:592 out_write() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:599 out_write() warn: passing a valid pointer to 'PTR_ERR' lustre/target/out_handler.c:601 out_write() warn: passing a valid pointer to 'PTR_ERR'
Attachments
Issue Links
- is duplicated by
-
LU-11610 Incorrect use of PTR_ERR on valid pointers in out_handler.c
-
- Resolved
-
Merged for 2.17