<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/media/usb/pvrusb2, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/media/usb/pvrusb2?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/media/usb/pvrusb2?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-08-29T14:27:18Z</updated>
<entry>
<title>media: avoid use of 'videobuf'</title>
<updated>2022-08-29T14:27:18Z</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil-cisco@xs4all.nl</email>
</author>
<published>2022-08-10T13:01:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f068a6cec0fbdc479a9776923eb772d76c3948cd'/>
<id>urn:sha1:f068a6cec0fbdc479a9776923eb772d76c3948cd</id>
<content type='text'>
The term 'videobuf' typically refers to the old videobuf version 1
framework. Avoid using this word in drivers that are converted to
vb2.

Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: pvrusb2: drop unexpected word 'a' in comments</title>
<updated>2022-07-08T13:47:21Z</updated>
<author>
<name>Jiang Jian</name>
<email>jiangjian@cdjrlc.com</email>
</author>
<published>2022-06-23T07:42:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b813aa3dc66336d698e10264fa8c088019050a04'/>
<id>urn:sha1:b813aa3dc66336d698e10264fa8c088019050a04</id>
<content type='text'>
there is an unexpected word 'a' in the comments that need to be dropped

file - drivers/media/usb/pvrusb2/pvrusb2-hdw.c
line - 5044

But now it's a a chicken and egg problem...) */

changed to:

But now it's a chicken and egg problem...) */

Signed-off-by: Jiang Jian &lt;jiangjian@cdjrlc.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: pvrusb2: fix memory leak in pvr_probe</title>
<updated>2022-06-20T09:30:37Z</updated>
<author>
<name>Dongliang Mu</name>
<email>mudongliangabcd@gmail.com</email>
</author>
<published>2022-06-09T07:35:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=945a9a8e448b65bec055d37eba58f711b39f66f0'/>
<id>urn:sha1:945a9a8e448b65bec055d37eba58f711b39f66f0</id>
<content type='text'>
The error handling code in pvr2_hdw_create forgets to unregister the
v4l2 device. When pvr2_hdw_create returns back to pvr2_context_create,
it calls pvr2_context_destroy to destroy context, but mp-&gt;hdw is NULL,
which leads to that pvr2_hdw_destroy directly returns.

Fix this by adding v4l2_device_unregister to decrease the refcount of
usb interface.

Reported-by: syzbot+77b432d57c4791183ed4@syzkaller.appspotmail.com
Signed-off-by: Dongliang Mu &lt;mudongliangabcd@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init</title>
<updated>2022-05-13T09:02:19Z</updated>
<author>
<name>Pavel Skripkin</name>
<email>paskripkin@gmail.com</email>
</author>
<published>2022-04-15T21:24:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=471bec68457aaf981add77b4f590d65dd7da1059'/>
<id>urn:sha1:471bec68457aaf981add77b4f590d65dd7da1059</id>
<content type='text'>
Syzbot reported that -1 is used as array index. The problem was in
missing validation check.

hdw-&gt;unit_number is initialized with -1 and then if init table walk fails
this value remains unchanged. Since code blindly uses this member for
array indexing adding sanity check is the easiest fix for that.

hdw-&gt;workpoll initialization moved upper to prevent warning in
__flush_work.

Reported-and-tested-by: syzbot+1a247e36149ffd709a9b@syzkaller.appspotmail.com

Fixes: d855497edbfb ("V4L/DVB (4228a): pvrusb2 to kernel 2.6.18")
Signed-off-by: Pavel Skripkin &lt;paskripkin@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: Kconfig: cleanup VIDEO_DEV dependencies</title>
<updated>2022-03-18T04:58:35Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@kernel.org</email>
</author>
<published>2022-03-13T06:25:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9958d30f38b96fb763a10d44d18ddad39127d5f4'/>
<id>urn:sha1:9958d30f38b96fb763a10d44d18ddad39127d5f4</id>
<content type='text'>
media Kconfig has two entries associated to V4L API:
VIDEO_DEV and VIDEO_V4L2.

On Kernel 2.6.x, there were two V4L APIs, each one with its own flag.
VIDEO_DEV were meant to:
	1) enable Video4Linux and make its Kconfig options to appear;
	2) it makes the Kernel build the V4L core.

while VIDEO_V4L2 where used to distinguish between drivers that
implement the newer API and drivers that implemented the former one.

With time, such meaning changed, specially after the removal of
all V4L version 1 drivers.

At the current implementation, VIDEO_DEV only does (1): it enables
the media options related to V4L, that now has:

	menu "Video4Linux options"
		visible if VIDEO_DEV

	source "drivers/media/v4l2-core/Kconfig"
	endmenu

but it doesn't affect anymore the V4L core drivers.

