<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers, branch v3.0.52</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.0.52</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.0.52'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2012-11-17T21:14:26+00:00</updated>
<entry>
<title>intel-iommu: Fix AB-BA lockdep report</title>
<updated>2012-11-17T21:14:26+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2011-07-20T13:22:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=919609d3cba52431b16501a63e6a5d45266a25c6'/>
<id>urn:sha1:919609d3cba52431b16501a63e6a5d45266a25c6</id>
<content type='text'>
commit 3e7abe2556b583e87dabda3e0e6178a67b20d06f upstream.

When unbinding a device so that I could pass it through to a KVM VM, I
got the lockdep report below.  It looks like a legitimate lock
ordering problem:

 - domain_context_mapping_one() takes iommu-&gt;lock and calls
   iommu_support_dev_iotlb(), which takes device_domain_lock (inside
   iommu-&gt;lock).

 - domain_remove_one_dev_info() starts by taking device_domain_lock
   then takes iommu-&gt;lock inside it (near the end of the function).

So this is the classic AB-BA deadlock.  It looks like a safe fix is to
simply release device_domain_lock a bit earlier, since as far as I can
tell, it doesn't protect any of the stuff accessed at the end of
domain_remove_one_dev_info() anyway.

BTW, the use of device_domain_lock looks a bit unsafe to me... it's
at least not obvious to me why we aren't vulnerable to the race below:

  iommu_support_dev_iotlb()
                                          domain_remove_dev_info()

  lock device_domain_lock
    find info
  unlock device_domain_lock

                                          lock device_domain_lock
                                            find same info
                                          unlock device_domain_lock

                                          free_devinfo_mem(info)

  do stuff with info after it's free

However I don't understand the locking here well enough to know if
this is a real problem, let alone what the best fix is.

