<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/mtd, branch v3.14.5</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/mtd?h=v3.14.5</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/mtd?h=v3.14.5'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-05-13T11:32:55Z</updated>
<entry>
<title>mtd: sm_ftl: heap corruption in sm_create_sysfs_attributes()</title>
<updated>2014-05-13T11:32:55Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2013-12-05T14:53:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=93dd8b49c22623eb72a10beb44926dbd948c3618'/>
<id>urn:sha1:93dd8b49c22623eb72a10beb44926dbd948c3618</id>
<content type='text'>
commit b4c233057771581698a13694ab6f33b48ce837dc upstream.

We always put a NUL terminator one space past the end of the "vendor"
buffer.  Walter Harms also pointed out that this should just use
kstrndup().

Fixes: 7d17c02a01a1 ('mtd: Add new SmartMedia/xD FTL')

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.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>mtd: nuc900_nand: NULL dereference in nuc900_nand_enable()</title>
<updated>2014-05-13T11:32:54Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-02-17T20:03:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9ef4bb8b24c83617043c6804fb547dbe1c4d9052'/>
<id>urn:sha1:9ef4bb8b24c83617043c6804fb547dbe1c4d9052</id>
<content type='text'>
commit c69dbbf3335a21aae74376d7e5db50a486d52439 upstream.

Instead of writing to "nand-&gt;reg + REG_FMICSR" we write to "REG_FMICSR"
which is NULL and not a valid register.

Fixes: 8bff82cbc308 ('mtd: add nand support for w90p910 (v2)')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.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>mtd: diskonchip: mem resource name is not optional</title>
<updated>2014-05-13T11:32:54Z</updated>
<author>
<name>Sasha Levin</name>
<email>sasha.levin@oracle.com</email>
</author>
<published>2014-03-19T22:24:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=81cb54ac10383b6d8c19674c9498a4f0e880250d'/>
<id>urn:sha1:81cb54ac10383b6d8c19674c9498a4f0e880250d</id>
<content type='text'>
commit 86e4bbc766b9456f583f2fc3c4f6c623b422af88 upstream.

Passing a name to request_mem_region() isn't optional and can't just
be NULL. Passing NULL causes a NULL ptr deref later in the boot
process.

Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Tested-by: Alexander Shiyan &lt;shc_work@mail.ru&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>mtd: atmel_nand: Disable subpage NAND write when using Atmel PMECC</title>
<updated>2014-05-13T11:32:54Z</updated>
<author>
<name>Herve Codina</name>
<email>Herve.CODINA@celad.com</email>
</author>
<published>2014-03-03T11:15:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4893808f711ae288cfd36c86e4a1ad694dad3d9e'/>
<id>urn:sha1:4893808f711ae288cfd36c86e4a1ad694dad3d9e</id>
<content type='text'>
commit 90445ff6241e2a13445310803e2efa606c61f276 upstream.

Crash detected on sam5d35 and its pmecc nand ecc controller.

The problem was a call to chip-&gt;ecc.hwctl from nand_write_subpage_hwecc
(nand_base.c) when we write a sub page.
chip-&gt;ecc.hwctl function is not set when we are using PMECC controller.
As a workaround, set NAND_NO_SUBPAGE_WRITE for PMECC controller in
order to disable sub page access in nand_write_page.

Signed-off-by: Herve Codina &lt;Herve.CODINA@celad.com&gt;
Acked-by: Josh Wu &lt;josh.wu@atmel.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>Merge tag 'upstream-3.14-rc5' of git://git.infradead.org/linux-ubifs</title>
<updated>2014-02-27T18:36:50Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-02-27T18:36:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bb7d43b149ef88cd0d3cb38bb49ebb69a460b42b'/>
<id>urn:sha1:bb7d43b149ef88cd0d3cb38bb49ebb69a460b42b</id>
<content type='text'>
Pull ubifs fix from Artem Bityutskiy:
 "Just a single fix for the UBI module unload path which makes sure we
  do not touch freed memory"

* tag 'upstream-3.14-rc5' of git://git.infradead.org/linux-ubifs:
  UBI: fix some use after free bugs
