]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: rawnand: diskonchip: Allocate rs control per instance
authorThomas Gleixner <tglx@linutronix.de>
Sun, 22 Apr 2018 16:23:54 +0000 (18:23 +0200)
committerKees Cook <keescook@chromium.org>
Wed, 25 Apr 2018 02:50:09 +0000 (19:50 -0700)
commitfc2382441500a834baba2cd2820c04643f47f6bf
treef8d6795fe6f37ac9f2ba4083c14cad22d5a9b354
parent8ef501dfffbe1bb0a5278f2ad82b057680881e7d
mtd: rawnand: diskonchip: Allocate rs control per instance

The reed solomon library is moving the on stack decoder buffers into the rs
control structure. That would break the DoC driver because multiple
instances share the same control structure and can operate in parallel. At
least in theory....

Instantiate a rs control instance per DoC device to avoid that. The per
instance buffer is fine as the operation on a single DoC instance is
serialized by the MTD/NAND core.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Boris Brezillon <boris.brezillon@bootlin.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Kernel Hardening <kernel-hardening@lists.openwall.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Andrew Morton <akpm@linuxfoundation.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Alasdair Kergon <agk@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
drivers/mtd/nand/raw/diskonchip.c