<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/media/rc, branch linux-4.6.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>[media] mceusb: use %*ph for small buffer dumps</title>
<updated>2016-03-10T16:37:44+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-03-06T13:00:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=eef8fc374c131647ea9eea3301f06f4eee7f51ae'/>
<id>eef8fc374c131647ea9eea3301f06f4eee7f51ae</id>
<content type='text'>
It makes the printk cleaner. As a side efect, it also fixes those smatch
warnings:
	drivers/media/rc/mceusb.c:590 mceusb_dev_printdata() warn: argument 6 to %02x specifier has type 'char'
	drivers/media/rc/mceusb.c:590 mceusb_dev_printdata() warn: argument 7 to %02x specifier has type 'char'

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It makes the printk cleaner. As a side efect, it also fixes those smatch
warnings:
	drivers/media/rc/mceusb.c:590 mceusb_dev_printdata() warn: argument 6 to %02x specifier has type 'char'
	drivers/media/rc/mceusb.c:590 mceusb_dev_printdata() warn: argument 7 to %02x specifier has type 'char'

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] media: rc: nuvoton: switch attribute wakeup_data to text</title>
<updated>2016-03-05T11:22:03+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2016-03-04T19:11:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=02212001c95671969d3018691d384db16092eb27'/>
<id>02212001c95671969d3018691d384db16092eb27</id>
<content type='text'>
Switch attribute wakeup_data from binary to a text attribute.
This makes it easier to handle in userspace and allows to
use the output of tools like mode2 almost as is to set a
wakeup sequence.
Changing to a text format and values in microseconds also
makes the userspace interface independent of the setting of
SAMPLE_PERIOD in the driver.

In addition document the new sysfs attribute in
Documentation/ABI/testing/sysfs-class-rc-nuvoton.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Switch attribute wakeup_data from binary to a text attribute.
This makes it easier to handle in userspace and allows to
use the output of tools like mode2 almost as is to set a
wakeup sequence.
Changing to a text format and values in microseconds also
makes the userspace interface independent of the setting of
SAMPLE_PERIOD in the driver.

In addition document the new sysfs attribute in
Documentation/ABI/testing/sysfs-class-rc-nuvoton.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] rc: sunxi-cir: support module autoloading</title>
<updated>2016-03-03T15:42:34+00:00</updated>
<author>
<name>Emilio López</name>
<email>emilio.lopez@collabora.co.uk</email>
</author>
<published>2016-02-22T01:26:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ea05e8b4ec91a562bbd26ae2e1d0fc434b8d5d27'/>
<id>ea05e8b4ec91a562bbd26ae2e1d0fc434b8d5d27</id>
<content type='text'>
MODULE_DEVICE_TABLE() is missing, so the module isn't auto-loading on
systems supporting infrared. This commit adds the missing line so it
works out of the box when built as a module and running on a sunxi
system with an infrared receiver.

Signed-off-by: Emilio López &lt;emilio.lopez@collabora.co.uk&gt;
Reviewed-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MODULE_DEVICE_TABLE() is missing, so the module isn't auto-loading on
systems supporting infrared. This commit adds the missing line so it
works out of the box when built as a module and running on a sunxi
system with an infrared receiver.

Signed-off-by: Emilio López &lt;emilio.lopez@collabora.co.uk&gt;
Reviewed-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] igorplugusb: fix leaks in error path</title>
<updated>2016-03-03T14:44:29+00:00</updated>
<author>
<name>Sean Young</name>
<email>sean@mess.org</email>
</author>
<published>2016-02-19T14:33:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a40973ff101ff8d3a42a8222e3119292f4191b07'/>
<id>a40973ff101ff8d3a42a8222e3119292f4191b07</id>
<content type='text'>
Since rc_allocate_device() uses kmalloc, it can returns NULL,
so need to check,  otherwise, NULL derefenrece can happen.

Reported-by: Insu Yun &lt;wuninsu@gmail.com&gt;
Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since rc_allocate_device() uses kmalloc, it can returns NULL,
so need to check,  otherwise, NULL derefenrece can happen.

Reported-by: Insu Yun &lt;wuninsu@gmail.com&gt;
Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] Fix AverMedia RM-KS remote keymap</title>
<updated>2016-03-03T11:33:41+00:00</updated>
<author>
<name>Philippe Valembois</name>
<email>lephilousophe@users.sourceforge.net</email>
</author>
<published>2016-02-09T08:09:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b21d29e08cc3424622e0b0d800307e254951f425'/>
<id>b21d29e08cc3424622e0b0d800307e254951f425</id>
<content type='text'>
Fix AverMedia RM-KS keymap using user guide to meet LinuxTV wiki rules.
The remote command didn't seem to change in itself since its creation: it's
just to make keys more standard and remove the FIXME.

