<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/mtd/sm_ftl.c, branch linux-rolling-lts</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-lts</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-lts'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-06-08T07:07:37Z</updated>
<entry>
<title>treewide, timers: Rename from_timer() to timer_container_of()</title>
<updated>2025-06-08T07:07:37Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2025-05-09T05:51:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=41cb08555c4164996d67c78b3bf1c658075b75f1'/>
<id>urn:sha1:41cb08555c4164996d67c78b3bf1c658075b75f1</id>
<content type='text'>
Move this API to the canonical timer_*() namespace.

[ tglx: Redone against pre rc1 ]

Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/all/aB2X0jCKQO56WdMt@gmail.com

</content>
</entry>
<entry>
<title>treewide: Switch/rename to timer_delete[_sync]()</title>
<updated>2025-04-05T08:30:12Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2025-04-05T08:17:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8fa7292fee5c5240402371ea89ab285ec856c916'/>
<id>urn:sha1:8fa7292fee5c5240402371ea89ab285ec856c916</id>
<content type='text'>
timer_delete[_sync]() replaces del_timer[_sync](). Convert the whole tree
over and remove the historical wrapper inlines.

Conversion was done with coccinelle plus manual fixups where necessary.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>mtd: sm_ftl: Fix typos in comments</title>
<updated>2023-06-22T21:00:43Z</updated>
<author>
<name>Bo Liu</name>
</author>
<published>2023-06-21T02:03:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=efd2ed9351efefe40cbcca36a527adf38ffe1b4d'/>
<id>urn:sha1:efd2ed9351efefe40cbcca36a527adf38ffe1b4d</id>
<content type='text'>
Fix typo in the description of the 'succesfull'.

Signed-off-by: Bo Liu &lt;liubo03@inspur.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20230621020331.1508-1-wangdeming@inspur.com
</content>
</entry>
<entry>
<title>mtd: always initialize 'stats' in struct mtd_oob_ops</title>
<updated>2022-09-21T08:38:07Z</updated>
<author>
<name>Michał Kępień</name>
</author>
<published>2022-06-29T12:57:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=745df17906029cc683b8b5ac8bcb08f82860baff'/>
<id>urn:sha1:745df17906029cc683b8b5ac8bcb08f82860baff</id>
<content type='text'>
As the 'stats' field in struct mtd_oob_ops is used in conditional
expressions, ensure it is always zero-initialized in all such structures
to prevent random stack garbage from being interpreted as a pointer.

Strictly speaking, this problem currently only needs to be fixed for
struct mtd_oob_ops structures subsequently passed to mtd_read_oob().
However, this commit goes a step further and makes all instances of
struct mtd_oob_ops in the tree zero-initialized, in hope of preventing
future problems, e.g. if struct mtd_req_stats gets extended with write
statistics at some point.

Signed-off-by: Michał Kępień &lt;kernel@kempniu.pl&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20220629125737.14418-3-kernel@kempniu.pl
</content>
</entry>
<entry>
<title>mtd: sm_ftl: Fix deadlock caused by cancel_work_sync in sm_release</title>
<updated>2022-06-09T13:03:23Z</updated>
<author>
<name>Duoming Zhou</name>
</author>
<published>2022-05-24T04:48:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a61528d997619a518ee8c51cf0ef0513021afaff'/>
<id>urn:sha1:a61528d997619a518ee8c51cf0ef0513021afaff</id>
<content type='text'>
There is a deadlock between sm_release and sm_cache_flush_work
which is a work item. The cancel_work_sync in sm_release will
not return until sm_cache_flush_work is finished. If we hold
mutex_lock and use cancel_work_sync to wait the work item to
finish, the work item also requires mutex_lock. As a result,
the sm_release will be blocked forever. The race condition is
shown below:

    (Thread 1)             |   (Thread 2)
sm_release                 |
  mutex_lock(&amp;ftl-&gt;mutex)  | sm_cache_flush_work
                           |   mutex_lock(&amp;ftl-&gt;mutex)
  cancel_work_sync         |   ...

This patch moves del_timer_sync and cancel_work_sync out of
mutex_lock in order to mitigate deadlock.

