All of lore.kernel.org
 help / color / mirror / Atom feed
* [freescale-fslc:5.4-2.3.x-imx 8776/16896] drivers/remoteproc/remoteproc_core.c:1695 rproc_trigger_recovery() error: uninitialized symbol 'firmware_p'.
@ 2021-02-04 20:38 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-02-04 20:38 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5301 bytes --]

CC: kbuild-all(a)lists.01.org
TO: Otavio Salvador <otavio@ossystems.com.br>

tree:   https://github.com/Freescale/linux-fslc 5.4-2.3.x-imx
head:   3e30474a9fe2cbf3c78a1c173ab6ce2db22f943f
commit: eb225e1d92f46b07dbce5e6acbb3302542d63ee7 [8776/16896] MLK-23754-5 remoteproc: add support to skip firmware load when recovery
:::::: branch date: 8 hours ago
:::::: commit date: 10 months ago
config: x86_64-randconfig-m001-20210204 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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>

New smatch warnings:
drivers/remoteproc/remoteproc_core.c:1695 rproc_trigger_recovery() error: uninitialized symbol 'firmware_p'.

Old smatch warnings:
drivers/remoteproc/remoteproc_core.c:1608 rproc_coredump() warn: is 'data' large enough for 'struct elf32_hdr'? 1

vim +/firmware_p +1695 drivers/remoteproc/remoteproc_core.c

2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1655  
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1656  /**
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1657   * rproc_trigger_recovery() - recover a remoteproc
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1658   * @rproc: the remote processor
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1659   *
56324d7a229486 Anna, Suman          2016-08-12  1660   * The recovery is done by resetting all the virtio devices, that way all the
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1661   * rpmsg drivers will be reseted along with the remote processor making the
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1662   * remoteproc functional again.
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1663   *
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1664   * This function can sleep, so it cannot be called from atomic context.
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1665   */
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1666  int rproc_trigger_recovery(struct rproc *rproc)
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1667  {
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1668  	const struct firmware *firmware_p;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1669  	struct device *dev = &rproc->dev;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1670  	int ret;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1671  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1672  	dev_err(dev, "recovering %s\n", rproc->name);
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1673  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1674  	ret = mutex_lock_interruptible(&rproc->lock);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1675  	if (ret)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1676  		return ret;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1677  
fcd58037f28bf7 Arnaud Pouliquen     2018-04-10  1678  	ret = rproc_stop(rproc, true);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1679  	if (ret)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1680  		goto unlock_mutex;
ddf711872c9d2b Bjorn Andersson      2016-08-11  1681  
eb225e1d92f46b Peng Fan             2020-02-19  1682  	if (!rproc->skip_fw_load) {
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1683  		/* generate coredump */
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1684  		rproc_coredump(rproc);
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1685  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1686  		/* load firmware */
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1687  		ret = request_firmware(&firmware_p, rproc->firmware, dev);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1688  		if (ret < 0) {
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1689  			dev_err(dev, "request_firmware failed: %d\n", ret);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1690  			goto unlock_mutex;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1691  		}
eb225e1d92f46b Peng Fan             2020-02-19  1692  	}
ddf711872c9d2b Bjorn Andersson      2016-08-11  1693  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1694  	/* boot the remote processor up again */
7e83cab824a867 Sarangdhar Joshi     2017-05-26 @1695  	ret = rproc_start(rproc, firmware_p);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1696  
eb225e1d92f46b Peng Fan             2020-02-19  1697  	if (!rproc->skip_fw_load)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1698  		release_firmware(firmware_p);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1699  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1700  unlock_mutex:
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1701  	mutex_unlock(&rproc->lock);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1702  	return ret;
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1703  }
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1704  

:::::: The code at line 1695 was first introduced by commit
:::::: 7e83cab824a86704cdbd7735c19d34e0ce423dc5 remoteproc: Modify recovery path to use rproc_{start,stop}()

:::::: TO: Sarangdhar Joshi <spjoshi@codeaurora.org>
:::::: CC: Bjorn Andersson <bjorn.andersson@linaro.org>

---
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: 31114 bytes --]

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

* [freescale-fslc:5.4-2.3.x-imx 8776/16896] drivers/remoteproc/remoteproc_core.c:1695 rproc_trigger_recovery() error: uninitialized symbol 'firmware_p'.
@ 2021-02-08 13:12 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-02-08 13:12 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3913 bytes --]

tree:   https://github.com/Freescale/linux-fslc 5.4-2.3.x-imx
head:   3e30474a9fe2cbf3c78a1c173ab6ce2db22f943f
commit: eb225e1d92f46b07dbce5e6acbb3302542d63ee7 [8776/16896] MLK-23754-5 remoteproc: add support to skip firmware load when recovery
config: x86_64-randconfig-m001-20210204 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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>

New smatch warnings:
drivers/remoteproc/remoteproc_core.c:1695 rproc_trigger_recovery() error: uninitialized symbol 'firmware_p'.

Old smatch warnings:
drivers/remoteproc/remoteproc_core.c:1608 rproc_coredump() warn: is 'data' large enough for 'struct elf32_hdr'? (known to be at least 1 byte)

vim +/firmware_p +1695 drivers/remoteproc/remoteproc_core.c

