<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/drivers/mtd/devices, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-08-23T16:11:21+00:00</updated>
<entry>
<title>Merge tag 'mtd/for-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux</title>
<updated>2026-08-23T16:11:21+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-23T16:11:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=df51bdc5e80dae43cab81f6cc641e98638303c88'/>
<id>urn:sha1:df51bdc5e80dae43cab81f6cc641e98638303c88</id>
<content type='text'>
Pull mtd updates from Miquel Raynal:
 "Raw NAND changes:
   - Sunxi: Support added for the H616 compatible
   - Qcom: Support added for the MDM9607 compatible
   - Support for the Toshiba TC58NVG1S3H part
   - GPMI: New debugfs entry to expose the chip geometry
   - PL353: Timing updates and software ECC support have been fixed

  SPI NAND changes:
   - fmsh: Support added for FM25G{01,02}B chips
   - HeYangTek: Support added for HYF1GQ4UDACAE

  Aside from these main changes, there is a high load of misc fixes and
  hardening changes, and exceptionally no SPI NOR change"

* tag 'mtd/for-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (30 commits)
  mtd: rawnand: sunxi: fix H6/H616 controller timings
  mtd: rawnand: sunxi: describe tADL and tWHR delays
  mtd: rawnand: sunxi: group controller delay tables
  mtd: maps: remove dead select of MTD_CFI_BE_BYTE_SWAP
  mtd: rawnand: gpmi: add debugfs entry for BCH geometry
  mtd: rawnand: validate ONFI extended parameter page sections
  mtd: rawnand: sunxi: add H616 MBUS DMA support
  mtd: spinand: fmsh: fix FM25G01B/FM25G02B Quad I/O read dummy cycles
  mtd: part: reject MTDPART_OFS_RETAIN in mtd_add_partition()
  mtd: mpc5121_nfc: use platform for irq and ioremap
  mtd: mtdoops: free page bitmap when the backing MTD is removed
  mtd: mtdswap: Avoid freeing registered blktrans device twice
  mtd: afs: validate v2 image info bounds
  mtd: intel-dg: Fix runtime PM error path in probe
  mtd: nand-omap2: Move omap_nand_ids[] to raw nand driver
  mtd: rawnand: add Toshiba TC58NVG1S3H
  mtd: nand: realtek-ecc: add missing MODULE_DEVICE_TABLE()
  mtd: rawnand: qcom: Add MDM9607 compatible
  mtd: rawnand: qcom: Make has_onfi_read_op separate from qpic_version2
  mtd: rawnand: qcom: Make "aon" clock optional
  ...
</content>
</entry>
<entry>
<title>mtd: intel-dg: Fix runtime PM error path in probe</title>
<updated>2026-07-17T15:49:13+00:00</updated>
<author>
<name>Guangshuo Li</name>
<email>lgs201920130244@gmail.com</email>
</author>
<published>2026-07-05T03:31:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=df6f582df3377af316a60ca8ee0d590b2d03924d'/>
<id>urn:sha1:df6f582df3377af316a60ca8ee0d590b2d03924d</id>
<content type='text'>
intel_dg_mtd_probe() allocates region names before enabling runtime PM
and before calling pm_runtime_resume_and_get().

If kasprintf() fails while building a region name, the error path jumps
to err, which calls pm_runtime_put(). At that point there has not been a
successful pm_runtime_resume_and_get() call to balance, so the runtime PM
usage count can underflow.

Jump to err_norpm from the kasprintf() failure path, as the runtime PM
reference has not been acquired yet.

Fixes: 779c59274d03 ("mtd: intel-dg: Fix accessing regions before setting nregions")
Signed-off-by: Guangshuo Li &lt;lgs201920130244@gmail.com&gt;
Reviewed-by: Raag Jadav &lt;raag.jadav@intel.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: mchp23k256: use SPI match data for chip caps</title>
<updated>2026-07-03T13:46:01+00:00</updated>
<author>
<name>Pengpeng Hou</name>
<email>pengpeng@iscas.ac.cn</email>
</author>
<published>2026-07-03T07:40:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d322e40f4edf92bf0ca329e5aa4ae1c0316feb38'/>
<id>urn:sha1:d322e40f4edf92bf0ca329e5aa4ae1c0316feb38</id>
<content type='text'>
The driver stores chip capacity information in both the OF match table
and the SPI id table. Probe currently uses of_device_get_match_data(),
so a non-OF SPI modalias match falls back to mchp23k256_caps even when
the SPI id table selected a different part.

Use spi_get_device_match_data() so SPI id-table driver_data is consumed
when OF match data is absent. This keeps the existing default fallback
while avoiding the wrong MTD geometry for id-table-only matches.

