]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: xgene: Avoid dma_buffer overrun
authorHoan Tran <hotran@apm.com>
Mon, 10 Oct 2016 17:13:10 +0000 (10:13 -0700)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 25 Oct 2016 09:50:52 +0000 (11:50 +0200)
commit68d297bf6bd676e9fe741bc6ee2b974b54c85ce7
treeada121761e6a90165f86d2578087750e2afea7ac
parent95c1b4ea6a29d4bf70cc5bd69390df367f220517
i2c: xgene: Avoid dma_buffer overrun

SMBus block command uses the first byte of buffer for the data length.
The dma_buffer should be increased by 1 to avoid the overrun issue.

Reported-by: Phil Endecott <phil_gjouf_endecott@chezphil.org>
Signed-off-by: Hoan Tran <hotran@apm.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
drivers/i2c/busses/i2c-xgene-slimpro.c