<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/media/rc/lirc_dev.c, branch v4.11.5</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.11.5</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.11.5'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-03-09T23:50:56+00:00</updated>
<entry>
<title>Merge tag 'media/v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media</title>
<updated>2017-03-09T23:50:56+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-03-09T23:50:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb61ce54e8986ea18f7eb13cfa4a6fa8eb311bbd'/>
<id>urn:sha1:bb61ce54e8986ea18f7eb13cfa4a6fa8eb311bbd</id>
<content type='text'>
Pull media fixes from Mauro Carvalho Chehab:
 "Media regression fixes:

   - serial_ir: fix a Kernel crash during boot on Kernel 4.11-rc1, due
     to an IRQ code called too early

   - other IR regression fixes at lirc and at the raw IR decoding

   - a deadlock fix at the RC nuvoton driver

   - fix another issue with DMA on stack at dw2102 driver

  There's an extra patch there that change a driver interface for the
  SoC VSP1 driver, with is shared between the DRM and V4L2 driver. The
  patch itself is trivial, and was acked by David Arlie"

* tag 'media/v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] v4l: vsp1: Adapt vsp1_du_setup_lif() interface to use a structure
  [media] dw2102: don't do DMA on stack
  [media] rc: protocol is not set on register for raw IR devices
  [media] rc: raw decoder for keymap protocol is not loaded on register
  [media] rc: nuvoton: fix deadlock in nvt_write_wakeup_codes
  [media] lirc: fix dead lock between open and wakeup_filter
  [media] serial_ir: ensure we're ready to receive interrupts
</content>
</entry>
<entry>
<title>[media] lirc: fix dead lock between open and wakeup_filter</title>
<updated>2017-03-03T10:06:57+00:00</updated>
<author>
<name>Sean Young</name>
<email>sean@mess.org</email>
</author>
<published>2017-02-13T12:35:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=db5b15b74ed9a5c04bb808d18ffa2c773f5c18c0'/>
<id>urn:sha1:db5b15b74ed9a5c04bb808d18ffa2c773f5c18c0</id>
<content type='text'>
The locking in lirc needs improvement, but for now just fix this potential
deadlock.

======================================================
[ INFO: possible circular locking dependency detected ]
4.10.0-rc1+ #1 Not tainted
-------------------------------------------------------
bash/2502 is trying to acquire lock:
 (ir_raw_handler_lock){+.+.+.}, at: [&lt;ffffffffc06f6a5e&gt;] ir_raw_encode_scancode+0x3e/0xb0 [rc_core]

               but task is already holding lock:
 (&amp;dev-&gt;lock){+.+.+.}, at: [&lt;ffffffffc06f511f&gt;] store_filter+0x9f/0x240 [rc_core]

               which lock already depends on the new lock.

               the existing dependency chain (in reverse order) is:

               -&gt; #2 (&amp;dev-&gt;lock){+.+.+.}:

[&lt;ffffffffa110adad&gt;] lock_acquire+0xfd/0x200
[&lt;ffffffffa1921327&gt;] mutex_lock_nested+0x77/0x6d0
[&lt;ffffffffc06f436a&gt;] rc_open+0x2a/0x80 [rc_core]
[&lt;ffffffffc07114ca&gt;] lirc_dev_fop_open+0xda/0x1e0 [lirc_dev]
[&lt;ffffffffa12975e0&gt;] chrdev_open+0xb0/0x210
[&lt;ffffffffa128eb5a&gt;] do_dentry_open+0x20a/0x2f0
[&lt;ffffffffa128ffcc&gt;] vfs_open+0x4c/0x80
[&lt;ffffffffa12a35ec&gt;] path_openat+0x5bc/0xc00
[&lt;ffffffffa12a5271&gt;] do_filp_open+0x91/0x100
[&lt;ffffffffa12903f0&gt;] do_sys_open+0x130/0x220
[&lt;ffffffffa12904fe&gt;] SyS_open+0x1e/0x20
[&lt;ffffffffa19278c1&gt;] entry_SYSCALL_64_fastpath+0x1f/0xc2
               -&gt; #1 (lirc_dev_lock){+.+.+.}:
