<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/media/dvb-core/dvbdev.c, branch v4.19.112</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.112</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.112'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-10-05T11:09:47+00:00</updated>
<entry>
<title>media: dvb-core: fix a memory leak bug</title>
<updated>2019-10-05T11:09:47+00:00</updated>
<author>
<name>Wenwen Wang</name>
<email>wenwen@cs.uga.edu</email>
</author>
<published>2019-08-18T03:45:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4df2427a5148093987437054bb82da4d014dcd59'/>
<id>urn:sha1:4df2427a5148093987437054bb82da4d014dcd59</id>
<content type='text'>
[ Upstream commit fcd5ce4b3936242e6679875a4d3c3acfc8743e15 ]

In dvb_create_media_entity(), 'dvbdev-&gt;entity' is allocated through
kzalloc(). Then, 'dvbdev-&gt;pads' is allocated through kcalloc(). However, if
kcalloc() fails, the allocated 'dvbdev-&gt;entity' is not deallocated, leading
to a memory leak bug. To fix this issue, free 'dvbdev-&gt;entity' before
returning -ENOMEM.

Signed-off-by: Wenwen Wang &lt;wenwen@cs.uga.edu&gt;
Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mark entity-intf links as IMMUTABLE</title>
<updated>2018-07-04T12:40:49+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil@xs4all.nl</email>
</author>
<published>2018-07-02T12:43:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4d1e4545a65903a09f5d15d32a3fbb6131a8d11e'/>
<id>urn:sha1:4d1e4545a65903a09f5d15d32a3fbb6131a8d11e</id>
<content type='text'>
Currently links between entities and an interface are just marked as
ENABLED. But (at least today) these links cannot be disabled by userspace
or the driver, so they should also be marked as IMMUTABLE.

It might become possible that drivers can disable such links (if for some
reason the device node cannot be used), so we might need to add a new link
flag at some point to mark interface links that can be changed by the driver
but not by userspace.

Acked-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&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:59+00:00</updated>
<author>
<name>Max Kellermann</name>
<email>max.kellermann@gmail.com</email>
</author>
<published>2018-05-03T18:12:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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: handle ENOMEM error at dvb_module_probe()</title>
<updated>2018-03-22T13:01:33+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@s-opensource.com</email>
</author>
<published>2018-03-22T13:01:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=39adb4e739050dcdb74c3465d261de8de5f224b7'/>
<id>urn:sha1:39adb4e739050dcdb74c3465d261de8de5f224b7</id>
<content type='text'>
If allocation of struct board_info fails, return NULL from
dvb_module_probe().

Fix this warning:
	drivers/media/dvb-core/dvbdev.c:958 dvb_module_probe() error: potential null dereference 'board_info'.  (kzalloc returns null)

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>media: dvbdev: fix building on ia64</title>
<updated>2018-03-07T09:11:50+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@s-opensource.com</email>
</author>
<published>2018-03-07T09:11:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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>
<entry>
<title>media: dvb-core: add helper functions for I2C binding</title>
<updated>2018-03-06T10:00:31+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@s-opensource.com</email>
</author>
<published>2018-03-02T15:21:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8f569c0b4e6b6bd5db1d09551b2df87d912f124e'/>
<id>urn:sha1:8f569c0b4e6b6bd5db1d09551b2df87d912f124e</id>
<content type='text'>
The dvb_attach()/dvb_detach() methods are ugly hacks designed
to keep using the I2C low-level API. The proper way is to
do I2C bus bindings instead.

Several modules were already converted to use it. Yet,
it is painful to use it, as lots of code need to be
duplicated.

Make it easier by providing two new helper functions:
	- dvb_module_probe()
	- dvb_module_release()

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>media: move dvb kAPI headers to include/media</title>
<updated>2017-12-28T18:16:01+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@s-opensource.com</email>
</author>
<published>2017-12-28T18:03:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fada1935590f66dc6784981e0d557ca09013c847'/>
<id>urn:sha1:fada1935590f66dc6784981e0d557ca09013c847</id>
<content type='text'>
Except for DVB, all media kAPI headers are at include/media.

Move the headers to it.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>Simplify major/minor non-dynamic logic</title>
<updated>2017-10-11T19:32:11+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@s-opensource.com</email>
</author>
<published>2017-10-11T19:29:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8382e556b1a2f30c4bf866f021b33577a64f9ebf'/>
<id>urn:sha1:8382e556b1a2f30c4bf866f021b33577a64f9ebf</id>
<content type='text'>
changeset 6bbf7a855d20 ("media: dvbdev: convert DVB device types into an enum")
added a new warning on gcc 6:

&gt;&gt; drivers/media/dvb-core/dvbdev.c:86:1: warning: control reaches end of non-void function [-Wreturn-type]

That's because gcc is not smart enough to see that all types are
present at the switch. Also, the current code is not too optimized.

So, replace it to a more optimized one, based on a static table.

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Fixes: 6bbf7a855d20 ("media: dvbdev: convert DVB device types into an enum")
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>media: dvbdev: convert DVB device types into an enum</title>
<updated>2017-10-11T17:00:44+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@s-opensource.com</email>
</author>
<published>2017-09-19T18:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6bbf7a855d200ddd83494a9ceb95f9465f953f59'/>
<id>urn:sha1:6bbf7a855d200ddd83494a9ceb95f9465f953f59</id>
<content type='text'>
Enums can be documented via kernel-doc. So, convert the
DVB_DEVICE_* macros to an enum.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] media: Drop FSF's postal address from the source code files</title>
<updated>2017-01-27T13:38:09+00:00</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@linux.intel.com</email>
</author>
<published>2016-10-28T11:31:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bcb63314e2c23f1ed622418b65f9409512659c73'/>
<id>urn:sha1:bcb63314e2c23f1ed622418b65f9409512659c73</id>
<content type='text'>
Drop the FSF's postal address from the source code files that typically
contain mostly the license text. Of the 628 removed instances, 578 are
outdated.

The patch has been created with the following command without manual edits:

git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \
	drivers/media/ include/media|while read i; do i=$i perl -e '
open(F,"&lt; $ENV{i}");
$a=join("", &lt;F&gt;);
$a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m
	&amp;&amp; $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m;
close(F);
open(F, "&gt; $ENV{i}");
print F $a;
close(F);'; done

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
</content>
</entry>
</feed>
