[LU-11029] passing a valid pointer to PTR_ERR Created: 18/May/18 Updated: 29/Jan/22 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg Drokin | Assignee: | WC Triage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | easy | ||
| Severity: | 3 |
| Rank (Obsolete): | 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' |