[&lt;ffffffffa110adad&gt;] lock_acquire+0xfd/0x200
[&lt;ffffffffa1921327&gt;] mutex_lock_nested+0x77/0x6d0
[&lt;ffffffffc0711f47&gt;] lirc_register_driver+0x67/0x59b [lirc_dev]
[&lt;ffffffffc06db7f4&gt;] ir_lirc_register+0x1f4/0x260 [ir_lirc_codec]
[&lt;ffffffffc06f6cac&gt;] ir_raw_handler_register+0x7c/0xb0 [rc_core]
[&lt;ffffffffc0398010&gt;] 0xffffffffc0398010
[&lt;ffffffffa1002192&gt;] do_one_initcall+0x52/0x1b0
[&lt;ffffffffa11ef5c8&gt;] do_init_module+0x5f/0x1fa
[&lt;ffffffffa11566b5&gt;] load_module+0x2675/0x2b00
[&lt;ffffffffa1156dcf&gt;] SYSC_finit_module+0xdf/0x110
[&lt;ffffffffa1156e1e&gt;] SyS_finit_module+0xe/0x10
[&lt;ffffffffa1003f5c&gt;] do_syscall_64+0x6c/0x1f0
[&lt;ffffffffa1927989&gt;] return_from_SYSCALL_64+0x0/0x7a
               -&gt; #0 (ir_raw_handler_lock){+.+.+.}:
[&lt;ffffffffa110a7b7&gt;] __lock_acquire+0x10f7/0x1290
[&lt;ffffffffa110adad&gt;] lock_acquire+0xfd/0x200
[&lt;ffffffffa1921327&gt;] mutex_lock_nested+0x77/0x6d0
[&lt;ffffffffc06f6a5e&gt;] ir_raw_encode_scancode+0x3e/0xb0 [rc_core]
[&lt;ffffffffc0b0f492&gt;] loop_set_wakeup_filter+0x62/0xbd [rc_loopback]
[&lt;ffffffffc06f522a&gt;] store_filter+0x1aa/0x240 [rc_core]
[&lt;ffffffffa15e46f8&gt;] dev_attr_store+0x18/0x30
[&lt;ffffffffa13318e5&gt;] sysfs_kf_write+0x45/0x60
[&lt;ffffffffa1330b55&gt;] kernfs_fop_write+0x155/0x1e0
[&lt;ffffffffa1290797&gt;] __vfs_write+0x37/0x160
[&lt;ffffffffa12921f8&gt;] vfs_write+0xc8/0x1e0
[&lt;ffffffffa12936e8&gt;] SyS_write+0x58/0xc0
[&lt;ffffffffa19278c1&gt;] entry_SYSCALL_64_fastpath+0x1f/0xc2

               other info that might help us debug this:

Chain exists of:
                 ir_raw_handler_lock --&gt; lirc_dev_lock --&gt; &amp;dev-&gt;lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&amp;dev-&gt;lock);
                               lock(lirc_dev_lock);
                               lock(&amp;dev-&gt;lock);
  lock(ir_raw_handler_lock);

                *** DEADLOCK ***

4 locks held by bash/2502:
 #0:  (sb_writers#4){.+.+.+}, at: [&lt;ffffffffa12922c5&gt;] vfs_write+0x195/0x1e0
 #1:  (&amp;of-&gt;mutex){+.+.+.}, at: [&lt;ffffffffa1330b1f&gt;] kernfs_fop_write+0x11f/0x1e0
 #2:  (s_active#215){.+.+.+}, at: [&lt;ffffffffa1330b28&gt;] kernfs_fop_write+0x128/0x1e0
 #3:  (&amp;dev-&gt;lock){+.+.+.}, at: [&lt;ffffffffc06f511f&gt;] store_filter+0x9f/0x240 [rc_core]

               stack backtrace:
