<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/firmware, branch v3.12.14</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/firmware?h=v3.12.14</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/firmware?h=v3.12.14'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-12-12T06:37:53Z</updated>
<entry>
<title>efi-pstore: Make efi-pstore return a unique id</title>
<updated>2013-12-12T06:37:53Z</updated>
<author>
<name>Madper Xie</name>
<email>cxie@redhat.com</email>
</author>
<published>2013-11-29T07:58:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e25c1306c5780fa6108fb0180ba31ace928bc593'/>
<id>urn:sha1:e25c1306c5780fa6108fb0180ba31ace928bc593</id>
<content type='text'>
commit fdeadb43fdf1e7d5698c027b555c389174548e5a upstream.

Pstore fs expects that backends provide a unique id which could avoid
pstore making entries as duplication or denominating entries the same
name. So I combine the timestamp, part and count into id.

Signed-off-by: Madper Xie &lt;cxie@redhat.com&gt;
Cc: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>efivars, efi-pstore: Hold off deletion of sysfs entry until the scan is completed</title>
<updated>2013-12-12T06:37:53Z</updated>
<author>
<name>Seiji Aguchi</name>
<email>seiji.aguchi@hds.com</email>
</author>
<published>2013-10-30T19:27:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a24851a1fe45a78be42d28c0dea6084f0c5c3afe'/>
<id>urn:sha1:a24851a1fe45a78be42d28c0dea6084f0c5c3afe</id>
<content type='text'>
commit e0d59733f6b1796b8d6692642c87d7dd862c3e3a upstream.

Currently, when mounting pstore file system, a read callback of
efi_pstore driver runs mutiple times as below.

- In the first read callback, scan efivar_sysfs_list from head and pass
  a kmsg buffer of a entry to an upper pstore layer.
- In the second read callback, rescan efivar_sysfs_list from the entry
  and pass another kmsg buffer to it.
- Repeat the scan and pass until the end of efivar_sysfs_list.

In this process, an entry is read across the multiple read function
calls. To avoid race between the read and erasion, the whole process
above is protected by a spinlock, holding in open() and releasing in
close().

At the same time, kmemdup() is called to pass the buffer to pstore
filesystem during it. And then, it causes a following lockdep warning.

To make the dynamic memory allocation runnable without taking spinlock,
holding off a deletion of sysfs entry if it happens while scanning it
via efi_pstore, and deleting it after the scan is completed.

To implement it, this patch introduces two flags, scanning and deleting,
to efivar_entry.

On the code basis, it seems that all the scanning and deleting logic is
not needed because __efivars-&gt;lock are not dropped when reading from the
EFI variable store.

But, the scanning and deleting logic is still needed because an
efi-pstore and a pstore filesystem works as follows.

In case an entry(A) is found, the pointer is saved to psi-&gt;data.  And
efi_pstore_read() passes the entry(A) to a pstore filesystem by
releasing  __efivars-&gt;lock.

And then, the pstore filesystem calls efi_pstore_read() again and the
same entry(A), which is saved to psi-&gt;data, is used for resuming to scan
a sysfs-list.

So, to protect the entry(A), the logic is needed.

