<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/firmware_class.c, branch v3.12.10</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/base/firmware_class.c?h=v3.12.10</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/base/firmware_class.c?h=v3.12.10'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-08-30T19:04:27Z</updated>
<entry>
<title>firmware loader: fix pending_fw_head list corruption</title>
<updated>2013-08-30T19:04:27Z</updated>
<author>
<name>Maxime Bizon</name>
<email>mbizon@freebox.fr</email>
</author>
<published>2013-08-29T18:28:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1eeeef153c02f5856ec109fa532eb5f31c39f85c'/>
<id>urn:sha1:1eeeef153c02f5856ec109fa532eb5f31c39f85c</id>
<content type='text'>
Got the following oops just before reboot:

Unable to handle kernel NULL pointer dereference at virtual address 00000000
[&lt;8028d300&gt;] (__list_del_entry+0x44/0xac)
[&lt;802e3320&gt;] (__fw_load_abort.part.13+0x1c/0x50)
[&lt;802e337c&gt;] (fw_shutdown_notify+0x28/0x50)
[&lt;80034f80&gt;] (notifier_call_chain.isra.1+0x5c/0x9c)
[&lt;800350ec&gt;] (__blocking_notifier_call_chain+0x44/0x58)
[&lt;80035114&gt;] (blocking_notifier_call_chain+0x14/0x18)
[&lt;80035d64&gt;] (kernel_restart_prepare+0x14/0x38)
[&lt;80035d94&gt;] (kernel_restart+0xc/0x50)

The following race condition triggers here:

  _request_firmware_load()
  device_create_file(...)
  kobject_uevent(...)
  (schedule)
                                       (resume)
                                       firmware_loading_store(1)
                                       firmware_loading_store(0)
                                       list_del_init(&amp;buf-&gt;pending_list)
                                       (schedule)
  (resume)
  list_add(&amp;buf-&gt;pending_list, &amp;pending_fw_head);
  wait_for_completion(&amp;buf-&gt;completion);

causing an oops later when walking pending_list after the firmware has
been released.

The proposed fix is to move the list_add() before sysfs attribute
creation.

Signed-off-by: Maxime Bizon &lt;mbizon@freebox.fr&gt;
Acked-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: firmware: use __ATTR_RW()</title>
<updated>2013-08-24T00:08:48Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-08-24T00:08:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=14adbe5307a4110af7d1e95fb604a1abcdaa6cce'/>
<id>urn:sha1:14adbe5307a4110af7d1e95fb604a1abcdaa6cce</id>
<content type='text'>
Use __ATTR_RW() instead of __ATTR() to make it more obvious what the
type of attribute is being created.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware loader: fix another compile warning with PM_SLEEP unset</title>
<updated>2013-06-26T04:04:22Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@canonical.com</email>
</author>
<published>2013-06-26T01:28:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6a2c123427ffece4174db0792c3009e7df770d9a'/>
<id>urn:sha1:6a2c123427ffece4174db0792c3009e7df770d9a</id>
<content type='text'>
This patch fixes another compiling warning with PM_SLEEP unset:

drivers/base/firmware_class.c:221:29: warning: 'fw_lookup_buf' defined
but not used [-Wunused-function]

This time I do build kernel with both PM_SLEEP set and unset, and no
warning found any more with the patch.

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware loader: fix compile warning with PM_SLEEP set</title>
<updated>2013-06-21T21:09:47Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@canonical.com</email>
</author>
<published>2013-06-20T04:30:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=90f8908127b55aa22f5a995880d5ac8cd23fbe1e'/>
<id>urn:sha1:90f8908127b55aa22f5a995880d5ac8cd23fbe1e</id>
<content type='text'>
This patch fixes the below compile warning:

drivers/base/firmware_class.c:1254:12: warning: 'cache_firmware' defined
but not used [-Wunused-function]
 static int cache_firmware(const char *fw_name)
            ^