CPU: 3 PID: 2502 Comm: bash Not tainted 4.10.0-rc1+ #1
Hardware name:                  /DG45ID, BIOS IDG4510H.86A.0135.2011.0225.1100 02/25/2011
Call Trace:
 dump_stack+0x86/0xc3
 print_circular_bug+0x1be/0x210
 __lock_acquire+0x10f7/0x1290
 lock_acquire+0xfd/0x200
 ? ir_raw_encode_scancode+0x3e/0xb0 [rc_core]
 ? ir_raw_encode_scancode+0x3e/0xb0 [rc_core]
 mutex_lock_nested+0x77/0x6d0
 ? ir_raw_encode_scancode+0x3e/0xb0 [rc_core]
 ? loop_set_wakeup_filter+0x44/0xbd [rc_loopback]
 ir_raw_encode_scancode+0x3e/0xb0 [rc_core]
 loop_set_wakeup_filter+0x62/0xbd [rc_loopback]
 ? loop_set_tx_duty_cycle+0x70/0x70 [rc_loopback]
 store_filter+0x1aa/0x240 [rc_core]
 dev_attr_store+0x18/0x30
 sysfs_kf_write+0x45/0x60
 kernfs_fop_write+0x155/0x1e0
 __vfs_write+0x37/0x160
 ? rcu_read_lock_sched_held+0x4a/0x80
 ? rcu_sync_lockdep_assert+0x2f/0x60
 ? __sb_start_write+0x10c/0x220
 ? vfs_write+0x195/0x1e0
 ? security_file_permission+0x3b/0xc0
 vfs_write+0xc8/0x1e0
 SyS_write+0x58/0xc0
 entry_SYSCALL_64_fastpath+0x1f/0xc2

Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>sched/headers: Prepare to move signal wakeup &amp; sigpending methods from &lt;linux/sched.h&gt; into &lt;linux/sched/signal.h&gt;</title>
<updated>2017-03-02T07:42:32+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2017-02-02T18:15:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=174cd4b1e5fbd0d74c68cf3a74f5bd4923485512'/>
<id>urn:sha1:174cd4b1e5fbd0d74c68cf3a74f5bd4923485512</id>
<content type='text'>
Fix up affected files that include this signal functionality via sched.h.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>[media] lirc: cannot read from tx-only device</title>
<updated>2017-02-03T16:23:36+00:00</updated>
<author>
<name>Sean Young</name>
<email>sean@mess.org</email>
</author>
<published>2017-02-01T22:08:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=32002f725fc708dccc6263b19b56fa3d91626be1'/>
<id>urn:sha1:32002f725fc708dccc6263b19b56fa3d91626be1</id>
<content type='text'>
Bail out early, otherwise we follow a null pointer.

Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] lirc: fix null dereference for tx-only devices</title>
<updated>2017-01-31T09:32:27+00:00</updated>
<author>
<name>Sean Young</name>
<email>sean@mess.org</email>
</author>
<published>2017-01-20T12:10:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7cebf2ee8b7e39c06c93b593b0848a7baf9e73a8'/>
<id>urn:sha1:7cebf2ee8b7e39c06c93b593b0848a7baf9e73a8</id>
<content type='text'>
tx-only RC devices do not have a receive buffer.

Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] lirc_dev: LIRC_{G,S}ET_REC_MODE do not work</title>
<updated>2017-01-30T13:52:28+00:00</updated>
<author>
<name>Sean Young</name>
<email>sean@mess.org</email>
</author>
<published>2016-12-02T17:16:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bd291208d7f5d6b2d6a033fee449a429230b06df'/>
<id>urn:sha1:bd291208d7f5d6b2d6a033fee449a429230b06df</id>
<content type='text'>
Since "273b902 [media] lirc_dev: use LIRC_CAN_REC() define" these
ioctls no longer work.

Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v4.8+
Reviewed-by: Andi Shyti &lt;andi.shyti@samsung.com&gt;
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>
<entry>
<title>[media] lirc: fix error paths in lirc_cdev_add()</title>
<updated>2016-12-01T14:46:00+00:00</updated>
<author>
<name>Sean Young</name>
<email>sean@mess.org</email>
</author>
<published>2016-11-26T21:31:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b40769ee2ed09ed6c6da33b0cbdf423ff94f685b'/>
<id>urn:sha1:b40769ee2ed09ed6c6da33b0cbdf423ff94f685b</id>
<content type='text'>
"c77d17c0 [media] lirc: use-after free" introduces two problems:
cdev_del() can be called with a NULL argument, and the kobject_put()
path will cause a double free.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] lirc: use-after free while reading from device and unplugging</title>
<updated>2016-11-21T15:28:11+00:00</updated>
<author>
<name>Sean Young</name>
<email>sean@mess.org</email>
</author>
<published>2016-10-31T17:52:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c77d17c0985a70fa3cd2ecde1e4f4be0dd5e9e12'/>
<id>urn:sha1:c77d17c0985a70fa3cd2ecde1e4f4be0dd5e9e12</id>
<content type='text'>
Many lirc drivers have their own receive buffers which are freed on
unplug (e.g. ir_lirc_unregister). This means that ir-&gt;buf-&gt;wait_poll
will be freed directly after unplug so do not remove yourself from the
wait queue.

Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] lirc: prevent use-after free</title>
<updated>2016-11-21T15:19:56+00:00</updated>
<author>
<name>Sean Young</name>
<email>sean@mess.org</email>
</author>
<published>2016-10-31T17:52:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=afbb110172b93e44a3fd1b5afb3a71f7f9da4406'/>
<id>urn:sha1:afbb110172b93e44a3fd1b5afb3a71f7f9da4406</id>
<content type='text'>
If you unplug an lirc device while reading from it, you will get an
use after free as the cdev is freed while still in use.

Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
</feed>
