From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: drivers/net/ethernet/pensando/ionic/ionic_lif.c:855 ionic_adminq_napi() error: we previously assumed 'lif->adminqcq' could be null (see line 848)
Date: Tue, 09 Feb 2021 21:30:43 +0300 [thread overview]
Message-ID: <20210209183043.GR2696@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 3603 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(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28578 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: drivers/net/ethernet/pensando/ionic/ionic_lif.c:855 ionic_adminq_napi() error: we previously assumed 'lif->adminqcq' could be null (see line 848)
Date: Tue, 09 Feb 2021 21:30:43 +0300 [thread overview]
Message-ID: <20210209183043.GR2696@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 3603 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(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28578 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Shannon Nelson <snelson@pensando.io>
Cc: lkp@intel.com, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: drivers/net/ethernet/pensando/ionic/ionic_lif.c:855 ionic_adminq_napi() error: we previously assumed 'lif->adminqcq' could be null (see line 848)
Date: Tue, 9 Feb 2021 21:30:43 +0300 [thread overview]
Message-ID: <20210209183043.GR2696@kadam> (raw)
[-- 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 --]
next reply other threads:[~2021-02-09 18:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 18:30 Dan Carpenter [this message]
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
2021-02-09 18:30 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2021-02-09 16:48 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210209183043.GR2696@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.