Anyway here's the full lockdep output that prompted all of this:

     =======================================================
     [ INFO: possible circular locking dependency detected ]
     2.6.39.1+ #1
     -------------------------------------------------------
     bash/13954 is trying to acquire lock:
      (&amp;(&amp;iommu-&gt;lock)-&gt;rlock){......}, at: [&lt;ffffffff812f6421&gt;] domain_remove_one_dev_info+0x121/0x230

     but task is already holding lock:
      (device_domain_lock){-.-...}, at: [&lt;ffffffff812f6508&gt;] domain_remove_one_dev_info+0x208/0x230

     which lock already depends on the new lock.

     the existing dependency chain (in reverse order) is:

     -&gt; #1 (device_domain_lock){-.-...}:
            [&lt;ffffffff8109ca9d&gt;] lock_acquire+0x9d/0x130
            [&lt;ffffffff81571475&gt;] _raw_spin_lock_irqsave+0x55/0xa0
            [&lt;ffffffff812f8350&gt;] domain_context_mapping_one+0x600/0x750
            [&lt;ffffffff812f84df&gt;] domain_context_mapping+0x3f/0x120
            [&lt;ffffffff812f9175&gt;] iommu_prepare_identity_map+0x1c5/0x1e0
            [&lt;ffffffff81ccf1ca&gt;] intel_iommu_init+0x88e/0xb5e
            [&lt;ffffffff81cab204&gt;] pci_iommu_init+0x16/0x41
            [&lt;ffffffff81002165&gt;] do_one_initcall+0x45/0x190
            [&lt;ffffffff81ca3d3f&gt;] kernel_init+0xe3/0x168
            [&lt;ffffffff8157ac24&gt;] kernel_thread_helper+0x4/0x10

     -&gt; #0 (&amp;(&amp;iommu-&gt;lock)-&gt;rlock){......}:
            [&lt;ffffffff8109bf3e&gt;] __lock_acquire+0x195e/0x1e10
            [&lt;ffffffff8109ca9d&gt;] lock_acquire+0x9d/0x130
            [&lt;ffffffff81571475&gt;] _raw_spin_lock_irqsave+0x55/0xa0
            [&lt;ffffffff812f6421&gt;] domain_remove_one_dev_info+0x121/0x230
            [&lt;ffffffff812f8b42&gt;] device_notifier+0x72/0x90
            [&lt;ffffffff8157555c&gt;] notifier_call_chain+0x8c/0xc0
            [&lt;ffffffff81089768&gt;] __blocking_notifier_call_chain+0x78/0xb0
            [&lt;ffffffff810897b6&gt;] blocking_notifier_call_chain+0x16/0x20
            [&lt;ffffffff81373a5c&gt;] __device_release_driver+0xbc/0xe0
            [&lt;ffffffff81373ccf&gt;] device_release_driver+0x2f/0x50
            [&lt;ffffffff81372ee3&gt;] driver_unbind+0xa3/0xc0
            [&lt;ffffffff813724ac&gt;] drv_attr_store+0x2c/0x30
            [&lt;ffffffff811e4506&gt;] sysfs_write_file+0xe6/0x170
            [&lt;ffffffff8117569e&gt;] vfs_write+0xce/0x190
            [&lt;ffffffff811759e4&gt;] sys_write+0x54/0xa0
            [&lt;ffffffff81579a82&gt;] system_call_fastpath+0x16/0x1b

     other info that might help us debug this:

     6 locks held by bash/13954:
      #0:  (&amp;buffer-&gt;mutex){+.+.+.}, at: [&lt;ffffffff811e4464&gt;] sysfs_write_file+0x44/0x170
      #1:  (s_active#3){++++.+}, at: [&lt;ffffffff811e44ed&gt;] sysfs_write_file+0xcd/0x170
      #2:  (&amp;__lockdep_no_validate__){+.+.+.}, at: [&lt;ffffffff81372edb&gt;] driver_unbind+0x9b/0xc0
      #3:  (&amp;__lockdep_no_validate__){+.+.+.}, at: [&lt;ffffffff81373cc7&gt;] device_release_driver+0x27/0x50
      #4:  (&amp;(&amp;priv-&gt;bus_notifier)-&gt;rwsem){.+.+.+}, at: [&lt;ffffffff8108974f&gt;] __blocking_notifier_call_chain+0x5f/0xb0
      #5:  (device_domain_lock){-.-...}, at: [&lt;ffffffff812f6508&gt;] domain_remove_one_dev_info+0x208/0x230

     stack backtrace:
     Pid: 13954, comm: bash Not tainted 2.6.39.1+ #1
     Call Trace:
      [&lt;ffffffff810993a7&gt;] print_circular_bug+0xf7/0x100
      [&lt;ffffffff8109bf3e&gt;] __lock_acquire+0x195e/0x1e10
      [&lt;ffffffff810972bd&gt;] ? trace_hardirqs_off+0xd/0x10
      [&lt;ffffffff8109d57d&gt;] ? trace_hardirqs_on_caller+0x13d/0x180
      [&lt;ffffffff8109ca9d&gt;] lock_acquire+0x9d/0x130
      [&lt;ffffffff812f6421&gt;] ? domain_remove_one_dev_info+0x121/0x230
      [&lt;ffffffff81571475&gt;] _raw_spin_lock_irqsave+0x55/0xa0
      [&lt;ffffffff812f6421&gt;] ? domain_remove_one_dev_info+0x121/0x230
      [&lt;ffffffff810972bd&gt;] ? trace_hardirqs_off+0xd/0x10
      [&lt;ffffffff812f6421&gt;] domain_remove_one_dev_info+0x121/0x230
      [&lt;ffffffff812f8b42&gt;] device_notifier+0x72/0x90
      [&lt;ffffffff8157555c&gt;] notifier_call_chain+0x8c/0xc0
      [&lt;ffffffff81089768&gt;] __blocking_notifier_call_chain+0x78/0xb0
      [&lt;ffffffff810897b6&gt;] blocking_notifier_call_chain+0x16/0x20
      [&lt;ffffffff81373a5c&gt;] __device_release_driver+0xbc/0xe0
      [&lt;ffffffff81373ccf&gt;] device_release_driver+0x2f/0x50
      [&lt;ffffffff81372ee3&gt;] driver_unbind+0xa3/0xc0
      [&lt;ffffffff813724ac&gt;] drv_attr_store+0x2c/0x30
      [&lt;ffffffff811e4506&gt;] sysfs_write_file+0xe6/0x170
      [&lt;ffffffff8117569e&gt;] vfs_write+0xce/0x190
      [&lt;ffffffff811759e4&gt;] sys_write+0x54/0xa0
      [&lt;ffffffff81579a82&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: mos7840: remove unused variable</title>
<updated>2012-11-17T21:14:25+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2012-11-08T17:28:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=87725c35384baf9b6fbea6342807aab7071b0462'/>
<id>urn:sha1:87725c35384baf9b6fbea6342807aab7071b0462</id>
<content type='text'>
Fix warning about unused variable introduced by commit e681b66f2e19fa
("USB: mos7840: remove invalid disconnect handling") upstream.

A subsequent fix which removed the disconnect function got rid of the
warning but that one was only backported to v3.6.

Reported-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/i915: clear the entire sdvo infoframe buffer</title>
<updated>2012-11-17T21:14:25+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2012-10-21T10:52:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b7832d49e5e0f4be7328efb271f097d39f61804a'/>
<id>urn:sha1:b7832d49e5e0f4be7328efb271f097d39f61804a</id>
<content type='text'>
commit b6e0e543f75729f207b9c72b0162ae61170635b2 upstream.

Like in the case of native hdmi, which is fixed already in

commit adf00b26d18e1b3570451296e03bcb20e4798cdd
Author: Paulo Zanoni &lt;paulo.r.zanoni@intel.com&gt;
Date:   Tue Sep 25 13:23:34 2012 -0300

    drm/i915: make sure we write all the DIP data bytes

we need to clear the entire sdvo buffer to avoid upsetting the
display.

Since infoframe buffer writing is now a bit more elaborate, extract it
into it's own function. This will be useful if we ever get around to
properly update the ELD for sdvo. Also #define proper names for the
two buffer indexes with fixed usage.

v2: Cite the right commit above, spotted by Paulo Zanoni.

v3: I'm too stupid to paste the right commit.

v4: Ben Hutchings noticed that I've failed to handle an underflow in
my loop logic, breaking it for i &gt;= length + 8. Since I've just lost C
programmer license, use his solution. Also, make the frustrated 0-base
buffer size a notch more clear.

Reported-and-tested-by: Jürg Billeter &lt;j@bitron.ch&gt;
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=25732
Cc: Paulo Zanoni &lt;przanoni@gmail.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Reviewed-by: Rodrigo Vivi &lt;rodrigo.vivi@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/i915: fixup infoframe support for sdvo</title>
<updated>2012-11-17T21:14:25+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2012-05-12T18:22:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9615dee441f72d194234455ed30660c145260973'/>
<id>urn:sha1:9615dee441f72d194234455ed30660c145260973</id>
<content type='text'>
commit 81014b9d0b55fb0b48f26cd2a943359750d532db upstream.

At least the worst offenders:
- SDVO specifies that the encoder should compute the ecc. Testing also
  shows that we must not send the ecc field, so copy the dip_infoframe
  struct to a temporay place and avoid the ecc field. This way the avi
  infoframe is exactly 17 bytes long, which agrees with what the spec
  mandates as a minimal storage capacity (with the ecc field it would
  be 18 bytes).
- Only 17 when sending the avi infoframe. The SDVO spec explicitly
  says that sending more data than what the device announces results
  in undefined behaviour.
- Add __attribute__((packed)) to the avi and spd infoframes, for
  otherwise they're wrongly aligned. Noticed because the avi infoframe
  ended up being 18 bytes large instead of 17. We haven't noticed this
  yet because we don't use the uint16_t fields yet (which are the only
  ones that would be wrongly aligned).

