<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/media/dvbdev.h, branch v6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-12-06T07:14:47Z</updated>
<entry>
<title>media: dvbdev: fix build warning due to comments</title>
<updated>2022-12-06T07:14:47Z</updated>
<author>
<name>Lin Ma</name>
<email>linma@zju.edu.cn</email>
</author>
<published>2022-11-28T08:39:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3edfd14bb50fa6f94ed1a37bbb17d9f1c2793b57'/>
<id>urn:sha1:3edfd14bb50fa6f94ed1a37bbb17d9f1c2793b57</id>
<content type='text'>
Previous commit that introduces reference counter does not add proper
comments, which will lead to warning when building htmldocs. Fix them.

Reported-by: "Stephen Rothwell" &lt;sfr@canb.auug.org.au&gt;
Fixes: 0fc044b2b5e2 ("media: dvbdev: adopts refcnt to avoid UAF")
Signed-off-by: Lin Ma &lt;linma@zju.edu.cn&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: dvbdev: adopts refcnt to avoid UAF</title>
<updated>2022-11-25T10:08:23Z</updated>
<author>
<name>Lin Ma</name>
<email>linma@zju.edu.cn</email>
</author>
<published>2022-08-07T14:59:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0fc044b2b5e2d05a1fa1fb0d7f270367a7855d79'/>
<id>urn:sha1:0fc044b2b5e2d05a1fa1fb0d7f270367a7855d79</id>
<content type='text'>
dvb_unregister_device() is known that prone to use-after-free.
That is, the cleanup from dvb_unregister_device() releases the dvb_device
even if there are pointers stored in file-&gt;private_data still refer to it.

This patch adds a reference counter into struct dvb_device and delays its
deallocation until no pointer refers to the object.

Link: https://lore.kernel.org/linux-media/20220807145952.10368-1-linma@zju.edu.cn
Signed-off-by: Lin Ma &lt;linma@zju.edu.cn&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: dvb-core: Enhance shared multi-frontend support</title>
<updated>2022-11-25T09:59:09Z</updated>
<author>
<name>Robert Schlabbach</name>
<email>robert_s@gmx.net</email>
</author>
<published>2022-01-21T21:18:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e704b44b550fbc9a4af15bc848fdbac5ff2eec47'/>
<id>urn:sha1:e704b44b550fbc9a4af15bc848fdbac5ff2eec47</id>
<content type='text'>
Drivers for devices with multiple frontends which cannot be used
concurrently due to hardware limitations which enforce that restriction
by setting the mfe_shared field to 1 exhibit rather unfriendly behavior
towards applications: The unavailable frontend devices cannot be opened
at all, not even for read-only access to query information. Even worse,
any open call is blocked for 5 seconds by default.

Allow drivers for such devices to behave like regular busy frontend
devices instead, i.e. still allowing concurrent read access to the
unavailable frontend and denying concurrent write access with -EBUSY
without delay.

This patch does not alter the behavior of any existing driver to avoid
regressions. Driver developers who wish to take advantage of this must
ensure their driver can handle all read-only accesses to the unavailable
frontend, and indicate the capability by setting the mfe_shared field to
2 instead of 1.

Add a check to dvb-usb-init.c when automatically setting the mfe_shared
field that when a driver has already set the field to 2, it is not
overwritten.

Document the additional capability in the code comment about mfe_shared.

Link: https://lore.kernel.org/linux-media/trinity-22c77578-26b0-4867-9ff7-2668e5d22c64-1642799929896@3c-app-gmx-bap04
Signed-off-by: Robert Schlabbach &lt;robert_s@gmx.net&gt;
Tested-by: Robert Schlabbach &lt;robert_s@gmx.net&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: dvbdev: Switch to new kerneldoc syntax for named variable macro argument</title>
<updated>2021-03-11T10:59:45Z</updated>
<author>
<name>Jonathan Neuschäfer</name>
<email>j.neuschaefer@gmx.net</email>
</author>
<published>2021-01-01T16:02:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6f097ddb8072323b688f8fbd6729e70fcc26ff5c'/>
<id>urn:sha1:6f097ddb8072323b688f8fbd6729e70fcc26ff5c</id>
<content type='text'>
The syntax without dots is available since commit 43756e347f21
("scripts/kernel-doc: Add support for named variable macro arguments").

The same HTML output is produced with and without this patch.

Signed-off-by: Jonathan Neuschäfer &lt;j.neuschaefer@gmx.net&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: fix kernel-doc markups</title>
<updated>2020-11-16T09:31:16Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2020-10-23T14:08:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b064945517ee368bfb6343bf3fb4613d537c4bbb'/>
<id>urn:sha1:b064945517ee368bfb6343bf3fb4613d537c4bbb</id>
<content type='text'>
Some identifiers have different names between their prototypes
and the kernel-doc markup. Seome seems to be due to cut-and-paste
related issues.

Others need to be fixed, as kernel-doc markups should use this format:
        identifier - description

Acked-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt; # IPU3 and V4L2
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: dvbdev.h: keep * together with the type</title>
<updated>2020-07-19T12:26:25Z</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil-cisco@xs4all.nl</email>
</author>
<published>2020-07-17T08:10:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8f2a4a9d5ff5202d0b3e3a144ebb9b67aabadd29'/>
<id>urn:sha1:8f2a4a9d5ff5202d0b3e3a144ebb9b67aabadd29</id>
<content type='text'>
Having the '*' in the next line separated from the type makes it
hard to see that these functions return a pointer to that type.