</content>
</entry>
<entry>
<title>mtd: nand: omap: fix ecclayout-&gt;oobfree-&gt;length</title>
<updated>2014-02-23T22:49:57Z</updated>
<author>
<name>Pekon Gupta</name>
<email>pekon@ti.com</email>
</author>
<published>2014-02-17T07:41:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bb38eefb6858ce16b34716145b9597a5680aa54c'/>
<id>urn:sha1:bb38eefb6858ce16b34716145b9597a5680aa54c</id>
<content type='text'>
This patch excludes reserved-marker byte-position from oobfree-&gt;length
calculation. Thus all bytes from oobfree-&gt;offset till end of OOB are free.

CC: &lt;stable@vger.kernel.org&gt; # 3.13.x+
Signed-off-by: Pekon Gupta &lt;pekon@ti.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: nand: omap: fix ecclayout-&gt;oobfree-&gt;offset</title>
<updated>2014-02-23T22:49:57Z</updated>
<author>
<name>Pekon Gupta</name>
<email>pekon@ti.com</email>
</author>
<published>2014-02-17T07:41:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aa6092f9835893290e77c3e24649def49dac1583'/>
<id>urn:sha1:aa6092f9835893290e77c3e24649def49dac1583</id>
<content type='text'>
1) In current implementation, ecclayout-&gt;oobfree-&gt;offset is calculated with
 respect to ecclayout-&gt;eccpos[0] which is incorrect because ECC bytes may not
 be stored contiguously in OOB.
 So, this patch calculates ecclayout-&gt;oobfree-&gt;offset with respect to last
 ECC byte-position 'eccpos[ecclayout-&gt;eccbytes-1]'.

2) ECC layout of some ecc-schemes expects reserved-markers at specific eccpos[]
 which should not be over-written by any file-system metadata.
 So this patch aligns oobfree-&gt;offset taking into account of such markers.

CC: &lt;stable@vger.kernel.org&gt; # 3.13.x+
Tested-by: Enric Balletbo i Serra &lt;eballetbo@gmail.com&gt;
Tested-by: Stefan Roese &lt;sr@denx.de&gt;
Signed-off-by: Pekon Gupta &lt;pekon@ti.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: nand: omap: fix ecclayout to be in sync with u-boot NAND driver</title>
<updated>2014-02-23T22:49:56Z</updated>
<author>
<name>Pekon Gupta</name>
<email>pekon@ti.com</email>
</author>
<published>2014-02-17T07:41:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eae39cb4934d3daab3ec828c5201c955b2e56af9'/>
<id>urn:sha1:eae39cb4934d3daab3ec828c5201c955b2e56af9</id>
<content type='text'>
Fixes: commit a919e51161b58ed7e6e663daba99ab7d558808f3
       mtd: nand: omap2: clean-up BCHx_HW and BCHx_SW ECC configurations in device_probe

Fixes ecclayout mismatch introduced in above commit for following ecc-schemes:
 - OMAP_ECC_BCH4_CODE_HW_DETECTION_SW
 - OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
 However, this patch also touches other ecc-schemes as the fix required
 refactoring common code, into ecc-scheme specific code.

