projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
i2c: xgene: Avoid dma_buffer overrun
[platform/kernel/linux-starfive.git]
/
drivers
/
i2c
/
busses
/
i2c-xgene-slimpro.c
diff --git
a/drivers/i2c/busses/i2c-xgene-slimpro.c
b/drivers/i2c/busses/i2c-xgene-slimpro.c
index
263685c
..
05cf192
100644
(file)
--- a/
drivers/i2c/busses/i2c-xgene-slimpro.c
+++ b/
drivers/i2c/busses/i2c-xgene-slimpro.c
@@
-105,7
+105,7
@@
struct slimpro_i2c_dev {
struct mbox_chan *mbox_chan;
struct mbox_client mbox_client;
struct completion rd_complete;
- u8 dma_buffer[I2C_SMBUS_BLOCK_MAX
];
+ u8 dma_buffer[I2C_SMBUS_BLOCK_MAX
+ 1]; /* dma_buffer[0] is used for length */
u32 *resp_msg;
};