diff options
| author | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2016-04-12 12:58:14 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-18 17:06:47 -0700 |
| commit | 1441dcbdcbe529fd7f0db6fd95b4bc9d867e04bb (patch) | |
| tree | 8220dfa2353e03a8dbb5bd6480a83e62816512e1 /kernel/workqueue.c | |
| parent | 444189274bd802692e3e9334e23c1d9348ea87f6 (diff) | |
spi: spi-ti-qspi: Handle truncated frames properly
commit 1ff7760ff66b98ef244bf0e5e2bd5310651205ad upstream.
We clamp frame_len_words to a maximum of 4096, but do not actually
limit the number of words written or read through the DATA registers
or the length added to spi_message::actual_length. This results in
silent data corruption for commands longer than this maximum.
Recalculate the length of each transfer, taking frame_len_words into
account. Use this length in qspi_{read,write}_msg(), and to increment
spi_message::actual_length.
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/workqueue.c')
0 files changed, 0 insertions, 0 deletions
