summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib-devres.c
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2020-03-13 09:58:07 +0800
committerMark Brown <broonie@kernel.org>2020-03-13 16:33:58 +0000
commit74edd08a4fbf51d65fd8f4c7d8289cd0f392bd91 (patch)
treec52fc2420ac61aba892572fff6da666db1713cfb /drivers/gpio/gpiolib-devres.c
parentbb6d3fb354c5ee8d6bde2d576eb7220ea09862b9 (diff)
regmap: debugfs: check count when read regmap file
When executing the following command, we met kernel dump. dmesg -c > /dev/null; cd /sys; for i in `ls /sys/kernel/debug/regmap/* -d`; do echo "Checking regmap in $i"; cat $i/registers; done && grep -ri "0x02d0" *; It is because the count value is too big, and kmalloc fails. So add an upper bound check to allow max size `PAGE_SIZE << (MAX_ORDER - 1)`. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/1584064687-12964-1-git-send-email-peng.fan@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/gpio/gpiolib-devres.c')
0 files changed, 0 insertions, 0 deletions