linux-stable/lib/reed_solomon
Ferdinand Blomqvist 2034a42d17 rslib: Fix decoding of shortened codes
The decoding of shortenend codes is broken. It only works as expected if
there are no erasures.

When decoding with erasures, Lambda (the error and erasure locator
polynomial) is initialized from the given erasure positions. The pad
parameter is not accounted for by the initialisation code, and hence
Lambda is initialized from incorrect erasure positions.

The fix is to adjust the erasure positions by the supplied pad.

Signed-off-by: Ferdinand Blomqvist <ferdinand.blomqvist@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190620141039.9874-3-ferdinand.blomqvist@gmail.com
2019-06-26 14:55:45 +02:00
..
decode_rs.c rslib: Fix decoding of shortened codes 2019-06-26 14:55:45 +02:00
encode_rs.c rslib: Split rs control struct 2018-04-24 19:50:08 -07:00
Makefile rslib: Add tests for the encoder and decoder 2019-06-26 14:55:45 +02:00
reed_solomon.c reed_solomon: Fix kernel-doc 2018-07-10 15:00:52 -06:00
test_rslib.c rslib: Add tests for the encoder and decoder 2019-06-26 14:55:45 +02:00