CC: [email protected]
CC: [email protected]
TO: Shiraz Saleem <[email protected]>
CC: Jason Gunthorpe <[email protected]>
CC: Tatyana Nikolova <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   cb690f5238d71f543f4ce874aa59237cf53a877c
commit: 1f700757224effe598690b34e95329aff4e3e362 RDMA/irdma: Fix potential 
overflow expression in irdma_prm_get_pbles
date:   5 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 5 months ago
config: x86_64-randconfig-m031-20211014 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

New smatch warnings:
drivers/infiniband/hw/irdma/pble.c:419 get_lvl1_pble() warn: should 
'palloc->total_cnt << 3' be a 64 bit type?

Old smatch warnings:
drivers/infiniband/hw/irdma/pble.c:112 add_sd_direct() warn: should 
'info->pages << 12' be a 64 bit type?

vim +419 drivers/infiniband/hw/irdma/pble.c

e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  404  
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  405  /**
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  406   * get_lvl1_pble - get level 1 
pble resource
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  407   * @pble_rsrc: pble resource 
management
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  408   * @palloc: level 1 pble 
allocation
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  409   */
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  410  static enum irdma_status_code
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  411  get_lvl1_pble(struct 
irdma_hmc_pble_rsrc *pble_rsrc,
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  412         struct irdma_pble_alloc 
*palloc)
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  413  {
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  414   enum irdma_status_code ret_code;
2db7b2eac7ad55 Shiraz Saleem  2021-06-09  415   u64 fpm_addr;
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  416   struct irdma_pble_info *lvl1 = 
&palloc->level1;
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  417  
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  418   ret_code = 
irdma_prm_get_pbles(&pble_rsrc->pinfo, &lvl1->chunkinfo,
2db7b2eac7ad55 Shiraz Saleem  2021-06-09 @419                                  
palloc->total_cnt << 3, &lvl1->addr,
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  420                                  
&fpm_addr);
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  421   if (ret_code)
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  422           return 
IRDMA_ERR_NO_MEMORY;
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  423  
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  424   palloc->level = PBLE_LEVEL_1;
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  425   lvl1->idx = 
fpm_to_idx(pble_rsrc, fpm_addr);
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  426   lvl1->cnt = palloc->total_cnt;
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  427   pble_rsrc->stats_lvl1++;
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  428  
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  429   return 0;
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  430  }
e8c4dbc2fcacf5 Mustafa Ismail 2021-06-02  431  

:::::: The code at line 419 was first introduced by commit
:::::: 2db7b2eac7ad55105fe037b3f8f57d8ecac8c3fb RDMA/irdma: Store PBL info 
address a pointer type

:::::: TO: Shiraz Saleem <[email protected]>
:::::: CC: Jason Gunthorpe <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to