Fixes: 4379075a870b ("mtd: mchp23k256: Add support for mchp23lcv1024")
Cc: stable@vger.kernel.org
Signed-off-by: Pengpeng Hou &lt;pengpeng@iscas.ac.cn&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: slram: simplify register_device() cleanup</title>
<updated>2026-06-11T07:20:39+00:00</updated>
<author>
<name>Ruoyu Wang</name>
<email>ruoyuw560@gmail.com</email>
</author>
<published>2026-06-09T08:45:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4fe97a54daddb221009964161fb362b2b930d657'/>
<id>urn:sha1:4fe97a54daddb221009964161fb362b2b930d657</id>
<content type='text'>
Use local variables for the list entry, mtd_info, and private data while
initializing a new device. This keeps the initialization path easier to
read and publishes the new list entry only after mtd_device_register()
has succeeded.

Signed-off-by: Ruoyu Wang &lt;ruoyuw560@gmail.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: slram: remove failed entries from the device list</title>
<updated>2026-06-11T07:20:39+00:00</updated>
<author>
<name>Ruoyu Wang</name>
<email>ruoyuw560@gmail.com</email>
</author>
<published>2026-06-09T08:45:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=36f1648644d769c496a8e47e53603e863e358d73'/>
<id>urn:sha1:36f1648644d769c496a8e47e53603e863e358d73</id>
<content type='text'>
register_device() links a new slram_mtdlist entry before allocating all
of the state needed by the entry. If a later allocation, memremap(), or
mtd_device_register() fails, the partially initialized entry remains on
the global list. A later cleanup can then dereference or free invalid
state from that failed entry.

Unwind the partially initialized entry and clear the list tail on each
failure path after the entry has been linked.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Ruoyu Wang &lt;ruoyuw560@gmail.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: docg3: fix use-after-free in docg3_release()</title>
<updated>2026-03-11T15:24:10+00:00</updated>
<author>
<name>James Kim</name>
<email>james010kim@gmail.com</email>
</author>
<published>2026-03-09T06:05:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ca19808bc6fac7e29420d8508df569b346b3e339'/>
<id>urn:sha1:ca19808bc6fac7e29420d8508df569b346b3e339</id>
<content type='text'>
In docg3_release(), the docg3 pointer is obtained from
cascade-&gt;floors[0]-&gt;priv before the loop that calls
doc_release_device() on each floor. doc_release_device() frees the
docg3 struct via kfree(docg3) at line 1881. After the loop,
docg3-&gt;cascade-&gt;bch dereferences the already-freed pointer.

Fix this by accessing cascade-&gt;bch directly, which is equivalent
since docg3-&gt;cascade points back to the same cascade struct, and
is already available as a local variable. This also removes the
now-unused docg3 local variable.

Fixes: c8ae3f744ddc ("lib/bch: Rework a little bit the exported function names")
Cc: stable@vger.kernel.org
Signed-off-by: James Kim &lt;james010kim@gmail.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>Convert 'alloc_flex' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T01:06:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3'/>
<id>urn:sha1:323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3</id>
<content type='text'>
This is the exact same thing as the 'alloc_obj()' version, only much
smaller because there are a lot fewer users of the *alloc_flex()
interface.

As with alloc_obj() version, this was done entirely with mindless brute
force, using the same script, except using 'flex' in the pattern rather
than 'objs*'.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T00:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>urn:sha1:bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>mtd: intel-dg: Fix accessing regions before setting nregions</title>
<updated>2026-01-19T10:49:21+00:00</updated>
<author>
<name>Alexander Usyskin</name>
<email>alexander.usyskin@intel.com</email>
</author>
<published>2026-01-15T05:22:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=779c59274d03cc5c07237a2c845dfb71cff77705'/>
<id>urn:sha1:779c59274d03cc5c07237a2c845dfb71cff77705</id>
<content type='text'>
The regions array is counted by nregions, but it's set only after
accessing it:

[] UBSAN: array-index-out-of-bounds in drivers/mtd/devices/mtd_intel_dg.c:750:15
[] index 0 is out of range for type '&lt;unknown&gt; [*]'

Fix it by also fixing an undesired behavior: the loop silently ignores
ENOMEM and continues setting the other entries.

CC: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
CC: Raag Jadav &lt;raag.jadav@intel.com&gt;
Reported-by: Jani Partanen &lt;jiipee@sotapeli.fi&gt;
Closes: https://lore.kernel.org/all/caca6c67-4f1d-49f1-948f-e63b6b937b29@sotapeli.fi
Fixes: ceb5ab3cb646 ("mtd: add driver for intel graphics non-volatile memory device")
Signed-off-by: Lucas De Marchi &lt;demarchi@kernel.org&gt;
Signed-off-by: Alexander Usyskin &lt;alexander.usyskin@intel.com&gt;
Reviewed-by: Raag Jadav &lt;raag.jadav@intel.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
</feed>
