[PATCH -next] leds: blinkm: remove set but not used variable

2020-05-09 Thread Hongbo Yao
Fixes gcc '-Wunused-but-set-variable' warning: drivers/leds/leds-blinkm.c:483:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret; Reported-by: Hulk Robot Signed-off-by: Hongbo Yao --- drivers/leds/leds-blinkm.c | 5 ++--- 1 file changed, 2 insertions(+), 3

[PATCH -next] power: reset: ltc2952: remove set but used variable

2020-05-08 Thread Hongbo Yao
Fixes gcc '-Wunused-but-set-variable' warning: drivers/power/reset/ltc2952-poweroff.c:97:16: warning: variable ‘overruns’ set but not used [-Wunused-but-set-variable] unsigned long overruns; Reported-by: Hulk Robot Signed-off-by: Hongbo Yao --- drivers/power/reset/ltc2952-poweroff.c | 3

[PATCH] media: v4l2-mem2mem: fix potential memory leak in v4l2_m2m_register_media_controller

2019-08-27 Thread Hongbo Yao
030 [<20dfefad>] do_one_initcall+0xd4/0x454 init/main.c:939 [<e7a758cd>] do_init_module+0xe0/0x330 kernel/module.c:3468 = When the first entity was created failed, m2m_dev->source->na

[PATCH v2] irqchip/gicv3-its: fix some definitions of inner cacheability attributes

2019-04-08 Thread Hongbo Yao
Some definitions of Inner Cacheability attibutes need to be corrected. Fixes: 8c828a535e29f ("irqchip/gicv3-its: Restore all cacheability attributes") Signed-off-by: Hongbo Yao --- include/linux/irqchip/arm-gic-v3.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-)

[PATCH] irqchip/gicv3-its: fix some definitions of inner cacheability attributes

2019-04-08 Thread Hongbo Yao
From: Vladimir Murzin Some definitions of Inner Cacheability attibutes need to be corrected. Fixes: 8c828a535e29f ("irqchip/gicv3-its: Restore all cacheability attributes") Signed-off-by: Hongbo Yao --- include/linux/irqchip/arm-gic-v3.h | 12 ++-- 1 file changed, 6 insert

[RFC PATCH 0/2] add ktime_sub_safe() to avoid undefined behaviour

2019-03-06 Thread Hongbo Yao
When I ran Syzkaller testsuite, I got some UBSAN warnings with ktime_sub(). Instead of putting overflow checks into each place, add a function which does the sanity checking and convert all affected callers to use it. Hongbo Yao (2): ktime: add ktime_sub_safe() to avoid undefined behaviour

[RFC PATCH 2/2] hrtimer: Prevent overflow for relative refrences

2019-03-06 Thread Hongbo Yao
apic_timer_interrupt+0xf/0x20 === Use ktime_sub_safe() which has the necessary sanity checks in place and limits the result to the valid range. Signed-off-by: Hongbo Yao --- kernel/time/hrtimer.c | 6 -- 1 file changed, 4 insertions(+), 2

[RFC PATCH 1/2] ktime: add ktime_sub_safe() to avoid undefined behaviour

2019-03-06 Thread Hongbo Yao
-by: Xiongfeng Wang Signed-off-by: Hongbo Yao --- include/linux/ktime.h | 8 kernel/time/hrtimer.c | 16 2 files changed, 24 insertions(+) diff --git a/include/linux/ktime.h b/include/linux/ktime.h index b2bb44f87f5a..325e794b0dd1 100644 --- a/include/linux/ktime.h +++ b

[PATCH] time64: Avoid undefined behaviour in timespec64_add()

2019-02-24 Thread Hongbo Yao
dition will be done using unsigned arithmetic). This patch doesn't change generated code. Signed-off-by: Hongbo Yao --- include/linux/time64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/time64.h b/include/linux/time64.h index 05634afba0db..5926bdd4167f

[PATCH] fs: Avoid signed overflow UBSAN warning

2019-02-23 Thread Hongbo Yao
overflow.This patch doesn't change generated code. Signed-off-by: Hongbo Yao --- fs/read_write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/read_write.c b/fs/read_write.c index 8f08d4a2aa9a..0509e81afc8e 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -248,7 +248,7

[PATCH] nvme: fix out of bounds access in nvme_cqe_pending

2019-01-06 Thread Hongbo Yao
]--- Signed-off-by: Hongbo Yao --- drivers/nvme/host/pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index d668682..68375d4 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -908,9 +908,11 @@