From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c:233 irq_request() error: passing non negative 536870911 to ERR_PTR
Date: Sun, 21 Nov 2021 00:41:55 +0800 [thread overview]
Message-ID: <202111210041.ynFTSn8i-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5021 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Shay Drory <shayd@nvidia.com>
CC: Saeed Mahameed <saeedm@nvidia.com>
CC: Leon Romanovsky <leonro@nvidia.com>
CC: Tariq Toukan <tariqt@nvidia.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a90af8f15bdc9449ee2d24e1d73fa3f7e8633f81
commit: c36326d38d933199014aba5a17d384cf52e4b558 net/mlx5: Round-Robin EQs over IRQs
date: 5 months ago
:::::: branch date: 18 hours ago
:::::: commit date: 5 months ago
config: mips-randconfig-m031-20211104 (attached as .config)
compiler: mips-linux-gcc (GCC) 11.2.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/mellanox/mlx5/core/pci_irq.c:233 irq_request() error: passing non negative 536870911 to ERR_PTR
vim +233 drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
256cf690af0668 Yuval Avnery 2019-06-10 187
71e084e26414b0 Shay Drory 2021-02-23 188 static struct mlx5_irq *irq_request(struct mlx5_irq_pool *pool, int i)
256cf690af0668 Yuval Avnery 2019-06-10 189 {
71e084e26414b0 Shay Drory 2021-02-23 190 struct mlx5_core_dev *dev = pool->dev;
256cf690af0668 Yuval Avnery 2019-06-10 191 char name[MLX5_MAX_IRQ_NAME];
2d74524c0106ab Shay Drory 2021-02-23 192 struct mlx5_irq *irq;
256cf690af0668 Yuval Avnery 2019-06-10 193 int err;
256cf690af0668 Yuval Avnery 2019-06-10 194
fc63dd2a85be1f Shay Drory 2021-02-23 195 irq = kzalloc(sizeof(*irq), GFP_KERNEL);
fc63dd2a85be1f Shay Drory 2021-02-23 196 if (!irq)
fc63dd2a85be1f Shay Drory 2021-02-23 197 return ERR_PTR(-ENOMEM);
c38421abcf21d4 Leon Romanovsky 2021-02-23 198 irq->irqn = pci_irq_vector(dev->pdev, i);
71e084e26414b0 Shay Drory 2021-02-23 199 if (!pool->name[0])
256cf690af0668 Yuval Avnery 2019-06-10 200 irq_set_name(name, i);
71e084e26414b0 Shay Drory 2021-02-23 201 else
71e084e26414b0 Shay Drory 2021-02-23 202 irq_sf_set_name(pool, name, i);
cf49f41d29467c Yuval Avnery 2019-06-10 203 ATOMIC_INIT_NOTIFIER_HEAD(&irq->nh);
cf49f41d29467c Yuval Avnery 2019-06-10 204 snprintf(irq->name, MLX5_MAX_IRQ_NAME,
256cf690af0668 Yuval Avnery 2019-06-10 205 "%s(a)pci:%s", name, pci_name(dev->pdev));
e8abebb3a48e86 Shay Drory 2021-02-23 206 err = request_irq(irq->irqn, irq_int_handler, 0, irq->name,
cf49f41d29467c Yuval Avnery 2019-06-10 207 &irq->nh);
256cf690af0668 Yuval Avnery 2019-06-10 208 if (err) {
e8abebb3a48e86 Shay Drory 2021-02-23 209 mlx5_core_err(dev, "Failed to request irq. err = %d\n", err);
2d74524c0106ab Shay Drory 2021-02-23 210 goto err_req_irq;
256cf690af0668 Yuval Avnery 2019-06-10 211 }
e4e3f24b822f9d Leon Romanovsky 2021-02-23 212 if (!zalloc_cpumask_var(&irq->mask, GFP_KERNEL)) {
e4e3f24b822f9d Leon Romanovsky 2021-02-23 213 mlx5_core_warn(dev, "zalloc_cpumask_var failed\n");
2d74524c0106ab Shay Drory 2021-02-23 214 err = -ENOMEM;
2d74524c0106ab Shay Drory 2021-02-23 215 goto err_cpumask;
e4e3f24b822f9d Leon Romanovsky 2021-02-23 216 }
c36326d38d9331 Shay Drory 2021-02-23 217 kref_init(&irq->kref);
c36326d38d9331 Shay Drory 2021-02-23 218 irq->index = i;
c36326d38d9331 Shay Drory 2021-02-23 219 err = xa_err(xa_store(&pool->irqs, irq->index, irq, GFP_KERNEL));
fc63dd2a85be1f Shay Drory 2021-02-23 220 if (err) {
fc63dd2a85be1f Shay Drory 2021-02-23 221 mlx5_core_err(dev, "Failed to alloc xa entry for irq(%u). err = %d\n",
fc63dd2a85be1f Shay Drory 2021-02-23 222 irq->index, err);
fc63dd2a85be1f Shay Drory 2021-02-23 223 goto err_xa;
fc63dd2a85be1f Shay Drory 2021-02-23 224 }
71e084e26414b0 Shay Drory 2021-02-23 225 irq->pool = pool;
fc63dd2a85be1f Shay Drory 2021-02-23 226 return irq;
fc63dd2a85be1f Shay Drory 2021-02-23 227 err_xa:
fc63dd2a85be1f Shay Drory 2021-02-23 228 free_cpumask_var(irq->mask);
2d74524c0106ab Shay Drory 2021-02-23 229 err_cpumask:
2d74524c0106ab Shay Drory 2021-02-23 230 free_irq(irq->irqn, &irq->nh);
2d74524c0106ab Shay Drory 2021-02-23 231 err_req_irq:
fc63dd2a85be1f Shay Drory 2021-02-23 232 kfree(irq);
fc63dd2a85be1f Shay Drory 2021-02-23 @233 return ERR_PTR(err);
e8abebb3a48e86 Shay Drory 2021-02-23 234 }
256cf690af0668 Yuval Avnery 2019-06-10 235
:::::: The code at line 233 was first introduced by commit
:::::: fc63dd2a85be1f37fb822594101e9219b7be7460 net/mlx5: Change IRQ storage logic from static to dynamic
:::::: TO: Shay Drory <shayd@nvidia.com>
:::::: CC: Saeed Mahameed <saeedm@nvidia.com>
---
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: 33936 bytes --]
next reply other threads:[~2021-11-20 16:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-20 16:41 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-12-12 2:50 drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c:233 irq_request() error: passing non negative 536870911 to ERR_PTR kernel test robot
2021-11-27 16:42 kernel test robot
2021-11-14 2:58 kernel test robot
2021-08-06 8:55 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=202111210041.ynFTSn8i-lkp@intel.com \
--to=lkp@intel.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.