[    1.143710] ------------[ cut here ]------------
[    1.144058] WARNING: CPU: 1 PID: 1 at kernel/lockdep.c:2740 lockdep_trace_alloc+0x104/0x110()
[    1.144058] DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags))
[    1.144058] Modules linked in:
[    1.144058] CPU: 1 PID: 1 Comm: systemd Not tainted 3.11.0-rc5 #2
[    1.144058]  0000000000000009 ffff8800797e9ae0 ffffffff816614a5 ffff8800797e9b28
[    1.144058]  ffff8800797e9b18 ffffffff8105510d 0000000000000080 0000000000000046
[    1.144058]  00000000000000d0 00000000000003af ffffffff81ccd0c0 ffff8800797e9b78
[    1.144058] Call Trace:
[    1.144058]  [&lt;ffffffff816614a5&gt;] dump_stack+0x54/0x74
[    1.144058]  [&lt;ffffffff8105510d&gt;] warn_slowpath_common+0x7d/0xa0
[    1.144058]  [&lt;ffffffff8105517c&gt;] warn_slowpath_fmt+0x4c/0x50
[    1.144058]  [&lt;ffffffff8131290f&gt;] ? vsscanf+0x57f/0x7b0
[    1.144058]  [&lt;ffffffff810bbd74&gt;] lockdep_trace_alloc+0x104/0x110
[    1.144058]  [&lt;ffffffff81192da0&gt;] __kmalloc_track_caller+0x50/0x280
[    1.144058]  [&lt;ffffffff815147bb&gt;] ? efi_pstore_read_func.part.1+0x12b/0x170
[    1.144058]  [&lt;ffffffff8115b260&gt;] kmemdup+0x20/0x50
[    1.144058]  [&lt;ffffffff815147bb&gt;] efi_pstore_read_func.part.1+0x12b/0x170
[    1.144058]  [&lt;ffffffff81514800&gt;] ? efi_pstore_read_func.part.1+0x170/0x170
[    1.144058]  [&lt;ffffffff815148b4&gt;] efi_pstore_read_func+0xb4/0xe0
[    1.144058]  [&lt;ffffffff81512b7b&gt;] __efivar_entry_iter+0xfb/0x120
[    1.144058]  [&lt;ffffffff8151428f&gt;] efi_pstore_read+0x3f/0x50
[    1.144058]  [&lt;ffffffff8128d7ba&gt;] pstore_get_records+0x9a/0x150
[    1.158207]  [&lt;ffffffff812af25c&gt;] ? selinux_d_instantiate+0x1c/0x20
[    1.158207]  [&lt;ffffffff8128ce30&gt;] ? parse_options+0x80/0x80
[    1.158207]  [&lt;ffffffff8128ced5&gt;] pstore_fill_super+0xa5/0xc0
[    1.158207]  [&lt;ffffffff811ae7d2&gt;] mount_single+0xa2/0xd0
[    1.158207]  [&lt;ffffffff8128ccf8&gt;] pstore_mount+0x18/0x20
[    1.158207]  [&lt;ffffffff811ae8b9&gt;] mount_fs+0x39/0x1b0
[    1.158207]  [&lt;ffffffff81160550&gt;] ? __alloc_percpu+0x10/0x20
[    1.158207]  [&lt;ffffffff811c9493&gt;] vfs_kern_mount+0x63/0xf0
[    1.158207]  [&lt;ffffffff811cbb0e&gt;] do_mount+0x23e/0xa20
[    1.158207]  [&lt;ffffffff8115b51b&gt;] ? strndup_user+0x4b/0xf0
[    1.158207]  [&lt;ffffffff811cc373&gt;] SyS_mount+0x83/0xc0
[    1.158207]  [&lt;ffffffff81673cc2&gt;] system_call_fastpath+0x16/0x1b
[    1.158207] ---[ end trace 61981bc62de9f6f4 ]---

Signed-off-by: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Tested-by: Madper Xie &lt;cxie@redhat.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>firmware/dmi_scan: drop OOM messages</title>
<updated>2013-09-11T22:58:51Z</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2013-09-11T21:24:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ae79744975cb0b3b9c469fe1a05db37d2943c863'/>
<id>urn:sha1:ae79744975cb0b3b9c469fe1a05db37d2943c863</id>
<content type='text'>
As reported by Joe Perches: OOM messages generally aren't useful.
dmi_alloc is either a trivial front-end to kzalloc, and kzalloc already
does a dump_stack() when OOM, or for x86, dmi_alloc uses extend_brk
which BUGs when unsuccessful.

So we can remove all 6 such log messages in the dmi_scan driver, to
shrink the binary size (by 528 bytes on x86_64.)

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Reported-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>firmware/dmi_scan: constify strings</title>
<updated>2013-09-11T22:58:51Z</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2013-09-11T21:24:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ffbbb96dd7570b9aafd426cd77a7ee03d224cabf'/>
<id>urn:sha1:ffbbb96dd7570b9aafd426cd77a7ee03d224cabf</id>
<content type='text'>
Add const to all DMI string pointers where this is possible.  This fixes a
checkpatch warning.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>firmware/dmi_scan: fix most checkpatch errors and warnings</title>
<updated>2013-09-11T22:58:50Z</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2013-09-11T21:24:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=02d9c47f1bf2304d6482e1e69e00c06791d86908'/>
<id>urn:sha1:02d9c47f1bf2304d6482e1e69e00c06791d86908</id>
<content type='text'>
Fix all errors and trivial warnings reported by checkpatch for file
drivers/firmware/dmi_scan.c.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>firmware/dmi_scan: drop obsolete comment</title>
<updated>2013-09-11T22:58:50Z</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2013-09-11T21:24:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3d267f24d4c7bcc829ce9daa92e41c3f390c95dd'/>
<id>urn:sha1:3d267f24d4c7bcc829ce9daa92e41c3f390c95dd</id>
<content type='text'>
This comment predates the introduction of early_ioremap.  Since then the
missing calls to dmi_iounmap have been added by Ingo and Yinghai in
commits 0d64484f7ea1 ("x86: fix DMI ioremap leak") and 3212bff370c2
("x86: left over fix for leak of early_ioremp in dmi_scan") .  That was
over 5 years ago so it is about time to drop this now misleading
comment.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/firmware/google/gsmi.c: replace strict_strtoul() with kstrtoul()</title>
<updated>2013-09-11T22:58:16Z</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-09-11T21:23:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=20d0e57017b69e7e4ae7166c43f3a3f023ab9702'/>
<id>urn:sha1:20d0e57017b69e7e4ae7166c43f3a3f023ab9702</id>
<content type='text'>
The use of strict_strtoul() is not preferred, because strict_strtoul() is
obsolete.  Thus, kstrtoul() should be used.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Cc: Matt Fleming &lt;matt.fleming@intel.com&gt;
Cc: Tom Gundersen &lt;teg@jklm.no&gt;
Cc: Mike Waychison &lt;mikew@google.com&gt;
Acked-by: Mike Waychison &lt;mikew@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'please-pull-pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux</title>
<updated>2013-09-04T04:14:06Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-09-04T04:14:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f83b0a4e4c33aa31dac0b8b48f1f3a470edc933a'/>
<id>urn:sha1:f83b0a4e4c33aa31dac0b8b48f1f3a470edc933a</id>
<content type='text'>
Pull pstore changes from Tony Luck:
 "A big part of this is the addition of compression to the generic
  pstore layer so that all backends can use the pitiful amounts of
  storage they control more effectively.  Three other small
  fixes/cleanups too.

