[PATCH v6] fbdev: fbmem: Fix the implicit type casting

2022-02-02 Thread Yizhuo Zhai
a large number, which is possible because it comes from the user input. Fix this by adding the check before the function call. Signed-off-by: Yizhuo Zhai --- drivers/video/fbdev/core/fbmem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbde

[PATCH v6] fbdev: fbmem: Fix the implicit type casting

2022-02-02 Thread Yizhuo Zhai
a large number, which is possible because it comes from the user input. Fix this by adding the check before the function call. Signed-off-by: Yizhuo Zhai --- drivers/video/fbdev/core/fbmem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbde

[PATCH v5] fbdev: fbmem: Fix the implicit type casting

2022-02-02 Thread Yizhuo Zhai
a large number, which is possible because it comes from the user input. Fix this by adding the check before the function call. Signed-off-by: Yizhuo Zhai --- drivers/video/fbdev/core/fbmem.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbde

[PATCH v5] fbdev: fbmem: Fix the implicit type casting

2022-02-02 Thread Yizhuo Zhai
a large number, which is possible because it comes from the user input. Fix this by adding the check before the function call. Signed-off-by: Yizhuo Zhai --- drivers/video/fbdev/core/fbmem.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbde

[PATCH v4] fbdev: fbmem: Fix the implicit type casting

2022-02-02 Thread Yizhuo Zhai
a large number, which is possible because it comes from the user input. Fix this by adding the check before the function call. Signed-off-by: Yizhuo Zhai --- drivers/video/fbdev/core/fbmem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbde

[PATCH v4] fbdev: fbmem: Fix the implicit type casting

2022-02-02 Thread Yizhuo Zhai
a large number, which is possible because it comes from the user input. Fix this by adding the check before the function call. Signed-off-by: Yizhuo Zhai --- drivers/video/fbdev/core/fbmem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbde

Re: [PATCH] fbdev: fbmem: Fix the implicit type casting

2022-02-02 Thread Yizhuo Zhai
ed at -1, while it wasn't > before. > >> > >> One could now argue, that it's undefined behaviour if people > >> pass in wrong values, but anyway, it's different now. > > > > We should just plug this hole and in case an illegal value is passed > > then re

Re: [PATCH] fbdev: fbmem: Fix the implicit type casting

2022-02-01 Thread Yizhuo Zhai
: Yizhuo Zhai --- drivers/video/fbdev/core/fbmem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 0fa7ede94fa6..991711bfd647 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -1162,6

[PATCH v3] fbdev: fbmem: Fix the implicit type casting

2022-02-01 Thread Yizhuo Zhai
a large number, which is possible because it comes from the user input. Fix this by adding the check before the function call. Signed-off-by: Yizhuo Zhai --- drivers/video/fbdev/core/fbmem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbde

[PATCH v3] fbdev: fbmem: Fix the implicit type casting

2022-02-01 Thread Yizhuo Zhai
a large number, which is possible because it comes from the user input. Fix this by adding the check before the function call. Signed-off-by: Yizhuo Zhai --- drivers/video/fbdev/core/fbmem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbde

[PATCH v2] fbdev: fbmem: Fix the implicit type casting

2022-01-31 Thread Yizhuo Zhai
a large number, which is possible because it comes from the user input. Fix this by adding the check before the function call. Signed-off-by: Yizhuo Zhai --- drivers/video/fbdev/core/fbmem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbde

[PATCH] fbdev: fbmem: Fix the implicit type casting

2022-01-30 Thread Yizhuo Zhai
a large number, which is possible because it comes from the user input. Signed-off-by: Yizhuo Zhai --- drivers/video/fbdev/core/fbmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 0fa7ede94fa6..a5f71c

[PATCH] drm/amd/display: Fix the uninitialized variable in enable_stream_features()

2021-12-17 Thread Yizhuo Zhai
("drm/amd/display: add helper for enabling mst stream features") Cc: sta...@vger.kernel.org Signed-off-by: Yizhuo Zhai --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm

Re: [PATCH] In function nvkm_ioctl_map(), the variable "type" could be uninitialized if "nvkm_object_map()" returns error code, however, it does not check the return value and directly use the "type"

2021-12-17 Thread Yizhuo Zhai
> drop any of the Ccs it gives you beyond the one to stable at vger dot > kernel dot org. > > Also, if you could try to Cc: me on the next version - will help me > respond faster :). > > On Mon, 2021-11-15 at 23:07 -0800, Yizhuo Zhai wrote: > > Fixes:01326050391ce(&

[PATCH] drm/nouveau/core/object: Fix the uninitialized use of "type"

2021-12-17 Thread Yizhuo Zhai
.org Fixes: 01326050391c ("drm/nouveau/core/object: allow arguments to be passed to map function") Signed-off-by: Yizhuo Zhai --- drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/core/ioctl.c b/drivers/gpu/drm/nouv

[PATCH] In function nvkm_ioctl_map(), the variable "type" could be uninitialized if "nvkm_object_map()" returns error code, however, it does not check the return value and directly use the "type" in t

2021-11-15 Thread Yizhuo Zhai
Fixes:01326050391ce("drm/nouveau/core/object: allow arguments to be passed to map function") Signed-off-by: Yizhuo Zhai --- drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/core/ioctl.c b/drivers/gpu/drm/no

[PATCH] In function nvkm_ioctl_map(), the variable "type" could be uninitialized if "nvkm_object_map()" returns error code, however, it does not check the return value and directly use the "type" in t

2021-11-15 Thread Yizhuo Zhai
Fixes:01326050391ce("drm/nouveau/core/object: allow arguments to be passed to map function") Signed-off-by: Yizhuo Zhai --- drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/core/ioctl.c b/drivers/gpu/drm/no

Re: [PATCH] drm/nouveau/core: fix the uninitialized use in nvkm_ioctl_map()

2021-11-15 Thread Yizhuo Zhai
, Jun 17, 2021 at 9:39 AM Yizhuo Zhai wrote: > > > > In function nvkm_ioctl_map(), the variable "type" could be > > uninitialized if "nvkm_object_map()" returns error code, > > however, it does not check the return value and directly > >

[PATCH] drm/nouveau/core: fix the uninitialized use in nvkm_ioctl_map()

2021-06-17 Thread Yizhuo Zhai
In function nvkm_ioctl_map(), the variable "type" could be uninitialized if "nvkm_object_map()" returns error code, however, it does not check the return value and directly use the "type" in the if statement, which is potentially unsafe. Signed-off-by: Yizhuo --- drivers/gpu/drm/nouveau/nvkm/cor

Potential NULL pointer deference in drm/amdgpu

2019-10-09 Thread Yizhuo Zhai
(), amdgpu_fence_enable_signaling() and amdgpu_fence_free(). -- Kind Regards, Yizhuo Zhai Computer Science, Graduate Student University of California, Riverside ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Uninitialized Variable Use in video: fbdev: pm3fb

2019-10-08 Thread Yizhuo Zhai
Hi All: drivers/video/fbdev/pm3fb.c: Inside function pm3fb_write_mode(), variable "m" "n" "p" could leave uninitialized after pm3fb_calculate_clock(), however, they are used later in PM3_WRITE_DAC_REG, which is potentially unsafe. -- Kind Regards, Yizhuo Zh