All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: [freescale-fslc:pr/284 15241/17564] drivers/remoteproc/remoteproc_core.c:1713 rproc_trigger_recovery() error: uninitialized symbol 'firmware_p'.
Date: Wed, 10 Mar 2021 11:26:04 +0300	[thread overview]
Message-ID: <20210310082604.GG21246@kadam> (raw)

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

Hi Jason,

tree:   https://github.com/Freescale/linux-fslc  pr/284
head:   08867468907e4fb0db541529eaeee70eaf81d395
commit: 5bb09de3044acf91e6f8c712c026d5a4bc53b563 [15241/17564] MLK-24874-1: include: uapi: fmd: fix the UAPI_HEADER_TEST/install failure
config: x86_64-randconfig-m001-20210309 (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>

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

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

70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1684  int rproc_trigger_recovery(struct rproc *rproc)
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1685  {
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1686  	const struct firmware *firmware_p;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1687  	struct device *dev = &rproc->dev;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1688  	int ret;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1689  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1690  	dev_err(dev, "recovering %s\n", rproc->name);
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1691  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1692  	ret = mutex_lock_interruptible(&rproc->lock);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1693  	if (ret)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1694  		return ret;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1695  
fcd58037f28bf7 Arnaud Pouliquen     2018-04-10  1696  	ret = rproc_stop(rproc, true);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1697  	if (ret)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1698  		goto unlock_mutex;
ddf711872c9d2b Bjorn Andersson      2016-08-11  1699  
eb225e1d92f46b Peng Fan             2020-02-19  1700  	if (!rproc->skip_fw_load) {
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1701  		/* generate coredump */
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1702  		rproc_coredump(rproc);
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1703  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1704  		/* load firmware */
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1705  		ret = request_firmware(&firmware_p, rproc->firmware, dev);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1706  		if (ret < 0) {
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1707  			dev_err(dev, "request_firmware failed: %d\n", ret);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1708  			goto unlock_mutex;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1709  		}
eb225e1d92f46b Peng Fan             2020-02-19  1710  	}

firmware_p uninitialize on else path.

ddf711872c9d2b Bjorn Andersson      2016-08-11  1711  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1712  	/* boot the remote processor up again */
7e83cab824a867 Sarangdhar Joshi     2017-05-26 @1713  	ret = rproc_start(rproc, firmware_p);

This will trigger a syzbot/UBSan warning even if it doesn't cause a
runtime issue.

7e83cab824a867 Sarangdhar Joshi     2017-05-26  1714  
eb225e1d92f46b Peng Fan             2020-02-19  1715  	if (!rproc->skip_fw_load)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1716  		release_firmware(firmware_p);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1717  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1718  unlock_mutex:
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1719  	mutex_unlock(&rproc->lock);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1720  	return ret;
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1721  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org 

_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38305 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: [kbuild] [freescale-fslc:pr/284 15241/17564] drivers/remoteproc/remoteproc_core.c:1713 rproc_trigger_recovery() error: uninitialized symbol 'firmware_p'.
Date: Wed, 10 Mar 2021 11:26:04 +0300	[thread overview]
Message-ID: <20210310082604.GG21246@kadam> (raw)

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

Hi Jason,

tree:   https://github.com/Freescale/linux-fslc  pr/284
head:   08867468907e4fb0db541529eaeee70eaf81d395
commit: 5bb09de3044acf91e6f8c712c026d5a4bc53b563 [15241/17564] MLK-24874-1: include: uapi: fmd: fix the UAPI_HEADER_TEST/install failure
config: x86_64-randconfig-m001-20210309 (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>

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

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

70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1684  int rproc_trigger_recovery(struct rproc *rproc)
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1685  {
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1686  	const struct firmware *firmware_p;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1687  	struct device *dev = &rproc->dev;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1688  	int ret;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1689  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1690  	dev_err(dev, "recovering %s\n", rproc->name);
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1691  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1692  	ret = mutex_lock_interruptible(&rproc->lock);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1693  	if (ret)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1694  		return ret;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1695  
fcd58037f28bf7 Arnaud Pouliquen     2018-04-10  1696  	ret = rproc_stop(rproc, true);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1697  	if (ret)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1698  		goto unlock_mutex;
ddf711872c9d2b Bjorn Andersson      2016-08-11  1699  
eb225e1d92f46b Peng Fan             2020-02-19  1700  	if (!rproc->skip_fw_load) {
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1701  		/* generate coredump */
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1702  		rproc_coredump(rproc);
2666ca9197e3d3 Sarangdhar Joshi     2018-01-05  1703  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1704  		/* load firmware */
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1705  		ret = request_firmware(&firmware_p, rproc->firmware, dev);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1706  		if (ret < 0) {
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1707  			dev_err(dev, "request_firmware failed: %d\n", ret);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1708  			goto unlock_mutex;
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1709  		}
eb225e1d92f46b Peng Fan             2020-02-19  1710  	}

firmware_p uninitialize on else path.

ddf711872c9d2b Bjorn Andersson      2016-08-11  1711  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1712  	/* boot the remote processor up again */
7e83cab824a867 Sarangdhar Joshi     2017-05-26 @1713  	ret = rproc_start(rproc, firmware_p);

This will trigger a syzbot/UBSan warning even if it doesn't cause a
runtime issue.

7e83cab824a867 Sarangdhar Joshi     2017-05-26  1714  
eb225e1d92f46b Peng Fan             2020-02-19  1715  	if (!rproc->skip_fw_load)
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1716  		release_firmware(firmware_p);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1717  
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1718  unlock_mutex:
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1719  	mutex_unlock(&rproc->lock);
7e83cab824a867 Sarangdhar Joshi     2017-05-26  1720  	return ret;
70b85ef83ce352 Fernando Guzman Lugo 2012-08-30  1721  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org 

_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38305 bytes --]

             reply	other threads:[~2021-03-10  8:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10  8:26 Dan Carpenter [this message]
2021-03-10  8:26 ` [kbuild] [freescale-fslc:pr/284 15241/17564] drivers/remoteproc/remoteproc_core.c:1713 rproc_trigger_recovery() error: uninitialized symbol 'firmware_p' Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2021-03-09 21:31 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=20210310082604.GG21246@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.