The rationale is that the V4L2 core has a "soft" dependency
at the I2C bus, and now requires to select a number of other
Kconfig options:

	config VIDEO_V4L2
		tristate
		depends on (I2C || I2C=n) &amp;&amp; VIDEO_DEV
		select RATIONAL
		select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE
		default (I2C || I2C=n) &amp;&amp; VIDEO_DEV

In the past, merging them would be tricky, but it seems that it is now
possible to merge those symbols, in order to simplify V4L dependencies.

Let's keep VIDEO_DEV, as this one is used on some make *defconfig
configurations.

Suggested-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Jacopo Mondi &lt;jacopo@jmondi.org&gt;
Reviewed-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt; # for meson-vdec &amp; meson-ge2d
Acked-by: Andrzej Pietrasiewicz &lt;andrzejtp2010@gmail.com&gt;
Acked-by: Łukasz Stelmach &lt;l.stelmach@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: pvrusb2: fix inconsistent indenting</title>
<updated>2021-11-30T11:24:31Z</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil-cisco@xs4all.nl</email>
</author>
<published>2021-11-24T10:34:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=339df438759a1e92de91896173c426a59692d5d0'/>
<id>urn:sha1:339df438759a1e92de91896173c426a59692d5d0</id>
<content type='text'>
Fix these smatch warnings:

drivers/media/usb/pvrusb2/pvrusb2-encoder.c:288 pvr2_encoder_cmd() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-hdw.c:1730 pvr2_hdw_set_streaming() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3461 pvr2_hdw_cpufw_set_enabled() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3501 pvr2_hdw_cpufw_get() warn: inconsistent indenting

Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: pvrusb2: fix control-message timeouts</title>
<updated>2021-11-19T06:06:12Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-10-25T12:16:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b82bf9b9dc305d7d3d93eab106d70dbf2171b43e'/>
<id>urn:sha1:b82bf9b9dc305d7d3d93eab106d70dbf2171b43e</id>
<content type='text'>
USB control-message timeouts are specified in milliseconds and should
specifically not vary with CONFIG_HZ.

Fixes: d855497edbfb ("V4L/DVB (4228a): pvrusb2 to kernel 2.6.18")
Cc: stable@vger.kernel.org      # 2.6.18
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: pvrusb2: Replaced simple_strtol() with kstrtoint()</title>
<updated>2021-09-30T08:07:53Z</updated>
<author>
<name>Liu Shixin</name>
<email>liushixin2@huawei.com</email>
</author>
<published>2021-05-27T13:17:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a6b63ca455a19f263d56599f4b37cb1d61eb8fee'/>
<id>urn:sha1:a6b63ca455a19f263d56599f4b37cb1d61eb8fee</id>
<content type='text'>
It looks like that memcpy() is a superfluous operation in
parse_token()/parse_mtoken(). Simple these two functions and
use kstrtoint() instead of simple_strtol() to avoid data
overflow.

Signed-off-by: Liu Shixin &lt;liushixin2@huawei.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: pvrusb2: Do not check for V4L2_CTRL_WHICH_DEF_VAL</title>
<updated>2021-09-30T08:07:46Z</updated>
<author>
<name>Ricardo Ribalda</name>
<email>ribalda@chromium.org</email>
</author>
<published>2021-06-18T12:29:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e4ba563d4d4f14c3cda140ae47e0a4e2dcdd639c'/>
<id>urn:sha1:e4ba563d4d4f14c3cda140ae47e0a4e2dcdd639c</id>
<content type='text'>
The framework already checks for us if V4L2_CTRL_WHICH_DEF_VAL is
written.

Cc: Mike Isely &lt;isely@pobox.com&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Reviewed-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: pvrusb2: fix warning in pvr2_i2c_core_done</title>
<updated>2021-05-19T07:51:39Z</updated>
<author>
<name>Anirudh Rayabharam</name>
<email>mail@anirudhrb.com</email>
</author>
<published>2021-05-04T17:08:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f8194e5e63fdcb349e8da9eef9e574d5b1d687cb'/>
<id>urn:sha1:f8194e5e63fdcb349e8da9eef9e574d5b1d687cb</id>
<content type='text'>
syzbot has reported the following warning in pvr2_i2c_done:

	sysfs group 'power' not found for kobject '1-0043'

When the device is disconnected (pvr_hdw_disconnect), the i2c adapter is
not unregistered along with the USB and v4l2 teardown. As part of the USB
device disconnect, the sysfs files of the subdevices are also deleted.
So, by the time pvr_i2c_core_done is called by pvr_context_destroy, the
sysfs files have been deleted.

To fix this, unregister the i2c adapter too in pvr_hdw_disconnect. Make
the device deregistration code shared by calling pvr_hdw_disconnect from
pvr2_hdw_destroy.

Reported-by: syzbot+e74a998ca8f1df9cc332@syzkaller.appspotmail.com
Tested-by: syzbot+e74a998ca8f1df9cc332@syzkaller.appspotmail.com
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Anirudh Rayabharam &lt;mail@anirudhrb.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
</feed>