Instead, keep it next to the type name so it is clear that it is
a pointer to that type.

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: dvbdev.h: fix duplicated word in comment</title>
<updated>2020-07-19T12:00:17Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2020-07-14T22:05:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ffb189716081ff7dafb0978d31a290adff966d81'/>
<id>urn:sha1:ffb189716081ff7dafb0978d31a290adff966d81</id>
<content type='text'>
Change the doubled word "the" in a comment to "to the".

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.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: docs: fix minor typos</title>
<updated>2019-06-05T15:31:51Z</updated>
<author>
<name>Marc Gonzalez</name>
<email>marc.w.gonzalez@free.fr</email>
</author>
<published>2019-06-05T11:59:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e96a8819a6c4fc578809ba79d64abca57145acb7'/>
<id>urn:sha1:e96a8819a6c4fc578809ba79d64abca57145acb7</id>
<content type='text'>
Fix minor typos in the DVB demux documentation.

Signed-off-by: Marc Gonzalez &lt;marc.w.gonzalez@free.fr&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: dvbdev: add a mutex protecting the "mdev" pointer</title>
<updated>2018-05-11T16:09:59Z</updated>
<author>
<name>Max Kellermann</name>
<email>max.kellermann@gmail.com</email>
</author>
<published>2018-05-03T18:12:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f17c403af9bf3dc19069cb8c10390030ee4c8fb0'/>
<id>urn:sha1:f17c403af9bf3dc19069cb8c10390030ee4c8fb0</id>
<content type='text'>
During destruction, a race condition in
dvb_media_controller_disable_source() can cause a kernel crash,
because the "mdev" pointer has been read successfully while another
task executes dvb_usb_media_device_unregister(), which destroys the
object.  Example for such a crash:

    general protection fault: 0000 [#1] SMP
    CPU: 1 PID: 301 Comm: vdr Not tainted 4.8.1-nuc+ #102
    [142B blob data]
    task: ffff8802301f2040 task.stack: ffff880233728000
    RIP: 0010:[&lt;ffffffff816c296b&gt;]  [&lt;ffffffff816c296b&gt;] dvb_frontend_release+0xcb/0x120
    RSP: 0018:ffff88023372bdd8  EFLAGS: 00010202
    RAX: 001fd55c000000da RBX: ffff880236bad810 RCX: 0000000000000000
    RDX: ffff880235bd81f0 RSI: 0000000000000246 RDI: ffff880235bd81e8
    RBP: ffff88023372be00 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: ffff88022f009910 R12: 0000000000000000
    R13: ffff880235a21a80 R14: ffff880235bd8000 R15: ffff880235bb8a78
    FS:  0000000000000000(0000) GS:ffff88023fd00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007f96edd69818 CR3: 0000000002406000 CR4: 00000000001006e0
    Stack:
     ffff88022f009900 0000000000000008 ffff880235bb8a78 ffff8802344fbb20
     ffff880236437b40 ffff88023372be48 ffffffff8117a81e ffff880235bb8a78
     ffff88022f009910 ffff8802335a7400 ffff8802301f2040 ffff88022f009900
    Call Trace:
     [&lt;ffffffff8117a81e&gt;] __fput+0xde/0x1d0
     [&lt;ffffffff8117a949&gt;] ____fput+0x9/0x10
     [&lt;ffffffff810a9fce&gt;] task_work_run+0x7e/0xa0
     [&lt;ffffffff81094bab&gt;] do_exit+0x27b/0xa50
     [&lt;ffffffff810407e3&gt;] ? __do_page_fault+0x1c3/0x430
     [&lt;ffffffff81095402&gt;] do_group_exit+0x42/0xb0
     [&lt;ffffffff8109547f&gt;] SyS_exit_group+0xf/0x10
     [&lt;ffffffff8108bedb&gt;] entry_SYSCALL_64_fastpath+0x13/0x8f
    Code: 31 c9 49 8d be e8 01 00 00 ba 01 00 00 00 be 03 00 00 00 e8 68 2d a0 ff 48 8b 83 10 03 00 00 48 8b 80 88 00 00 00 48 85 c0 74 12 &lt;48&gt; 8b 80 88 02 00 00 48 85 c0 74 06 49 8b 7d
    RIP  [&lt;ffffffff816c296b&gt;] dvb_frontend_release+0xcb/0x120

[mchehab+samsung@kernel.org: fix a Coding Style issue]
Signed-off-by: Max Kellermann &lt;max.kellermann@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: dvbdev: fix building on ia64</title>
<updated>2018-03-07T09:11:50Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@s-opensource.com</email>
</author>
<published>2018-03-07T09:11:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1980bfa67f19d628df30b9b5b76bca37c2a76dde'/>
<id>urn:sha1:1980bfa67f19d628df30b9b5b76bca37c2a76dde</id>
<content type='text'>
Not sure why, but, on ia64, with Linaro's gcc 7.3 compiler,
using #ifdef (CONFIG_I2C) is not OK.

So, replace it by IS_ENABLED(CONFIG_I2C), in order to fix the
builds there.

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
</feed>