70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1666  int rproc_trigger_recovery(struct rproc *rproc)
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1667  {
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1668  	const struct firmware *firmware_p;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1669  	struct device *dev = &rproc->dev;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1670  	int ret;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1671  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1672  	dev_err(dev, "recovering %s\n", rproc->name);
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1673  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1674  	ret = mutex_lock_interruptible(&rproc->lock);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1675  	if (ret)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1676  		return ret;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1677  
fcd58037f28bf7 Arnaud Pouliquen     2018-04-10  1678  	ret = rproc_stop(rproc, true);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1679  	if (ret)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1680  		goto unlock_mutex;
ddf711872c9d2b Bjorn Andersson      2016-08-11  1681  
eb225e1d92f46b Peng Fan             2020-02-19  1682  	if (!rproc->skip_fw_load) {
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1683  		/* generate coredump */
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1684  		rproc_coredump(rproc);
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1685  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1686  		/* load firmware */
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1687  		ret = request_firmware(&firmware_p, rproc->firmware, dev);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1688  		if (ret < 0) {
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1689  			dev_err(dev, "request_firmware failed: %d\n", ret);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1690  			goto unlock_mutex;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1691  		}
eb225e1d92f46b Peng Fan             2020-02-19  1692  	}

Not initialized on else path.

ddf711872c9d2b Bjorn Andersson      2016-08-11  1693  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1694  	/* boot the remote processor up again */
7e83cab824a867 Sarangdhar Joshi     2017-05-26 @1695  	ret = rproc_start(rproc, firmware_p);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1696  
eb225e1d92f46b Peng Fan             2020-02-19  1697  	if (!rproc->skip_fw_load)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1698  		release_firmware(firmware_p);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1699  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1700  unlock_mutex:
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1701  	mutex_unlock(&rproc->lock);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1702  	return ret;
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1703  }

---
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: 31114 bytes --]

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

* [freescale-fslc:5.4-2.3.x-imx 8776/16896] drivers/remoteproc/remoteproc_core.c:1695 rproc_trigger_recovery() error: uninitialized symbol 'firmware_p'.
@ 2021-02-08 13:12 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-02-08 13:12 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3913 bytes --]

tree:   https://github.com/Freescale/linux-fslc 5.4-2.3.x-imx
head:   3e30474a9fe2cbf3c78a1c173ab6ce2db22f943f
commit: eb225e1d92f46b07dbce5e6acbb3302542d63ee7 [8776/16896] MLK-23754-5 remoteproc: add support to skip firmware load when recovery
config: x86_64-randconfig-m001-20210204 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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>

New smatch warnings:
drivers/remoteproc/remoteproc_core.c:1695 rproc_trigger_recovery() error: uninitialized symbol 'firmware_p'.

Old smatch warnings:
drivers/remoteproc/remoteproc_core.c:1608 rproc_coredump() warn: is 'data' large enough for 'struct elf32_hdr'? (known to be at least 1 byte)

vim +/firmware_p +1695 drivers/remoteproc/remoteproc_core.c

70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1666  int rproc_trigger_recovery(struct rproc *rproc)
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1667  {
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1668  	const struct firmware *firmware_p;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1669  	struct device *dev = &rproc->dev;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1670  	int ret;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1671  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1672  	dev_err(dev, "recovering %s\n", rproc->name);
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1673  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1674  	ret = mutex_lock_interruptible(&rproc->lock);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1675  	if (ret)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1676  		return ret;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1677  
fcd58037f28bf7 Arnaud Pouliquen     2018-04-10  1678  	ret = rproc_stop(rproc, true);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1679  	if (ret)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1680  		goto unlock_mutex;
ddf711872c9d2b Bjorn Andersson      2016-08-11  1681  
eb225e1d92f46b Peng Fan             2020-02-19  1682  	if (!rproc->skip_fw_load) {
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1683  		/* generate coredump */
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1684  		rproc_coredump(rproc);
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1685  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1686  		/* load firmware */
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1687  		ret = request_firmware(&firmware_p, rproc->firmware, dev);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1688  		if (ret < 0) {
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1689  			dev_err(dev, "request_firmware failed: %d\n", ret);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1690  			goto unlock_mutex;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1691  		}
eb225e1d92f46b Peng Fan             2020-02-19  1692  	}

Not initialized on else path.

ddf711872c9d2b Bjorn Andersson      2016-08-11  1693  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1694  	/* boot the remote processor up again */
7e83cab824a867 Sarangdhar Joshi     2017-05-26 @1695  	ret = rproc_start(rproc, firmware_p);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1696  
eb225e1d92f46b Peng Fan             2020-02-19  1697  	if (!rproc->skip_fw_load)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1698  		release_firmware(firmware_p);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1699  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1700  unlock_mutex:
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1701  	mutex_unlock(&rproc->lock);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1702  	return ret;
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1703  }

---
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: 31114 bytes --]

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

end of thread, other threads:[~2021-02-08 13:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 20:38 [freescale-fslc:5.4-2.3.x-imx 8776/16896] drivers/remoteproc/remoteproc_core.c:1695 rproc_trigger_recovery() error: uninitialized symbol 'firmware_p' kernel test robot
2021-02-08 13:12 Dan Carpenter
2021-02-08 13:12 ` Dan Carpenter

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.