Signed-off-by: Philippe Valembois &lt;lephilousophe@users.sourceforge.net&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix AverMedia RM-KS keymap using user guide to meet LinuxTV wiki rules.
The remote command didn't seem to change in itself since its creation: it's
just to make keys more standard and remove the FIXME.

Signed-off-by: Philippe Valembois &lt;lephilousophe@users.sourceforge.net&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] media: rc: nuvoton: support reading / writing wakeup sequence via sysfs</title>
<updated>2016-03-03T11:28:41+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2016-02-08T19:25:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=449c1fcd86f5077d5076a955e65c07a7c4cbbf9d'/>
<id>449c1fcd86f5077d5076a955e65c07a7c4cbbf9d</id>
<content type='text'>
This patch adds a binary attribute /sys/class/rc/rc?/wakeup_data which
allows to read / write the wakeup sequence.

In combination with the core extension for exposing the most recent raw
packet this allows to easily define and set a wakeup sequence.

At least on my Zotac CI321 the BIOS resets the wakeup sequence at each boot
to a factory default. Therefore I use a udev rule
SUBSYSTEM=="rc", DRIVERS=="nuvoton-cir", ACTION=="add", RUN+="&lt;script&gt;"
with the script basically doing
cat &lt;stored wakeup sequence&gt; &gt;/sys${DEVPATH}/wakeup_data

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a binary attribute /sys/class/rc/rc?/wakeup_data which
allows to read / write the wakeup sequence.

In combination with the core extension for exposing the most recent raw
packet this allows to easily define and set a wakeup sequence.

At least on my Zotac CI321 the BIOS resets the wakeup sequence at each boot
to a factory default. Therefore I use a udev rule
SUBSYSTEM=="rc", DRIVERS=="nuvoton-cir", ACTION=="add", RUN+="&lt;script&gt;"
with the script basically doing
cat &lt;stored wakeup sequence&gt; &gt;/sys${DEVPATH}/wakeup_data

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] rc-core: allow calling rc_open with device not initialized</title>
<updated>2016-03-03T09:16:14+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-03-02T11:00:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=078600f514a12fd763ac84c86af68ef5b5267563'/>
<id>078600f514a12fd763ac84c86af68ef5b5267563</id>
<content type='text'>
The device initialization completes only after calling
input_register_device(). However, rc_open() can be called while
the device is being registered by the input/evdev core. So, we
can't expect that rc_dev-&gt;initialized to be true.

Change the logic to don't require initialized == true at rc_open
and change the type of initialized to be atomic.

this way, we can check for it earlier where it is really needed,
without needing to lock the mutex just for testing it.

Tested with nuvoton_cir driver on a NUC5i7RYB with CIR integrated on it.

Reported-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The device initialization completes only after calling
input_register_device(). However, rc_open() can be called while
the device is being registered by the input/evdev core. So, we
can't expect that rc_dev-&gt;initialized to be true.

Change the logic to don't require initialized == true at rc_open
and change the type of initialized to be atomic.

this way, we can check for it earlier where it is really needed,
without needing to lock the mutex just for testing it.

Tested with nuvoton_cir driver on a NUC5i7RYB with CIR integrated on it.

Reported-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] lirc_dev: avoid double mutex unlock</title>
<updated>2016-03-01T15:04:48+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-02-27T10:51:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b64e10f3dfbfb2fdc21013b6b265a5e48cbb0071'/>
<id>b64e10f3dfbfb2fdc21013b6b265a5e48cbb0071</id>
<content type='text'>
We can only unlock if mutex_lock() succeeds.

Fixes the following warning:
	drivers/media/rc/lirc_dev.c:535 lirc_dev_fop_close() error: double unlock 'mutex:&amp;lirc_dev_lock'

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can only unlock if mutex_lock() succeeds.

Fixes the following warning:
	drivers/media/rc/lirc_dev.c:535 lirc_dev_fop_close() error: double unlock 'mutex:&amp;lirc_dev_lock'

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] ati_remote: Put timeouts at the accel array</title>
<updated>2016-03-01T15:02:32+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-02-27T10:51:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fe28f5de11da417056fc1df872e9e26ceb7eb2fe'/>
<id>fe28f5de11da417056fc1df872e9e26ceb7eb2fe</id>
<content type='text'>
Instead of having the timeouts hardcoded, and getting only the
accel value from the array, put everything in the same place.

