From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH v2 1/1] mtd: spi-nor: core: Prevent oops during driver removal with active read or write operations
Date: Wed, 16 Jul 2025 01:05:55 +0800 [thread overview]
Message-ID: <202507160058.Kvt70tJp-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <d2bba90684f50a66b81ce4d7da3d405783209f95.1752539969.git.khairul.anuar.romli@altera.com>
References: <d2bba90684f50a66b81ce4d7da3d405783209f95.1752539969.git.khairul.anuar.romli@altera.com>
TO: khairul.anuar.romli@altera.com
TO: Tudor Ambarus <tudor.ambarus@linaro.org>
TO: Pratyush Yadav <pratyush@kernel.org>
TO: Michael Walle <mwalle@kernel.org>
TO: Miquel Raynal <miquel.raynal@bootlin.com>
TO: Richard Weinberger <richard@nod.at>
TO: Vignesh Raghavendra <vigneshr@ti.com>
TO: "open list:SPI NOR SUBSYSTEM" <linux-mtd@lists.infradead.org>
TO: open list <linux-kernel@vger.kernel.org>
TO: Matthew Gerlach <matthew.gerlach@altera.com>
TO: Khairul Anuar Romli <khairul.anuar.romli@altera.com>
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on mtd/spi-nor/next]
[also build test WARNING on linus/master v6.16-rc6 next-20250715]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/khairul-anuar-romli-altera-com/mtd-spi-nor-core-Prevent-oops-during-driver-removal-with-active-read-or-write-operations/20250715-094504
base: https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git spi-nor/next
patch link: https://lore.kernel.org/r/d2bba90684f50a66b81ce4d7da3d405783209f95.1752539969.git.khairul.anuar.romli%40altera.com
patch subject: [PATCH v2 1/1] mtd: spi-nor: core: Prevent oops during driver removal with active read or write operations
:::::: branch date: 15 hours ago
:::::: commit date: 15 hours ago
config: openrisc-randconfig-r071-20250715 (https://download.01.org/0day-ci/archive/20250716/202507160058.Kvt70tJp-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 15.1.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202507160058.Kvt70tJp-lkp@intel.com/
smatch warnings:
drivers/mtd/spi-nor/core.c:3213 spi_nor_get_device() error: we previously assumed 'dev' could be null (see line 3213)
drivers/mtd/spi-nor/core.c:3213 spi_nor_get_device() error: we previously assumed 'dev->driver' could be null (see line 3213)
vim +/dev +3213 drivers/mtd/spi-nor/core.c
d6084fc83c8249 drivers/mtd/spi-nor/spi-nor.c Kamal Dasu 2017-08-22 3201
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3202 static int spi_nor_get_device(struct mtd_info *mtd)
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3203 {
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3204 struct mtd_info *master = mtd_get_master(mtd);
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3205 struct spi_nor *nor = mtd_to_spi_nor(master);
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3206 struct device *dev;
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3207
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3208 if (nor->spimem)
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3209 dev = nor->spimem->spi->controller->dev.parent;
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3210 else
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3211 dev = nor->dev;
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3212
d51eaff2c57a38 drivers/mtd/spi-nor/core.c kromli 2025-07-15 @3213 if (!dev && !dev->driver && !dev->driver->owner)
d51eaff2c57a38 drivers/mtd/spi-nor/core.c kromli 2025-07-15 3214 return -EINVAL;
d51eaff2c57a38 drivers/mtd/spi-nor/core.c kromli 2025-07-15 3215
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3216 if (!try_module_get(dev->driver->owner))
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3217 return -ENODEV;
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3218
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3219 return 0;
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3220 }
be94215be1ab19 drivers/mtd/spi-nor/core.c Xiang Chen 2021-04-01 3221
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-07-15 17:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 17:05 kernel test robot [this message]
[not found] <cover.1752539969.git.khairul.anuar.romli@altera.com>
2025-07-15 0:44 ` [PATCH v2 1/1] mtd: spi-nor: core: Prevent oops during driver removal with active read or write operations khairul.anuar.romli
2025-07-15 0:44 ` khairul.anuar.romli
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=202507160058.Kvt70tJp-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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.