Re: Question about drivers/media/usb/uvc/uvc_v4l2.c

2019-03-02 Thread Shaobo He
mean you can save one initialization, provided compiler does it and one branch. Shaobo On 2019/3/2 14:43, Laurent Pinchart wrote: Hi Shaobo, On Sat, Mar 02, 2019 at 01:22:49PM -0700, Shaobo He wrote: Hello everyone, This is Shaobo from Utah again. I've been bugging the mailing list with m

Question about drivers/media/usb/uvc/uvc_v4l2.c

2019-03-02 Thread Shaobo He
Hello everyone, This is Shaobo from Utah again. I've been bugging the mailing list with my patches. I have a quick question about a function in `drivers/media/usb/uvc/uvc_v4l2.c`. In `uvc_v4l2_try_format`, can `stream->nformats` be 0? I saw that in other files, this field could be zer

[PATCH] platform/sh_veu.c: remove redundant NULL pointer checks

2019-02-28 Thread Shaobo He
`. Signed-off-by: Shaobo He --- drivers/media/platform/sh_veu.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c index 09ae64a..3069015 100644 --- a/drivers/media/platform/sh_veu.c +++ b/drivers/media/platform/sh_veu.c

[PATCH] Remove deductively redundant NULL pointer checks

2019-02-26 Thread Shaobo He
`v4l2_mem_get_vq`. Signed-off-by: Shaobo He --- drivers/media/platform/coda/coda-common.c | 4 drivers/media/platform/imx-pxp.c | 7 --- drivers/media/platform/m2m-deinterlace.c | 7 --- drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c| 7

[PATCH] Remove deductively redundant NULL pointer checks

2019-02-25 Thread Shaobo He
`v4l2_mem_get_vq`. Signed-off-by: Shaobo He --- drivers/media/platform/coda/coda-common.c | 4 drivers/media/platform/imx-pxp.c | 7 --- drivers/media/platform/m2m-deinterlace.c | 7 --- drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c| 7

Never checked NULL pointer in drivers/media/v4l2-core/videobuf-core.c

2019-02-21 Thread Shaobo He
pointers. Please let me know if it makes sense or not. Best, Shaobo

Re: Problematic code in media/v4l2-core/v4l2-mem2mem.c

2019-02-21 Thread Shaobo He
x` does. If we agree on the NULL checks of the return values of `v4l2_m2m_get_vq` being unnecessary, I'll remove them in the patch. Best, Shaobo On 2019/2/21 14:50, Laurent Pinchart wrote: Hi Shaobo, On Thu, Feb 21, 2019 at 11:11:32AM -0700, Shaobo wrote: Hello everyone, I think I brought u

Problematic code in media/v4l2-core/v4l2-mem2mem.c

2019-02-21 Thread Shaobo
NULL-checked, for example in v4l2_m2m_get_vq. Please let me know if it makes sense. Best, Shaobo

Potentially invalid memory accesses in file drivers/media/v4l2-core/videobuf-core.c

2017-06-26 Thread Shaobo
Hi there, My name is Shaobo He and I am a graduate student at University of Utah. I am using a static analysis tool to search for null pointer dereferences and came across a couple of potentially invalid memory accesses in the file drivers/media/v4l2-core/videobuf-core.c. Basically the

RE: Dead code in v4l2-mem2mem.c?

2017-02-20 Thread Shaobo
Hi Laurent, I'd like to. It sounds interesting and useful to me. Could you give me some pointers about how to audit drivers? Shaobo -Original Message- From: Laurent Pinchart [mailto:laurent.pinch...@ideasonboard.com] Sent: 2017年2月18日 3:54 To: Shaobo Cc: linux-media@vger.kerne

Dead code or otherwise invalid memory access in drivers/media/v4l2-core/videobuf-core.c

2017-02-17 Thread Shaobo
the else branch of the conditional expression dead. Please let me know if makes sense or not. Thanks for your time and I am looking forward to your reply. Best, Shaobo

RE: Dead code in v4l2-mem2mem.c?

2017-02-17 Thread Shaobo
not have NULL check afterwards while in other files (e.g., drivers/media/platform/mx2_emmaprp.c) they do. I was wondering if there is special assumption on this function in mem2mem.c. Best, Shaobo -Original Message- From: Laurent Pinchart [mailto:laurent.pinch...@ideasonboard.com] Sent: 2017

Dead code in v4l2-mem2mem.c?

2017-02-16 Thread Shaobo
Hi there, My name is Shaobo He and I am a graduate student at University of Utah. I am applying a static analysis tool to the Linux device drivers, looking for NULL pointer dereference and accidentally found a plausible dead code location in v4l2-mem2mem.c due to undefined behavior. The