This regression has been introduce by

3c17fe4b8f40a112a85758a9ab2aebf772bdd647 is the first bad commit
commit 3c17fe4b8f40a112a85758a9ab2aebf772bdd647
Author: David Härdeman &lt;david@hardeman.nu&gt;
Date:   Fri Sep 24 21:44:32 2010 +0200

    i915: enable AVI infoframe for intel_hdmi.c [v4]

Patch tested on my g33 with a sdvo hdmi adaptor.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=25732
Tested-by: Peter Ross &lt;pross@xvid.org&gt; (G35 SDVO-HDMI)
Reviewed-by: Eugeni Dodonov &lt;eugeni.dodonov@intel.com&gt;
Signed-Off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/vmwgfx: Fix hibernation device reset</title>
<updated>2012-11-17T21:14:25+00:00</updated>
<author>
<name>Thomas Hellstrom</name>
<email>thellstrom@vmware.com</email>
</author>
<published>2012-11-09T09:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d18edec7ace955fad9948eb3ee71d34f79d377ca'/>
<id>urn:sha1:d18edec7ace955fad9948eb3ee71d34f79d377ca</id>
<content type='text'>
commit 95e8f6a21996c4cc2c4574b231c6e858b749dce3 upstream.

The device would not reset properly when resuming from hibernation.

