All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c:233 irq_request() error: passing non negative 536870911 to ERR_PTR
@ 2021-11-27 16:42 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-11-27 16:42 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5105 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:   c5c17547b778975b3d83a73c8d84e8fb5ecf3ba5
commit: c36326d38d933199014aba5a17d384cf52e4b558 net/mlx5: Round-Robin EQs over IRQs
date:   6 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 6 months ago
config: microblaze-randconfig-m031-20211011 (https://download.01.org/0day-ci/archive/20211128/202111280034.72b2CZ7M-lkp(a)intel.com/config)
compiler: microblaze-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

^ permalink raw reply	[flat|nested] 5+ messages in thread
* drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c:233 irq_request() error: passing non negative 536870911 to ERR_PTR
@ 2021-12-12  2:50 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-12-12  2:50 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5094 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:   a763d5a5abd65797aec3dd1bf01fe2ccbec32967
commit: c36326d38d933199014aba5a17d384cf52e4b558 net/mlx5: Round-Robin EQs over IRQs
date:   6 months ago
:::::: branch date: 2 hours ago
:::::: commit date: 6 months ago
config: i386-randconfig-m021-20211209 (https://download.01.org/0day-ci/archive/20211212/202112121053.VvnObyYI-lkp(a)intel.com/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 <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

^ permalink raw reply	[flat|nested] 5+ messages in thread
* drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c:233 irq_request() error: passing non negative 536870911 to ERR_PTR
@ 2021-11-20 16:41 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-11-20 16:41 UTC (permalink / raw)
  To: kbuild

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread
* drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c:233 irq_request() error: passing non negative 536870911 to ERR_PTR
@ 2021-11-14  2:58 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-11-14  2:58 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5081 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:   ccfff0a2bd2a30de130b5623d242ddecd0272bc2
commit: c36326d38d933199014aba5a17d384cf52e4b558 net/mlx5: Round-Robin EQs over IRQs
date:   5 months ago
:::::: branch date: 6 hours ago
:::::: commit date: 5 months ago
config: microblaze-randconfig-m031-20211011 (attached as .config)
compiler: microblaze-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

256cf690af0668d Yuval Avnery    2019-06-10  187  
71e084e26414b0f Shay Drory      2021-02-23  188  static struct mlx5_irq *irq_request(struct mlx5_irq_pool *pool, int i)
256cf690af0668d Yuval Avnery    2019-06-10  189  {
71e084e26414b0f Shay Drory      2021-02-23  190  	struct mlx5_core_dev *dev = pool->dev;
256cf690af0668d Yuval Avnery    2019-06-10  191  	char name[MLX5_MAX_IRQ_NAME];
2d74524c0106abe Shay Drory      2021-02-23  192  	struct mlx5_irq *irq;
256cf690af0668d Yuval Avnery    2019-06-10  193  	int err;
256cf690af0668d Yuval Avnery    2019-06-10  194  
fc63dd2a85be1f3 Shay Drory      2021-02-23  195  	irq = kzalloc(sizeof(*irq), GFP_KERNEL);
fc63dd2a85be1f3 Shay Drory      2021-02-23  196  	if (!irq)
fc63dd2a85be1f3 Shay Drory      2021-02-23  197  		return ERR_PTR(-ENOMEM);
c38421abcf21d47 Leon Romanovsky 2021-02-23  198  	irq->irqn = pci_irq_vector(dev->pdev, i);
71e084e26414b0f Shay Drory      2021-02-23  199  	if (!pool->name[0])
256cf690af0668d Yuval Avnery    2019-06-10  200  		irq_set_name(name, i);
71e084e26414b0f Shay Drory      2021-02-23  201  	else
71e084e26414b0f Shay Drory      2021-02-23  202  		irq_sf_set_name(pool, name, i);
cf49f41d29467cc Yuval Avnery    2019-06-10  203  	ATOMIC_INIT_NOTIFIER_HEAD(&irq->nh);
cf49f41d29467cc Yuval Avnery    2019-06-10  204  	snprintf(irq->name, MLX5_MAX_IRQ_NAME,
256cf690af0668d Yuval Avnery    2019-06-10  205  		 "%s(a)pci:%s", name, pci_name(dev->pdev));
e8abebb3a48e867 Shay Drory      2021-02-23  206  	err = request_irq(irq->irqn, irq_int_handler, 0, irq->name,
cf49f41d29467cc Yuval Avnery    2019-06-10  207  			  &irq->nh);
256cf690af0668d Yuval Avnery    2019-06-10  208  	if (err) {
e8abebb3a48e867 Shay Drory      2021-02-23  209  		mlx5_core_err(dev, "Failed to request irq. err = %d\n", err);
2d74524c0106abe Shay Drory      2021-02-23  210  		goto err_req_irq;
256cf690af0668d Yuval Avnery    2019-06-10  211  	}
e4e3f24b822f9dc Leon Romanovsky 2021-02-23  212  	if (!zalloc_cpumask_var(&irq->mask, GFP_KERNEL)) {
e4e3f24b822f9dc Leon Romanovsky 2021-02-23  213  		mlx5_core_warn(dev, "zalloc_cpumask_var failed\n");
2d74524c0106abe Shay Drory      2021-02-23  214  		err = -ENOMEM;
2d74524c0106abe Shay Drory      2021-02-23  215  		goto err_cpumask;
e4e3f24b822f9dc Leon Romanovsky 2021-02-23  216  	}
c36326d38d93319 Shay Drory      2021-02-23  217  	kref_init(&irq->kref);
c36326d38d93319 Shay Drory      2021-02-23  218  	irq->index = i;
c36326d38d93319 Shay Drory      2021-02-23  219  	err = xa_err(xa_store(&pool->irqs, irq->index, irq, GFP_KERNEL));
fc63dd2a85be1f3 Shay Drory      2021-02-23  220  	if (err) {
fc63dd2a85be1f3 Shay Drory      2021-02-23  221  		mlx5_core_err(dev, "Failed to alloc xa entry for irq(%u). err = %d\n",
fc63dd2a85be1f3 Shay Drory      2021-02-23  222  			      irq->index, err);
fc63dd2a85be1f3 Shay Drory      2021-02-23  223  		goto err_xa;
fc63dd2a85be1f3 Shay Drory      2021-02-23  224  	}
71e084e26414b0f Shay Drory      2021-02-23  225  	irq->pool = pool;
fc63dd2a85be1f3 Shay Drory      2021-02-23  226  	return irq;
fc63dd2a85be1f3 Shay Drory      2021-02-23  227  err_xa:
fc63dd2a85be1f3 Shay Drory      2021-02-23  228  	free_cpumask_var(irq->mask);
2d74524c0106abe Shay Drory      2021-02-23  229  err_cpumask:
2d74524c0106abe Shay Drory      2021-02-23  230  	free_irq(irq->irqn, &irq->nh);
2d74524c0106abe Shay Drory      2021-02-23  231  err_req_irq:
fc63dd2a85be1f3 Shay Drory      2021-02-23  232  	kfree(irq);
fc63dd2a85be1f3 Shay Drory      2021-02-23 @233  	return ERR_PTR(err);
e8abebb3a48e867 Shay Drory      2021-02-23  234  }
256cf690af0668d 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: 37122 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread
* drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c:233 irq_request() error: passing non negative 536870911 to ERR_PTR
@ 2021-08-06  8:55 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-08-06  8:55 UTC (permalink / raw)
  To: kbuild

[-- 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:   902e7f373fff2476b53824264c12e4e76c7ec02a
commit: c36326d38d933199014aba5a17d384cf52e4b558 net/mlx5: Round-Robin EQs over IRQs
date:   7 weeks ago
:::::: branch date: 13 hours ago
:::::: commit date: 7 weeks ago
config: i386-randconfig-m021-20210804 (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 <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: 37843 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-12  2:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-27 16:42 drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c:233 irq_request() error: passing non negative 536870911 to ERR_PTR kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-12-12  2:50 kernel test robot
2021-11-20 16:41 kernel test robot
2021-11-14  2:58 kernel test robot
2021-08-06  8:55 kernel test robot

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.