* drivers/net/ethernet/pensando/ionic/ionic_lif.c:855 ionic_adminq_napi() error: we previously assumed 'lif->adminqcq' could be null (see line 848)
@ 2021-02-09 18:30 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2021-02-09 18:30 UTC (permalink / raw)
To: kbuild, Shannon Nelson; +Cc: lkp, kbuild-all, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3543 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e0756cfc7d7cd08c98a53b6009c091a3f6a50be6
commit: 04a834592bf51355383db6fc00cb09f776a6b8dc ionic: dynamic interrupt moderation
config: s390-randconfig-m031-20210209 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/net/ethernet/pensando/ionic/ionic_lif.c:855 ionic_adminq_napi() error: we previously assumed 'lif->adminqcq' could be null (see line 848)
vim +855 drivers/net/ethernet/pensando/ionic/ionic_lif.c
1d062b7b6f6408 Shannon Nelson 2019-09-03 834 static int ionic_adminq_napi(struct napi_struct *napi, int budget)
1d062b7b6f6408 Shannon Nelson 2019-09-03 835 {
b4280948aa22ab Shannon Nelson 2020-09-01 836 struct ionic_intr_info *intr = napi_to_cq(napi)->bound_intr;
77ceb68e29ccd2 Shannon Nelson 2019-09-03 837 struct ionic_lif *lif = napi_to_cq(napi)->lif;
b4280948aa22ab Shannon Nelson 2020-09-01 838 struct ionic_dev *idev = &lif->ionic->idev;
b4280948aa22ab Shannon Nelson 2020-09-01 839 unsigned int flags = 0;
77ceb68e29ccd2 Shannon Nelson 2019-09-03 840 int n_work = 0;
77ceb68e29ccd2 Shannon Nelson 2019-09-03 841 int a_work = 0;
b4280948aa22ab Shannon Nelson 2020-09-01 842 int work_done;
b4280948aa22ab Shannon Nelson 2020-09-01 843
b4280948aa22ab Shannon Nelson 2020-09-01 844 if (lif->notifyqcq && lif->notifyqcq->flags & IONIC_QCQ_F_INITED)
b4280948aa22ab Shannon Nelson 2020-09-01 845 n_work = ionic_cq_service(&lif->notifyqcq->cq, budget,
b4280948aa22ab Shannon Nelson 2020-09-01 846 ionic_notifyq_service, NULL, NULL);
77ceb68e29ccd2 Shannon Nelson 2019-09-03 847
b4280948aa22ab Shannon Nelson 2020-09-01 @848 if (lif->adminqcq && lif->adminqcq->flags & IONIC_QCQ_F_INITED)
^^^^^^^^^^^^^
Check for NULL
b4280948aa22ab Shannon Nelson 2020-09-01 849 a_work = ionic_cq_service(&lif->adminqcq->cq, budget,
b4280948aa22ab Shannon Nelson 2020-09-01 850 ionic_adminq_service, NULL, NULL);
b4280948aa22ab Shannon Nelson 2020-09-01 851
b4280948aa22ab Shannon Nelson 2020-09-01 852 work_done = max(n_work, a_work);
b4280948aa22ab Shannon Nelson 2020-09-01 853 if (work_done < budget && napi_complete_done(napi, work_done)) {
b4280948aa22ab Shannon Nelson 2020-09-01 854 flags |= IONIC_INTR_CRED_UNMASK;
04a834592bf513 Shannon Nelson 2020-09-15 @855 lif->adminqcq->cq.bound_intr->rearm_count++;
^^^^^^^^^^^^^
Unchecked dereference
b4280948aa22ab Shannon Nelson 2020-09-01 856 }
77ceb68e29ccd2 Shannon Nelson 2019-09-03 857
b4280948aa22ab Shannon Nelson 2020-09-01 858 if (work_done || flags) {
b4280948aa22ab Shannon Nelson 2020-09-01 859 flags |= IONIC_INTR_CRED_RESET_COALESCE;
b4280948aa22ab Shannon Nelson 2020-09-01 860 ionic_intr_credits(idev->intr_ctrl,
b4280948aa22ab Shannon Nelson 2020-09-01 861 intr->index,
b4280948aa22ab Shannon Nelson 2020-09-01 862 n_work + a_work, flags);
b4280948aa22ab Shannon Nelson 2020-09-01 863 }
b4280948aa22ab Shannon Nelson 2020-09-01 864
b4280948aa22ab Shannon Nelson 2020-09-01 865 return work_done;
1d062b7b6f6408 Shannon Nelson 2019-09-03 866 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28578 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-10 0:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 18:30 drivers/net/ethernet/pensando/ionic/ionic_lif.c:855 ionic_adminq_napi() error: we previously assumed 'lif->adminqcq' could be null (see line 848) Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).