All of lore.kernel.org
 help / color / mirror / Atom feed
* Never checked NULL pointer in drivers/media/v4l2-core/videobuf-core.c
@ 2019-02-22  0:47 Shaobo He
  2019-02-22 11:42 ` Laurent Pinchart
  0 siblings, 1 reply; 2+ messages in thread
From: Shaobo He @ 2019-02-22  0:47 UTC (permalink / raw)
  To: linux-media, mchehab, hverkuil-cisco, sakari.ailus, Laurent Pinchart

Hello everyone,

I found that macro `CALLPTR` in drivers/media/v4l2-core/videobuf-core.c can 
evaluate to NULL yet all its usages (__videobuf_copy_to_user, 
__videobuf_copy_stream) are never NULL checked. I doubt but am not completely 
sure that use cases of the CALLPTR macro can accept NULL pointers. Please let me 
know if it makes sense or not.

Best,
Shaobo

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Never checked NULL pointer in drivers/media/v4l2-core/videobuf-core.c
  2019-02-22  0:47 Never checked NULL pointer in drivers/media/v4l2-core/videobuf-core.c Shaobo He
@ 2019-02-22 11:42 ` Laurent Pinchart
  0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2019-02-22 11:42 UTC (permalink / raw)
  To: Shaobo He; +Cc: linux-media, mchehab, hverkuil-cisco, sakari.ailus

Hi Shaodo,

On Thu, Feb 21, 2019 at 05:47:52PM -0700, Shaobo He wrote:
> Hello everyone,
> 
> I found that macro `CALLPTR` in drivers/media/v4l2-core/videobuf-core.c can 
> evaluate to NULL yet all its usages (__videobuf_copy_to_user, 
> __videobuf_copy_stream) are never NULL checked. I doubt but am not completely 
> sure that use cases of the CALLPTR macro can accept NULL pointers. Please let me 
> know if it makes sense or not.

videobuf (not to be confused with videobuf2) is old deprecated code, and
full of known issues that we will not attempt to solve. It should be
dropped, but we still have 8 drivers relying on it. Hans, do you think
we will ever move forward with this ? Could some of the drivers be
dropped ?

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-22 11:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-22  0:47 Never checked NULL pointer in drivers/media/v4l2-core/videobuf-core.c Shaobo He
2019-02-22 11:42 ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.