Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-6876

integer overflow in ptlrpc_lprocfs_svc_req_history_start

    XMLWordPrintable

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?
      

      Attachments

        Activity

          People

            liang Liang Zhen (Inactive)
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: