<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/mtd, branch v4.4.8</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.8</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.8'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2016-04-12T16:09:05+00:00</updated>
<entry>
<title>mtd: onenand: fix deadlock in onenand_block_markbad</title>
<updated>2016-04-12T16:09:05+00:00</updated>
<author>
<name>Aaro Koskinen</name>
<email>aaro.koskinen@iki.fi</email>
</author>
<published>2016-02-20T20:27:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ded1db97aca15db72850c78ad222625386af4ea4'/>
<id>urn:sha1:ded1db97aca15db72850c78ad222625386af4ea4</id>
<content type='text'>
commit 5e64c29e98bfbba1b527b0a164f9493f3db9e8cb upstream.

Commit 5942ddbc500d ("mtd: introduce mtd_block_markbad interface")
incorrectly changed onenand_block_markbad() to call mtd_block_markbad
instead of onenand_chip's block_markbad function. As a result the function
will now recurse and deadlock. Fix by reverting the change.

Fixes: 5942ddbc500d ("mtd: introduce mtd_block_markbad interface")
Signed-off-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Acked-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ubi: Fix out of bounds write in volume update code</title>
<updated>2016-03-09T23:34:56+00:00</updated>
<author>
<name>Richard Weinberger</name>
<email>richard@nod.at</email>
</author>
<published>2016-02-21T09:53:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c5c2ce3560b6b28666ef337fd33653165eb97b78'/>
<id>urn:sha1:c5c2ce3560b6b28666ef337fd33653165eb97b78</id>
<content type='text'>
commit e4f6daac20332448529b11f09388f1d55ef2084c upstream.

ubi_start_leb_change() allocates too few bytes.
ubi_more_leb_change_data() will write up to req-&gt;upd_bytes +
ubi-&gt;min_io_size bytes.

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mtd: nand: assign reasonable default name for NAND drivers</title>
<updated>2016-02-17T20:30:56+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2016-01-05T18:39:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e18da11fc0f95979d14adc8e506707ed2fdab602'/>
<id>urn:sha1:e18da11fc0f95979d14adc8e506707ed2fdab602</id>
<content type='text'>
commit f7a8e38f07a17be90758559fe66fe7337096053f upstream.

Commits such as commit 853f1c58c4b2 ("mtd: nand: omap2: show parent
device structure in sysfs") attempt to rely on the core MTD code to set
the MTD name based on the parent device. However, nand_base tries to set
a different default name according to the flash name (e.g., extracted
from the ONFI parameter page), which means NAND drivers will never make
use of the MTD defaults. This is not the intention of commit
853f1c58c4b2.

This results in problems when trying to use the cmdline partition
parser, since the MTD name is different than expected. Let's fix this by
providing a default NAND name, where possible.

Note that this is not really a great default name in the long run, since
this means that if there are multiple MTDs attached to the same
controller device, they will have the same name. But that is an existing
issue and requires future work on a better controller vs. flash chip
abstraction to fix properly.

Fixes: 853f1c58c4b2 ("mtd: nand: omap2: show parent device structure in sysfs")
Reported-by: Heiko Schocher &lt;hs@denx.de&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Tested-by: Heiko Schocher &lt;hs@denx.de&gt;
Cc: Heiko Schocher &lt;hs@denx.de&gt;
Cc: Frans Klaver &lt;fransklaver@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd</title>
<updated>2016-01-07T04:32:08+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-01-07T04:32:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b06f3a168cdcd80026276898fd1fee443ef25743'/>
<id>urn:sha1:b06f3a168cdcd80026276898fd1fee443ef25743</id>
<content type='text'>
Pull MTD fixes from Brian Norris:
 "Three last MTD fixes for v4.4.  These are all fixes for regressions
  and bugs reported mid cycle.  Unfortunately, some of them took a bit
  long to get proper testing and feedback.

   - Assign the default MTD name earlier in the registration process, so
     partition parsers (like cmdlinepart) see the right name.  Without
     this, some systems may come up with unpartitioned flash.  This was
     a v4.4-rc1 regression.

   - Revert some new Winbond SPI NOR flash unlocking/locking support;
     new code in v4.4 caused regressions on some Spansion flash.

   - Fix mis-typed parameter ordering in SPI NOR unlock function; this
     bug was introduced in v4.4-rc1"

* tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd:
  mtd: spi-nor: fix stm_is_locked_sr() parameters
  mtd: spi-nor: fix Spansion regressions (aliased with Winbond)
  mtd: fix cmdlinepart parser, early naming for auto-filled MTD
</content>
</entry>
<entry>
<title>mtd: spi-nor: fix stm_is_locked_sr() parameters</title>
<updated>2016-01-06T00:00:41+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-12-15T18:48:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a32d5b726ff8cf32bf491522b0ac8ae2545a063e'/>
<id>urn:sha1:a32d5b726ff8cf32bf491522b0ac8ae2545a063e</id>
<content type='text'>
stm_is_locked_sr() takes the status register (SR) value as the last
parameter, not the second.

Reported-by: Bayi Cheng &lt;bayi.cheng@mediatek.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Bayi Cheng &lt;bayi.cheng@mediatek.com&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor: fix Spansion regressions (aliased with Winbond)</title>
<updated>2016-01-06T00:00:03+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-12-15T18:48:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=67b9bcd36906e12a15ffec19463afbbd6a41660e'/>
<id>urn:sha1:67b9bcd36906e12a15ffec19463afbbd6a41660e</id>
<content type='text'>
Spansion and Winbond have occasionally used the same manufacturer ID,
and they don't support the same features. Particularly, writing SR=0
seems to break read access for Spansion's s25fl064k. Unfortunately, we
don't currently have a way to differentiate these Spansion and Winbond
parts, so rather than regressing support for these Spansion flash, let's
drop the new Winbond lock/unlock support for now. We can try to address
Winbond support during the next release cycle.

Original discussion:

http://patchwork.ozlabs.org/patch/549173/
http://patchwork.ozlabs.org/patch/553683/

Fixes: 357ca38d4751 ("mtd: spi-nor: support lock/unlock/is_locked for Winbond")
Fixes: c6fc2171b249 ("mtd: spi-nor: disable protection for Winbond flash at startup")
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Reported-by: Felix Fietkau &lt;nbd@openwrt.org&gt;
Cc: Felix Fietkau &lt;nbd@openwrt.org&gt;
</content>
</entry>
<entry>
<title>mtd: fix cmdlinepart parser, early naming for auto-filled MTD</title>
<updated>2016-01-04T18:54:18+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-12-11T23:58:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=472b444eef934eb7e90334efdd7fc7954cfe5132'/>
<id>urn:sha1:472b444eef934eb7e90334efdd7fc7954cfe5132</id>
<content type='text'>
Commit 807f16d4db95 ("mtd: core: set some defaults when dev.parent is
set") attempted to provide some default settings for MTDs that
 (a) assign the parent device and
 (b) don't provide their own name or owner

However, this isn't a perfect drop-in replacement for the boilerplate
found in some drivers, because the MTD name is used by partition
parsers like cmdlinepart, but the name isn't set until add_mtd_device(),
after the parsing is completed. This means cmdlinepart sees a NULL name
and therefore will not work properly.

Fix this by moving the default name and owner assignment to be first in
the MTD registration process.

[Note: this does not fix all reported issues, particularly with NAND
drivers. Will require an additional fix for drivers/mtd/nand/]

Fixes: 807f16d4db95 ("mtd: core: set some defaults when dev.parent is set")
Reported-by: Heiko Schocher &lt;hs@denx.de&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Heiko Schocher &lt;hs@denx.de&gt;
Cc: Frans Klaver &lt;fransklaver@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'upstream-4.4-rc7' of git://git.infradead.org/linux-ubifs</title>
<updated>2015-12-27T03:55:16+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-12-27T03:55:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3bef22eed98b53cfb3962884f14068251a5dd3f0'/>
<id>urn:sha1:3bef22eed98b53cfb3962884f14068251a5dd3f0</id>
<content type='text'>
Pull UBI bug fixes from Richard Weinberger:
 "This contains four bug fixes for UBI"

* tag 'upstream-4.4-rc7' of git://git.infradead.org/linux-ubifs:
  mtd: ubi: don't leak e if schedule_erase() fails
  mtd: ubi: fixup error correction in do_sync_erase()
  UBI: fix use of "VID" vs. "EC" in header self-check
  UBI: fix return error code
</content>
</entry>
<entry>
<title>mtd: ubi: don't leak e if schedule_erase() fails</title>
<updated>2015-12-16T21:59:03+00:00</updated>
<author>
<name>Sebastian Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2015-11-26T20:23:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6b238de189f69dc77d660d4cce62eed15547f4c3'/>
<id>urn:sha1:6b238de189f69dc77d660d4cce62eed15547f4c3</id>
<content type='text'>
If __erase_worker() fails to erase the EB and schedule_erase() fails as
well to do anything about it then we go RO. But that is not a reason to
leak the e argument here. Therefore clean up e.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>mtd: ubi: fixup error correction in do_sync_erase()</title>
<updated>2015-12-16T21:52:46+00:00</updated>
<author>
<name>Sebastian Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2015-11-26T20:23:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a31b20cd81d5cbc7ec6e24cb08066009a1ca32d'/>
<id>urn:sha1:1a31b20cd81d5cbc7ec6e24cb08066009a1ca32d</id>
<content type='text'>
Since fastmap we gained do_sync_erase(). This function can return an error
and its error handling isn't obvious. First the memory allocation for
struct ubi_work can fail and as such struct ubi_wl_entry is leaked.
However if the memory allocation succeeds then the tail function takes
care of the struct ubi_wl_entry. A free here could result in a double
free.
To make the error handling simpler, I split the tail function into one
piece which does the work and another which frees the struct ubi_work
which is passed as argument. As result do_sync_erase() can keep the
struct on stack and we get rid of one error source.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 8199b901a ("UBI: Add fastmap support to the WL sub-system")
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
</feed>
