Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
It looks like ptlrpc_lprocfs_svc_req_history_start has an integer oveflow shifting an integer value more than 32 bits away:
static void * ptlrpc_lprocfs_svc_req_history_start(struct seq_file *s, loff_t *pos) { ... int i; ... if (i > cpt) /* make up the lowest position for this CPT */ *pos = PTLRPC_REQ_CPT2POS(svc, i); }
This produces following warning indicating the overflow is pretty real:
lustre/ptlrpc/lproc_ptlrpc.c:852 ptlrpc_lprocfs_svc_req_history_start() warn: should '(i) << (64 - (svc)->srv_cpt_bits)' be a 64 bit type?