<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/mtd/ubi/build.c, branch linux-4.20.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-12-13T21:09:32Z</updated>
<entry>
<title>ubi: Put MTD device after it is not used</title>
<updated>2018-12-13T21:09:32Z</updated>
<author>
<name>Pan Bian</name>
</author>
<published>2018-11-28T02:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b95f83ab762dd6211351b9140f99f43644076ca8'/>
<id>urn:sha1:b95f83ab762dd6211351b9140f99f43644076ca8</id>
<content type='text'>
The MTD device reference is dropped via put_mtd_device, however its
field -&gt;index is read and passed to ubi_msg. To fix this, the patch
moves the reference dropping after calling ubi_msg.

Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>ubi: Mark expected switch fall-throughs</title>
<updated>2018-10-23T11:46:48Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2018-10-05T08:29:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7e5583fd77194b45eef04835576a4fe7f3f235c8'/>
<id>urn:sha1:7e5583fd77194b45eef04835576a4fe7f3f235c8</id>
<content type='text'>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 1373884 ("Missing break in switch")
Addresses-Coverity-ID: 114869 ("Missing break in switch")
Addresses-Coverity-ID: 114870 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>ubi: fastmap: Check each mapping only once</title>
<updated>2018-06-07T13:53:16Z</updated>
<author>
<name>Richard Weinberger</name>
</author>
<published>2018-05-28T20:04:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34653fd8c46e771585fce5975e4243f8fd401914'/>
<id>urn:sha1:34653fd8c46e771585fce5975e4243f8fd401914</id>
<content type='text'>
Maintain a bitmap to keep track of which LEB-&gt;PEB mapping
was checked already.
That way we have to read back VID headers only once.

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>ubi: fastmap: Cancel work upon detach</title>
<updated>2018-06-07T13:53:16Z</updated>
<author>
<name>Richard Weinberger</name>
</author>
<published>2018-05-16T20:17:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e7d80161066c99d12580d1b985cb1408bb58cf1'/>
<id>urn:sha1:6e7d80161066c99d12580d1b985cb1408bb58cf1</id>
<content type='text'>
Ben Hutchings pointed out that 29b7a6fa1ec0 ("ubi: fastmap: Don't flush
fastmap work on detach") does not really fix the problem, it just
reduces the risk to hit the race window where fastmap work races against
free()'ing ubi-&gt;volumes[].

The correct approach is making sure that no more fastmap work is in
progress before we free ubi data structures.
So we cancel fastmap work right after the ubi background thread is
stopped.
By setting ubi-&gt;thread_enabled to zero we make sure that no further work
tries to wake the thread.

Fixes: 29b7a6fa1ec0 ("ubi: fastmap: Don't flush fastmap work on detach")
Fixes: 74cdaf24004a ("UBI: Fastmap: Fix memory leaks while closing the WL sub-system")
Cc: stable@vger.kernel.org
Cc: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Cc: Martin Townsend &lt;mtownsend1973@gmail.com&gt;

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>ubi: Reject MLC NAND</title>
<updated>2018-04-04T21:48:11Z</updated>
<author>
<name>Richard Weinberger</name>
</author>
<published>2018-03-03T10:45:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b5094b7f135be34630e3ea8a98fa215715d0f29d'/>
<id>urn:sha1:b5094b7f135be34630e3ea8a98fa215715d0f29d</id>
<content type='text'>
While UBI and UBIFS seem to work at first sight with MLC NAND, you will
most likely lose all your data upon a power-cut or due to read/write
disturb.
In order to protect users from bad surprises, refuse to attach to MLC
NAND.

Cc: stable@vger.kernel.org
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Acked-by: Artem Bityutskiy &lt;dedekind1@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: ubi: Use 'max_bad_blocks' to compute bad_peb_limit if available</title>
<updated>2018-01-17T18:28:54Z</updated>
<author>
<name>Jeff Westfahl</name>
</author>
<published>2017-01-10T19:30:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c0e860ba034ead2a0f47052c87266e90f23cdb7b'/>
<id>urn:sha1:c0e860ba034ead2a0f47052c87266e90f23cdb7b</id>
<content type='text'>
If the user has not set max_beb_per1024 using either the cmdline or
Kconfig options for doing so, use the MTD function 'max_bad_blocks' to
compute the UBI bad_peb_limit.

Signed-off-by: Jeff Westfahl &lt;jeff.westfahl@ni.com&gt;
Signed-off-by: Zach Brown &lt;zach.brown@ni.com&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@free-electron.com&gt;
Acked-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>treewide: Fix function prototypes for module_param_call()</title>
<updated>2017-10-31T14:30:37Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2017-10-18T02:04:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e4dca7b7aa08b22893c45485d222b5807c1375ae'/>
<id>urn:sha1:e4dca7b7aa08b22893c45485d222b5807c1375ae</id>
<content type='text'>
Several function prototypes for the set/get functions defined by
module_param_call() have a slightly wrong argument types. This fixes
those in an effort to clean up the calls when running under type-enforced
compiler instrumentation for CFI. This is the result of running the
following semantic patch:

@match_module_param_call_function@
declarer name module_param_call;
identifier _name, _set_func, _get_func;
expression _arg, _mode;
@@

 module_param_call(_name, _set_func, _get_func, _arg, _mode);

@fix_set_prototype
 depends on match_module_param_call_function@
identifier match_module_param_call_function._set_func;
identifier _val, _param;
type _val_type, _param_type;
@@

 int _set_func(
-_val_type _val
+const char * _val
 ,
-_param_type _param
+const struct kernel_param * _param
 ) { ... }

@fix_get_prototype
 depends on match_module_param_call_function@
identifier match_module_param_call_function._get_func;
identifier _val, _param;
type _val_type, _param_type;
@@

 int _get_func(
-_val_type _val
+char * _val
 ,
-_param_type _param
+const struct kernel_param * _param
 ) { ... }

Two additional by-hand changes are included for places where the above
Coccinelle script didn't notice them:

	drivers/platform/x86/thinkpad_acpi.c
	fs/lockd/svc.c

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Jessica Yu &lt;jeyu@kernel.org&gt;
</content>
</entry>
<entry>
<title>ubi: pr_err() strings should end with newlines</title>
<updated>2017-09-13T20:05:30Z</updated>
<author>
<name>Ben Dooks</name>
</author>
<published>2017-07-26T09:51:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a51b7ccf3bf57956c64076987a9ad1152e896e79'/>
<id>urn:sha1:a51b7ccf3bf57956c64076987a9ad1152e896e79</id>
<content type='text'>
In ubi_attach_mtd_dev() the pr_err() calls should have their
messgaes terminated with a new-line to avoid other messages
being concatenated onto the end.

Signed-off-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>ubi: pr_err() strings should end with newlines</title>
<updated>2017-09-13T20:05:30Z</updated>
<author>
<name>Ben Dooks</name>
</author>
<published>2017-07-26T09:42:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=278f31a70d2e40aa31bf465795bfce2ca8bb01b6'/>
<id>urn:sha1:278f31a70d2e40aa31bf465795bfce2ca8bb01b6</id>
<content type='text'>
The ubi_init() function has a few error paths that use the
pr_err() to output errors. These should have new lines on
them as pr_err() does not automatically do this.

This fixes issues where if multiple mtd fail to bind to
ubi the console output starts wrapping around.

Signed-off-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>mtd: use class_groups instead of class_attrs</title>
<updated>2017-06-09T08:41:00Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2017-06-08T08:12:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=219eccdabb3a877d285b35b59cfeb242381f9d50'/>
<id>urn:sha1:219eccdabb3a877d285b35b59cfeb242381f9d50</id>
<content type='text'>
The class_attrs pointer is long depreciated, and is about to be finally
removed, so move to use the class_groups pointer instead.

Cc: Artem Bityutskiy &lt;dedekind1@gmail.com&gt;
Acked-by: Richard Weinberger &lt;richard@nod.at&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Cc: Marek Vasut &lt;marek.vasut@gmail.com&gt;
Cc: Cyrille Pitchen &lt;cyrille.pitchen@wedev4u.fr&gt;
Cc: &lt;linux-mtd@lists.infradead.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