Fixes: 7d17c02a01a1 ("mtd: Add new SmartMedia/xD FTL")
Signed-off-by: Duoming Zhou &lt;duoming@zju.edu.cn&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20220524044841.10517-1-duoming@zju.edu.cn
</content>
</entry>
<entry>
<title>drivers: mtd: sm_ftl: Fix alignment of block comment</title>
<updated>2021-05-10T10:49:00Z</updated>
<author>
<name>Shubhankar Kuranagatti</name>
</author>
<published>2021-05-04T06:20:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cc9d663a00a00b4a3d54875e024b79142416caf6'/>
<id>urn:sha1:cc9d663a00a00b4a3d54875e024b79142416caf6</id>
<content type='text'>
A star has been added to subsequent line of block comment
The closing */ has been shifted to new line
This is done to maintain code uniformity

Signed-off-by: Shubhankar Kuranagatti &lt;shubhankarvk@gmail.com&gt;
[&lt;miquel.raynal@bootlin.com&gt;: Fixed the title]
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20210504062059.mywqzwveyjfawreg@kewl-virtual-machine
</content>
</entry>
<entry>
<title>mtd: nand: ecc-hamming: Rename the exported functions</title>
<updated>2020-12-10T21:37:29Z</updated>
<author>
<name>Miquel Raynal</name>
</author>
<published>2020-09-29T23:01:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=90ccf0a0192f7fa06e52de80cb528c5217e3e297'/>
<id>urn:sha1:90ccf0a0192f7fa06e52de80cb528c5217e3e297</id>
<content type='text'>
Prefix by ecc_sw_hamming_ the functions which should be internal only
but are exported for "raw" operations.

Prefix by nand_ecc_sw_hamming_ the other functions which will be used
in the context of the declaration of an Hamming proper ECC engine
object.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-16-miquel.raynal@bootlin.com
</content>
</entry>
<entry>
<title>mtd: nand: ecc-hamming: Move Hamming code to the generic NAND layer</title>
<updated>2020-12-10T21:37:29Z</updated>
<author>
<name>Miquel Raynal</name>
</author>
<published>2020-09-29T23:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5acf9c862974041f7b2f581d1a40ccd29769add'/>
<id>urn:sha1:e5acf9c862974041f7b2f581d1a40ccd29769add</id>
<content type='text'>
Hamming ECC code might be later re-used by the SPI NAND layer.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-12-miquel.raynal@bootlin.com
</content>
</entry>
<entry>
<title>mtd: sm_ftl: fix NULL pointer warning</title>
<updated>2020-01-09T19:09:55Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2020-01-07T21:24:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de08b5ac10420db597cb24c41b4d8d06cce15ffd'/>
<id>urn:sha1:de08b5ac10420db597cb24c41b4d8d06cce15ffd</id>
<content type='text'>
With gcc -O3, we get a new warning:

In file included from arch/arm64/include/asm/processor.h:28,
                 from drivers/mtd/sm_ftl.c:8:
In function 'memset',
    inlined from 'sm_read_sector.constprop' at drivers/mtd/sm_ftl.c:250:3:
include/linux/string.h:411:9: error: argument 1 null where non-null expected [-Werror=nonnull]
  return __builtin_memset(p, c, size);

&gt;From all I can tell, this cannot happen (the function is called
either with a NULL buffer or with a -1 block number but not both),
but adding a check makes it more robust and avoids the warning.

Fixes: mmtom ("init/Kconfig: enable -O3 for all arches")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: sm_ftl: Fix memory leak in sm_init_zone() error path</title>
<updated>2019-09-15T21:50:50Z</updated>
<author>
<name>Wenwen Wang</name>
</author>
<published>2019-08-18T16:36:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=137e92fd14959506269d58e08dae35c0bb745211'/>
<id>urn:sha1:137e92fd14959506269d58e08dae35c0bb745211</id>
<content type='text'>
In sm_init_zone(), 'zone-&gt;lba_to_phys_table' is allocated through
kmalloc_array() and 'zone-&gt;free_sectors' is allocated in kfifo_alloc()
respectively. However, they are not deallocated in the following execution
if sm_read_sector() fails, leading to memory leaks. To fix this issue, free
them before returning -EIO.

Signed-off-by: Wenwen Wang &lt;wenwen@cs.uga.edu&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
</feed>