* tag 'please-pull-pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
  pstore/ram: (really) fix undefined usage of rounddown_pow_of_two
  pstore/ram: Read and write to the 'compressed' flag of pstore
  efi-pstore: Read and write to the 'compressed' flag of pstore
  erst: Read and write to the 'compressed' flag of pstore
  powerpc/pseries: Read and write to the 'compressed' flag of pstore
  pstore: Add file extension to pstore file if compressed
  pstore: Add decompression support to pstore
  pstore: Introduce new argument 'compressed' in the read callback
  pstore: Add compression support to pstore
  pstore/Kconfig: Select ZLIB_DEFLATE and ZLIB_INFLATE when PSTORE is selected
  pstore: Add new argument 'compressed' in pstore write callback
  powerpc/pseries: Remove (de)compression in nvram with pstore enabled
  pstore: d_alloc_name() doesn't return an ERR_PTR
  acpi/apei/erst: Add missing iounmap() on error in erst_exec_move_data()
</content>
</entry>
<entry>
<title>Merge tag 'driver-core-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core</title>
<updated>2013-09-03T18:37:15Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-09-03T18:37:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=542a086ac72fb193cbc1b996963a572269e57743'/>
<id>urn:sha1:542a086ac72fb193cbc1b996963a572269e57743</id>
<content type='text'>
Pull driver core patches from Greg KH:
 "Here's the big driver core pull request for 3.12-rc1.

  Lots of tiny changes here fixing up the way sysfs attributes are
  created, to try to make drivers simpler, and fix a whole class race
  conditions with creations of device attributes after the device was
  announced to userspace.

  All the various pieces are acked by the different subsystem
  maintainers"

* tag 'driver-core-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (119 commits)
  firmware loader: fix pending_fw_head list corruption
  drivers/base/memory.c: introduce help macro to_memory_block
  dynamic debug: line queries failing due to uninitialized local variable
  sysfs: sysfs_create_groups returns a value.
  debugfs: provide debugfs_create_x64() when disabled
  rbd: convert bus code to use bus_groups
  firmware: dcdbas: use binary attribute groups
  sysfs: add sysfs_create/remove_groups for when SYSFS is not enabled
  driver core: add #include &lt;linux/sysfs.h&gt; to core files.
  HID: convert bus code to use dev_groups
  Input: serio: convert bus code to use drv_groups
  Input: gameport: convert bus code to use drv_groups
  driver core: firmware: use __ATTR_RW()
  driver core: core: use DEVICE_ATTR_RO
  driver core: bus: use DRIVER_ATTR_WO()
  driver core: create write-only attribute macros for devices and drivers
  sysfs: create __ATTR_WO()
  driver-core: platform: convert bus code to use dev_groups
  workqueue: convert bus code to use dev_groups
  MEI: convert bus code to use dev_groups
  ...
</content>
</entry>
<entry>
<title>firmware: dcdbas: use binary attribute groups</title>
<updated>2013-08-28T05:07:49Z</updated>
<author>
<name>Greg KH</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-08-21T00:17:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4c33dea7816a115a9bbcd7d9001674c7c3ba71ea'/>
<id>urn:sha1:4c33dea7816a115a9bbcd7d9001674c7c3ba71ea</id>
<content type='text'>
The dcdbas code was "hand rolling" a binary attribute group, which the
driver core now supports automatically.  So remove the "create the files
by hand" logic, and just set the proper field in the attribute group
structure, saving lots of code and headache.

Cc: Doug Warzecha &lt;Douglas_Warzecha@dell.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

--

 Doug, I can take this through my driver-core tree if you don't object.

 drivers/firmware/dcdbas.c |   19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)
</content>
</entry>
</feed>