Signed-off-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Reviewed-by: Brian Paul &lt;brianp@vmware.com&gt;
Reviewed-by: Dmitry Torokhov &lt;dtor@vmware.com&gt;
Cc: linux-graphics-maintainer@vmware.com
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>net: usb: Fix memory leak on Tx data path</title>
<updated>2012-11-17T21:14:24+00:00</updated>
<author>
<name>Hemant Kumar</name>
<email>hemantk@codeaurora.org</email>
</author>
<published>2012-10-25T18:17:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=690bfe52ce0784e7a24ae8a37929580b6bd65bc9'/>
<id>urn:sha1:690bfe52ce0784e7a24ae8a37929580b6bd65bc9</id>
<content type='text'>
[ Upstream commit 39707c2a3ba5011038b363f84d37c8a98d2d9db1 ]

Driver anchors the tx urbs and defers the urb submission if
a transmit request comes when the interface is suspended.
Anchoring urb increments the urb reference count. These
deferred urbs are later accessed by calling usb_get_from_anchor()
for submission during interface resume. usb_get_from_anchor()
unanchors the urb but urb reference count remains same.
This causes the urb reference count to remain non-zero
after usb_free_urb() gets called and urb never gets freed.
Hence call usb_put_urb() after anchoring the urb to properly
balance the reference count for these deferred urbs. Also,
unanchor these deferred urbs during disconnect, to free them
up.

Signed-off-by: Hemant Kumar &lt;hemantk@codeaurora.org&gt;
Acked-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (w83627ehf) Force initial bank selection</title>
<updated>2012-11-17T21:14:22+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2012-11-05T20:54:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ec1f5bf6b3a9f42284371d41a7c998c05c49abcb'/>
<id>urn:sha1:ec1f5bf6b3a9f42284371d41a7c998c05c49abcb</id>
<content type='text'>
commit 3300fb4f88688029fff8dfb9ec0734f6e4cba3e7 upstream.

Don't assume bank 0 is selected at device probe time. This may not be
the case. Force bank selection at first register access to guarantee
that we read the right registers upon driver loading.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm: restore open_count if drm_setup fails</title>
<updated>2012-11-17T21:14:22+00:00</updated>
<author>
<name>Ilija Hadzic</name>
<email>ilijahadzic@gmail.com</email>
</author>
<published>2012-10-29T17:35:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=356c93d57c40513a321380f274560504a0778c6b'/>
<id>urn:sha1:356c93d57c40513a321380f274560504a0778c6b</id>
<content type='text'>
commit 0f1cb1bd94a9c967cd4ad3de51cfdabe61eb5dcc upstream.

If drm_setup (called at first open) fails, the whole
open call has failed, so we should not keep the
open_count incremented.

Signed-off-by: Ilija Hadzic &lt;ihadzic@research.bell-labs.com&gt;
Reviewed-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>DRM/Radeon: Fix Load Detection on legacy primary DAC.</title>
<updated>2012-11-17T21:14:20+00:00</updated>
<author>
<name>Egbert Eich</name>
<email>eich@suse.de</email>
</author>
<published>2012-10-24T16:29:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2dda2bb41abe27bdfab30234d56320339a411b3d'/>
<id>urn:sha1:2dda2bb41abe27bdfab30234d56320339a411b3d</id>
<content type='text'>
commit 83325d072185899b706de2956170b246585aaec9 upstream.

An uninitialized variable led to broken load detection.

Signed-off-by: Egbert Eich &lt;eich@suse.de&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Don't return success from module_init() if setup fails</title>
<updated>2012-11-17T21:14:20+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-10-31T16:16:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f100fdf3a97be683cf57802a566cfe0cce89fc7a'/>
<id>urn:sha1:f100fdf3a97be683cf57802a566cfe0cce89fc7a</id>
<content type='text'>
commit 0d0f9dfb31e0a6c92063e235417b42df185b3275 upstream.

If the call to core_dev_release_virtual_lun0() fails, then nothing
sets ret to anything other than 0, so even though everything is
torn down and freed, target_core_init_configfs() will seem to succeed
and the module will be loaded.  Fix this by passing the return value
on up the chain.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