This patch aligns ecc-layout for below ecc-schemes as per reference [1],[2],[3]

 +---+------------+-------------++-------------+-------------+
 |OOB|BCH8_CODE_HW|BCH8_CODE_HW_||HAM1_CODE_HW |HAM1_CODE_HW |
 |pos|            | DETECTION_SW||(x8 device)  |(x16 device) |
 +---+------------+-------------++-------------+-------------+
 | 0 |BADBLK_MARK | BADBLK_MARK || BADBLK_MARK | BADBLK_MARK |
 | 1 |BADBLK_MARK | BADBLK_MARK || eccpos[0]   | BADBLK_MARK |
 | 2 | eccpos[0]  | eccpos[0]   || eccpos[1]   | eccpos[0]   |
 | 3 | eccpos[1]  | eccpos[1]   || eccpos[2]   | eccpos[1]   |
 | 4 | eccpos[2]  | eccpos[2]   || eccpos[3]   | eccpos[2]   |
 | 5 | eccpos[3]  | eccpos[3]   || eccpos[4]   | eccpos[3]   |
 | 6 | eccpos[4]  | eccpos[4]   || eccpos[5]   | eccpos[4]   |
 | 7 | eccpos[5]  | eccpos[5]   || eccpos[6]   | eccpos[5]   |
 | 8 | eccpos[6]  | eccpos[6]   || eccpos[7]   | eccpos[6]   |
 | 9 | eccpos[7]  | eccpos[7]   || eccpos[8]   | eccpos[7]   |
 |10 | eccpos[8]  | eccpos[8]   || eccpos[9]   | eccpos[8]   |
 |11 | eccpos[9]  | eccpos[9]   || eccpos[10]  | eccpos[9]   |
 |12 | eccpos[10] | eccpos[10]  || eccpos[11]  | eccpos[10]  |
 |13 | eccpos[11] | eccpos[11]  || oobfree[0]  | eccpos[11]  |
 |14 | eccpos[12] | eccpos[12]  || oobfree[1]  | oobfree[0]  |
 |15 | eccpos[13] | &lt;reserved&gt;  || oobfree[2]  | oobfree[1]  |
 +---+------------+-------------++-------------+-------------+
 |16 | eccpos[14] | eccpos[13]  || oobfree[3]  | oobfree[2]  |
 |...| [...]      | [...]       || [...]       | [...]       |
 |56 | eccpos[54] | eccpos[51]  || oobfree[43] | oobfree[42] |
 |57 | eccpos[55] | &lt;reserved&gt;  || oobfree[44] | oobfree[43] |
 +===+============+=============+==============+=============+
 |58 | oobfree[0] | oobfree[0]  || oobfree[45] | oobfree[44] |
 |59 | oobfree[1] | oobfree[1]  || oobfree[46] | oobfree[45] |
 |60 | oobfree[2] | oobfree[2]  || oobfree[47] | oobfree[46] |
 |61 | oobfree[3] | oobfree[3]  || oobfree[48] | oobfree[47] |
 |62 | oobfree[4] | oobfree[4]  || oobfree[49] | oobfree[48] |
 |63 | oobfree[5] | oobfree[5]  || oobfree[50] | oobfree[49] |
 +---+------------+-------------+--------------+-------------+

[1] ecc-layout expected by ROM code, as specified in SoC TRM under:
      Chapter="Initialization"
        Section="Device Initialization by ROM code"
            Sub-Section="Memory Booting"
                Heading="NAND"
                Figure="ECC Locations in NAND Spare Areas"

[2] ecc-layout updates in u-boot
    http://lists.denx.de/pipermail/u-boot/2013-November/167551.html

[3] u-boot configurations to match above ecc-layout are documented at
    https://processors.wiki.ti.com/index.php/Linux_Core_NAND_User%27s_Guide

CC: &lt;stable@vger.kernel.org&gt; # 3.13.x+
Reported-by: Enric Balletbo Serra &lt;eballetbo@iseebcn.com&gt;
Tested-by: Enric Balletbo i Serra &lt;eballetbo@gmail.com&gt;
Tested-by: Stefan Roese &lt;sr@denx.de&gt;
Signed-off-by: Pekon Gupta &lt;pekon@ti.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: nand: fix off-by-one read retry mode counting</title>
<updated>2014-02-14T20:08:20Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2014-02-13T00:08:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=28fa65e643ed7cf753e89db20745e264c41f3682'/>
<id>urn:sha1:28fa65e643ed7cf753e89db20745e264c41f3682</id>
<content type='text'>
A flash may support N read retry voltage threshold modes, numbered 0
through N-1 (where mode 0 represents the initial state). However,
nand_do_read_ops() tries to use mode 0 through N.

This off-by-one error shows up, for instance, when using nanddump, and
we have cycled through available modes:

    nand: setting READ RETRY mode 0
    nand: setting READ RETRY mode 1
    nand: setting READ RETRY mode 2
    nand: setting READ RETRY mode 3
    nand: setting READ RETRY mode 4
    nand: setting READ RETRY mode 5
    nand: setting READ RETRY mode 6
    nand: setting READ RETRY mode 7
    nand: setting READ RETRY mode 8
    libmtd: error!: cannot read 8192 bytes from mtd0 (eraseblock 20, offset 0)
            error 22 (Invalid argument)
    nanddump: error!: mtd_read

Tested on Micron MT29F64G08CBCBBH1, with 8 retry modes.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Acked-by: Huang Shijie &lt;b32955@freescale.com&gt;
</content>
</entry>
<entry>
<title>UBI: fix some use after free bugs</title>
<updated>2014-02-04T07:44:30Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-01-29T13:17:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5547fec74a566e1f5e00a937b9a367f7c6a94a8b'/>
<id>urn:sha1:5547fec74a566e1f5e00a937b9a367f7c6a94a8b</id>
<content type='text'>
Move the kmem_cache_free() calls down a couple lines.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
</feed>