That simplifies the logic.

As a side effect, it also cleans several smatch errors:
	include/linux/jiffies.h:359:41: error: strange non-value function or array
	include/linux/jiffies.h:361:42: error: strange non-value function or array
(one per time_after/time_before line)

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of having the timeouts hardcoded, and getting only the
accel value from the array, put everything in the same place.

That simplifies the logic.

As a side effect, it also cleans several smatch errors:
	include/linux/jiffies.h:359:41: error: strange non-value function or array
	include/linux/jiffies.h:361:42: error: strange non-value function or array
(one per time_after/time_before line)

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] rc-core: don't lock device at rc_register_device()</title>
<updated>2016-02-16T10:40:41+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-02-11T12:33:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c73bbaa4ec3eb225ffe468f80d45724d0496bf03'/>
<id>c73bbaa4ec3eb225ffe468f80d45724d0496bf03</id>
<content type='text'>
The mutex lock at rc_register_device() was added by commit 08aeb7c9a42a
("[media] rc: add locking to fix register/show race").

It is meant to avoid race issues when trying to open a sysfs file while
the RC register didn't complete.

Adding a lock there causes troubles, as detected by the Kernel lock
debug instrumentation at the Kernel:

    ======================================================
    [ INFO: possible circular locking dependency detected ]
    4.5.0-rc3+ #46 Not tainted
    -------------------------------------------------------
    systemd-udevd/2681 is trying to acquire lock:
     (s_active#171){++++.+}, at: [&lt;ffffffff8171a115&gt;] kernfs_remove_by_name_ns+0x45/0xa0

    but task is already holding lock:
     (&amp;dev-&gt;lock){+.+.+.}, at: [&lt;ffffffffa0724def&gt;] rc_register_device+0xb2f/0x1450 [rc_core]

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -&gt; #1 (&amp;dev-&gt;lock){+.+.+.}:
           [&lt;ffffffff8124817d&gt;] lock_acquire+0x13d/0x320
           [&lt;ffffffff822de966&gt;] mutex_lock_nested+0xb6/0x860
           [&lt;ffffffffa0721f2b&gt;] show_protocols+0x3b/0x3f0 [rc_core]
           [&lt;ffffffff81cdaba5&gt;] dev_attr_show+0x45/0xc0
           [&lt;ffffffff8171f1b3&gt;] sysfs_kf_seq_show+0x203/0x3c0
           [&lt;ffffffff8171a6a1&gt;] kernfs_seq_show+0x121/0x1b0
           [&lt;ffffffff81617c71&gt;] seq_read+0x2f1/0x1160
           [&lt;ffffffff8171c911&gt;] kernfs_fop_read+0x321/0x460
           [&lt;ffffffff815abc20&gt;] __vfs_read+0xe0/0x3d0
           [&lt;ffffffff815ae90e&gt;] vfs_read+0xde/0x2d0
           [&lt;ffffffff815b1d01&gt;] SyS_read+0x111/0x230
           [&lt;ffffffff822e8636&gt;] entry_SYSCALL_64_fastpath+0x16/0x76

    -&gt; #0 (s_active#171){++++.+}:
           [&lt;ffffffff81244f24&gt;] __lock_acquire+0x4304/0x5990
           [&lt;ffffffff8124817d&gt;] lock_acquire+0x13d/0x320
           [&lt;ffffffff81717d3a&gt;] __kernfs_remove+0x58a/0x810
           [&lt;ffffffff8171a115&gt;] kernfs_remove_by_name_ns+0x45/0xa0
           [&lt;ffffffff81721592&gt;] remove_files.isra.0+0x72/0x190
           [&lt;ffffffff8172174b&gt;] sysfs_remove_group+0x9b/0x150
           [&lt;ffffffff81721854&gt;] sysfs_remove_groups+0x54/0xa0
           [&lt;ffffffff81cd97d0&gt;] device_remove_attrs+0xb0/0x140
           [&lt;ffffffff81cdb27c&gt;] device_del+0x38c/0x6b0
           [&lt;ffffffffa0724b8b&gt;] rc_register_device+0x8cb/0x1450 [rc_core]
           [&lt;ffffffffa1326a7b&gt;] dvb_usb_remote_init+0x66b/0x14d0 [dvb_usb]
           [&lt;ffffffffa1321c81&gt;] dvb_usb_device_init+0xf21/0x1860 [dvb_usb]
           [&lt;ffffffffa13517dc&gt;] dib0700_probe+0x14c/0x410 [dvb_usb_dib0700]
           [&lt;ffffffff81dbb1dd&gt;] usb_probe_interface+0x45d/0x940
           [&lt;ffffffff81ce7e7a&gt;] driver_probe_device+0x21a/0xc30
           [&lt;ffffffff81ce89b1&gt;] __driver_attach+0x121/0x160
           [&lt;ffffffff81ce21bf&gt;] bus_for_each_dev+0x11f/0x1a0
           [&lt;ffffffff81ce6cdd&gt;] driver_attach+0x3d/0x50
           [&lt;ffffffff81ce5df9&gt;] bus_add_driver+0x4c9/0x770
           [&lt;ffffffff81cea39c&gt;] driver_register+0x18c/0x3b0
           [&lt;ffffffff81db6e98&gt;] usb_register_driver+0x1f8/0x440
           [&lt;ffffffffa074001e&gt;] dib0700_driver_init+0x1e/0x1000 [dvb_usb_dib0700]
           [&lt;ffffffff810021b1&gt;] do_one_initcall+0x141/0x300
           [&lt;ffffffff8144d8eb&gt;] do_init_module+0x1d0/0x5ad
           [&lt;ffffffff812f27b6&gt;] load_module+0x6666/0x9ba0
           [&lt;ffffffff812f5fe8&gt;] SyS_finit_module+0x108/0x130
           [&lt;ffffffff822e8636&gt;] entry_SYSCALL_64_fastpath+0x16/0x76

    other info that might help us debug this:

     Possible unsafe locking scenario:

           CPU0                    CPU1
           ----                    ----
      lock(&amp;dev-&gt;lock);
                                   lock(s_active#171);
                                   lock(&amp;dev-&gt;lock);
      lock(s_active#171);

     *** DEADLOCK ***

    3 locks held by systemd-udevd/2681:
     #0:  (&amp;dev-&gt;mutex){......}, at: [&lt;ffffffff81ce8933&gt;] __driver_attach+0xa3/0x160
     #1:  (&amp;dev-&gt;mutex){......}, at: [&lt;ffffffff81ce8941&gt;] __driver_attach+0xb1/0x160
     #2:  (&amp;dev-&gt;lock){+.+.+.}, at: [&lt;ffffffffa0724def&gt;] rc_register_device+0xb2f/0x1450 [rc_core]

In this specific case, some error happened during device init,
causing IR to be disabled.

Let's fix it by adding a var that will tell when the device is
initialized. Any calls before that will return a -EINVAL.

That should prevent the race issues.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mutex lock at rc_register_device() was added by commit 08aeb7c9a42a
("[media] rc: add locking to fix register/show race").

It is meant to avoid race issues when trying to open a sysfs file while
the RC register didn't complete.

Adding a lock there causes troubles, as detected by the Kernel lock
debug instrumentation at the Kernel:

    ======================================================
    [ INFO: possible circular locking dependency detected ]
    4.5.0-rc3+ #46 Not tainted
    -------------------------------------------------------
    systemd-udevd/2681 is trying to acquire lock:
     (s_active#171){++++.+}, at: [&lt;ffffffff8171a115&gt;] kernfs_remove_by_name_ns+0x45/0xa0

    but task is already holding lock:
     (&amp;dev-&gt;lock){+.+.+.}, at: [&lt;ffffffffa0724def&gt;] rc_register_device+0xb2f/0x1450 [rc_core]

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -&gt; #1 (&amp;dev-&gt;lock){+.+.+.}:
           [&lt;ffffffff8124817d&gt;] lock_acquire+0x13d/0x320
           [&lt;ffffffff822de966&gt;] mutex_lock_nested+0xb6/0x860
           [&lt;ffffffffa0721f2b&gt;] show_protocols+0x3b/0x3f0 [rc_core]
           [&lt;ffffffff81cdaba5&gt;] dev_attr_show+0x45/0xc0
           [&lt;ffffffff8171f1b3&gt;] sysfs_kf_seq_show+0x203/0x3c0
           [&lt;ffffffff8171a6a1&gt;] kernfs_seq_show+0x121/0x1b0
           [&lt;ffffffff81617c71&gt;] seq_read+0x2f1/0x1160
           [&lt;ffffffff8171c911&gt;] kernfs_fop_read+0x321/0x460
           [&lt;ffffffff815abc20&gt;] __vfs_read+0xe0/0x3d0
           [&lt;ffffffff815ae90e&gt;] vfs_read+0xde/0x2d0
           [&lt;ffffffff815b1d01&gt;] SyS_read+0x111/0x230
           [&lt;ffffffff822e8636&gt;] entry_SYSCALL_64_fastpath+0x16/0x76

    -&gt; #0 (s_active#171){++++.+}:
           [&lt;ffffffff81244f24&gt;] __lock_acquire+0x4304/0x5990
           [&lt;ffffffff8124817d&gt;] lock_acquire+0x13d/0x320
           [&lt;ffffffff81717d3a&gt;] __kernfs_remove+0x58a/0x810
           [&lt;ffffffff8171a115&gt;] kernfs_remove_by_name_ns+0x45/0xa0
           [&lt;ffffffff81721592&gt;] remove_files.isra.0+0x72/0x190
           [&lt;ffffffff8172174b&gt;] sysfs_remove_group+0x9b/0x150
           [&lt;ffffffff81721854&gt;] sysfs_remove_groups+0x54/0xa0
           [&lt;ffffffff81cd97d0&gt;] device_remove_attrs+0xb0/0x140
           [&lt;ffffffff81cdb27c&gt;] device_del+0x38c/0x6b0
           [&lt;ffffffffa0724b8b&gt;] rc_register_device+0x8cb/0x1450 [rc_core]
           [&lt;ffffffffa1326a7b&gt;] dvb_usb_remote_init+0x66b/0x14d0 [dvb_usb]
           [&lt;ffffffffa1321c81&gt;] dvb_usb_device_init+0xf21/0x1860 [dvb_usb]
           [&lt;ffffffffa13517dc&gt;] dib0700_probe+0x14c/0x410 [dvb_usb_dib0700]
           [&lt;ffffffff81dbb1dd&gt;] usb_probe_interface+0x45d/0x940
           [&lt;ffffffff81ce7e7a&gt;] driver_probe_device+0x21a/0xc30
           [&lt;ffffffff81ce89b1&gt;] __driver_attach+0x121/0x160
           [&lt;ffffffff81ce21bf&gt;] bus_for_each_dev+0x11f/0x1a0
           [&lt;ffffffff81ce6cdd&gt;] driver_attach+0x3d/0x50
           [&lt;ffffffff81ce5df9&gt;] bus_add_driver+0x4c9/0x770
           [&lt;ffffffff81cea39c&gt;] driver_register+0x18c/0x3b0
           [&lt;ffffffff81db6e98&gt;] usb_register_driver+0x1f8/0x440
           [&lt;ffffffffa074001e&gt;] dib0700_driver_init+0x1e/0x1000 [dvb_usb_dib0700]
           [&lt;ffffffff810021b1&gt;] do_one_initcall+0x141/0x300
           [&lt;ffffffff8144d8eb&gt;] do_init_module+0x1d0/0x5ad
           [&lt;ffffffff812f27b6&gt;] load_module+0x6666/0x9ba0
           [&lt;ffffffff812f5fe8&gt;] SyS_finit_module+0x108/0x130
           [&lt;ffffffff822e8636&gt;] entry_SYSCALL_64_fastpath+0x16/0x76

    other info that might help us debug this:

     Possible unsafe locking scenario:

           CPU0                    CPU1
           ----                    ----
      lock(&amp;dev-&gt;lock);
                                   lock(s_active#171);
                                   lock(&amp;dev-&gt;lock);
      lock(s_active#171);

     *** DEADLOCK ***

    3 locks held by systemd-udevd/2681:
     #0:  (&amp;dev-&gt;mutex){......}, at: [&lt;ffffffff81ce8933&gt;] __driver_attach+0xa3/0x160
     #1:  (&amp;dev-&gt;mutex){......}, at: [&lt;ffffffff81ce8941&gt;] __driver_attach+0xb1/0x160
     #2:  (&amp;dev-&gt;lock){+.+.+.}, at: [&lt;ffffffffa0724def&gt;] rc_register_device+0xb2f/0x1450 [rc_core]

In this specific case, some error happened during device init,
causing IR to be disabled.

Let's fix it by adding a var that will tell when the device is
initialized. Any calls before that will return a -EINVAL.

That should prevent the race issues.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