drivers/base/firmware_class.c:1281:12: warning: 'uncache_firmware'
defined but not used [-Wunused-function]
 static int uncache_firmware(const char *fw_name)
            ^

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'driver-core-linus' into driver-core-next</title>
<updated>2013-06-20T03:26:43Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-06-20T03:26:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7068cb07563d8f001e83a2836ccf1cef6518aea4'/>
<id>urn:sha1:7068cb07563d8f001e83a2836ccf1cef6518aea4</id>
<content type='text'>
This resolves the merge issues with drivers/base/firmware_class.c

Thanks to Ming Lei for the patch and hints on how to resolve it.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware loader: fix use-after-free by double abort</title>
<updated>2013-06-18T17:41:55Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@canonical.com</email>
</author>
<published>2013-06-15T08:36:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=875979368eb4cfecff9f0e97625b90cc6009269d'/>
<id>urn:sha1:875979368eb4cfecff9f0e97625b90cc6009269d</id>
<content type='text'>
fw_priv-&gt;buf is accessed in both request_firmware_load() and
writing to sysfs file of 'loading' context, but not protected
by 'fw_lock' entirely. The patch makes sure that access on
'fw_priv-&gt;buf' is protected by the lock.

So fixes the double abort problem reported by nirinA raseliarison:

	http://lkml.org/lkml/2013/6/14/188

Reported-and-tested-by: nirinA raseliarison &lt;nirina.raseliarison@gmail.com&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt; # 3.9
Signed-off-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware loader: simplify holding module for request_firmware</title>
<updated>2013-06-06T19:41:57Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@canonical.com</email>
</author>
<published>2013-06-06T12:01:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d6c8aa3906d5d0e4012b9811d6e0928dc7b4cbaf'/>
<id>urn:sha1:d6c8aa3906d5d0e4012b9811d6e0928dc7b4cbaf</id>
<content type='text'>
module reference doesn't cover direct loading path, so this patch
simply holds the module in the whole life time of request_firmware()
to fix the problem.

Signed-off-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware loader: don't export cache_firmware and uncache_firmware</title>
<updated>2013-06-06T19:41:57Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@canonical.com</email>
</author>
<published>2013-06-06T12:01:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=93232e46b209821cb66faf40def928e60615f86b'/>
<id>urn:sha1:93232e46b209821cb66faf40def928e60615f86b</id>
<content type='text'>
Looks no driver has the explict requirement for the two exported
API, just don't export them anymore.

Signed-off-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware loader: fix compile warning</title>
<updated>2013-06-06T19:22:28Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@canonical.com</email>
</author>
<published>2013-06-06T11:52:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5b7cb7a1289b77b942e0833c57d76287878315c2'/>
<id>urn:sha1:5b7cb7a1289b77b942e0833c57d76287878315c2</id>
<content type='text'>
The commit ddf1f0648e8c("firmware loader: fix build failure
with !CONFIG_FW_LOADER_USER_HELPER") introduces the below
warning:

drivers/base/firmware_class.c:921:13: warning:
'kill_requests_without_uevent' defined but not used [-Wunused-function]

So fix it by defining kill_requests_without_uevent() only if
CONFIG_PM_SLEEP is set.

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware loader: fix build failure with !CONFIG_FW_LOADER_USER_HELPER</title>
<updated>2013-06-04T17:24:40Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@canonical.com</email>
</author>
<published>2013-06-04T02:01:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ddf1f0648e8cd6d2208b1d3bfabd6501f5a9407f'/>
<id>urn:sha1:ddf1f0648e8cd6d2208b1d3bfabd6501f5a9407f</id>
<content type='text'>
This patch fixes one build failure which is introduced by the patch
below:

	driver core: firmware loader: kill FW_ACTION_NOHOTPLUG requests
	before suspend

When CONFIG_FW_LOADER_USER_HELPER is unset, kill_requests_without_uevent()
should be nop because no userspace loading is involved.

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
