diff options
author | Joey Zhang <joey.zhang@microchip.com> | 2018-12-10 12:12:22 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-12 21:47:09 +0300 |
commit | 3332bf15bfdeb3de78922fe1d7c12e69270a77af (patch) | |
tree | c3b1294896142b30940d00a5cf0787845f6cfed6 /arch/arm/mach-pxa/littleton.c | |
parent | 6a1d712b43811fa2992b56108a633531406eac48 (diff) | |
download | linux-3332bf15bfdeb3de78922fe1d7c12e69270a77af.tar.xz |
switchtec: Fix SWITCHTEC_IOCTL_EVENT_IDX_ALL flags overwrite
[ Upstream commit e4a7dca5de625018b29417ecc39dc5037d9a5a36 ]
In the ioctl_event_ctl() SWITCHTEC_IOCTL_EVENT_IDX_ALL case, we call
event_ctl() several times with the same "ctl" struct. Each call clobbers
ctl.flags, which leads to the problem that we may not actually enable or
disable all events as the user requested.
Preserve the event flag value with a temporary variable.
Fixes: 52eabba5bcdb ("switchtec: Add IOCTLs to the Switchtec driver")
Signed-off-by: Joey Zhang <joey.zhang@microchip.com>
Signed-off-by: Wesley Sheng <wesley.sheng@microchip.com>
[bhelgaas: changelog]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/arm/mach-pxa/littleton.c')
0 files changed, 0 insertions, 0 deletions