<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/include, branch v3.17.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>ima: pass 'opened' flag to identify newly created files</title>
<updated>2014-10-30T16:43:16+00:00</updated>
<author>
<name>Dmitry Kasatkin</name>
<email>d.kasatkin@samsung.com</email>
</author>
<published>2014-06-27T15:15:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8006fece344df5eb1d82593402a6cdcf5dce71b3'/>
<id>8006fece344df5eb1d82593402a6cdcf5dce71b3</id>
<content type='text'>
commit 3034a146820c26fe6da66a45f6340fe87fe0983a upstream.

Empty files and missing xattrs do not guarantee that a file was
just created.  This patch passes FILE_CREATED flag to IMA to
reliably identify new files.

Signed-off-by: Dmitry Kasatkin &lt;d.kasatkin@samsung.com&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3034a146820c26fe6da66a45f6340fe87fe0983a upstream.

Empty files and missing xattrs do not guarantee that a file was
just created.  This patch passes FILE_CREATED flag to IMA to
reliably identify new files.

Signed-off-by: Dmitry Kasatkin &lt;d.kasatkin@samsung.com&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>mm/balloon_compaction: redesign ballooned pages management</title>
<updated>2014-10-30T16:43:15+00:00</updated>
<author>
<name>Konstantin Khlebnikov</name>
<email>k.khlebnikov@samsung.com</email>
</author>
<published>2014-10-09T22:29:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9edb0e6bb52f12ac2c7458070f280d35cf554396'/>
<id>9edb0e6bb52f12ac2c7458070f280d35cf554396</id>
<content type='text'>
commit d6d86c0a7f8ddc5b38cf089222cb1d9540762dc2 upstream.

Sasha Levin reported KASAN splash inside isolate_migratepages_range().
Problem is in the function __is_movable_balloon_page() which tests
AS_BALLOON_MAP in page-&gt;mapping-&gt;flags.  This function has no protection
against anonymous pages.  As result it tried to check address space flags
inside struct anon_vma.

Further investigation shows more problems in current implementation:

* Special branch in __unmap_and_move() never works:
  balloon_page_movable() checks page flags and page_count.  In
  __unmap_and_move() page is locked, reference counter is elevated, thus
  balloon_page_movable() always fails.  As a result execution goes to the
  normal migration path.  virtballoon_migratepage() returns
  MIGRATEPAGE_BALLOON_SUCCESS instead of MIGRATEPAGE_SUCCESS,
  move_to_new_page() thinks this is an error code and assigns
  newpage-&gt;mapping to NULL.  Newly migrated page lose connectivity with
  balloon an all ability for further migration.

* lru_lock erroneously required in isolate_migratepages_range() for
  isolation ballooned page.  This function releases lru_lock periodically,
  this makes migration mostly impossible for some pages.

* balloon_page_dequeue have a tight race with balloon_page_isolate:
  balloon_page_isolate could be executed in parallel with dequeue between
  picking page from list and locking page_lock.  Race is rare because they
  use trylock_page() for locking.

This patch fixes all of them.

Instead of fake mapping with special flag this patch uses special state of
page-&gt;_mapcount: PAGE_BALLOON_MAPCOUNT_VALUE = -256.  Buddy allocator uses
PAGE_BUDDY_MAPCOUNT_VALUE = -128 for similar purpose.  Storing mark
directly in struct page makes everything safer and easier.

PagePrivate is used to mark pages present in page list (i.e.  not
isolated, like PageLRU for normal pages).  It replaces special rules for
reference counter and makes balloon migration similar to migration of
normal pages.  This flag is protected by page_lock together with link to
the balloon device.

Signed-off-by: Konstantin Khlebnikov &lt;k.khlebnikov@samsung.com&gt;
Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Link: http://lkml.kernel.org/p/53E6CEAA.9020105@oracle.com
Cc: Rafael Aquini &lt;aquini@redhat.com&gt;
Cc: Andrey Ryabinin &lt;ryabinin.a.a@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit d6d86c0a7f8ddc5b38cf089222cb1d9540762dc2 upstream.

Sasha Levin reported KASAN splash inside isolate_migratepages_range().
Problem is in the function __is_movable_balloon_page() which tests
AS_BALLOON_MAP in page-&gt;mapping-&gt;flags.  This function has no protection
against anonymous pages.  As result it tried to check address space flags
inside struct anon_vma.

Further investigation shows more problems in current implementation:

* Special branch in __unmap_and_move() never works:
  balloon_page_movable() checks page flags and page_count.  In
  __unmap_and_move() page is locked, reference counter is elevated, thus
  balloon_page_movable() always fails.  As a result execution goes to the
  normal migration path.  virtballoon_migratepage() returns
  MIGRATEPAGE_BALLOON_SUCCESS instead of MIGRATEPAGE_SUCCESS,
  move_to_new_page() thinks this is an error code and assigns
  newpage-&gt;mapping to NULL.  Newly migrated page lose connectivity with
  balloon an all ability for further migration.

* lru_lock erroneously required in isolate_migratepages_range() for
  isolation ballooned page.  This function releases lru_lock periodically,
  this makes migration mostly impossible for some pages.

* balloon_page_dequeue have a tight race with balloon_page_isolate:
  balloon_page_isolate could be executed in parallel with dequeue between
  picking page from list and locking page_lock.  Race is rare because they
  use trylock_page() for locking.

This patch fixes all of them.

Instead of fake mapping with special flag this patch uses special state of
page-&gt;_mapcount: PAGE_BALLOON_MAPCOUNT_VALUE = -256.  Buddy allocator uses
PAGE_BUDDY_MAPCOUNT_VALUE = -128 for similar purpose.  Storing mark
directly in struct page makes everything safer and easier.

PagePrivate is used to mark pages present in page list (i.e.  not
isolated, like PageLRU for normal pages).  It replaces special rules for
reference counter and makes balloon migration similar to migration of
normal pages.  This flag is protected by page_lock together with link to
the balloon device.

Signed-off-by: Konstantin Khlebnikov &lt;k.khlebnikov@samsung.com&gt;
Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Link: http://lkml.kernel.org/p/53E6CEAA.9020105@oracle.com
Cc: Rafael Aquini &lt;aquini@redhat.com&gt;
Cc: Andrey Ryabinin &lt;ryabinin.a.a@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: add support for gcc 5</title>
<updated>2014-10-30T16:43:15+00:00</updated>
<author>
<name>Sasha Levin</name>
<email>sasha.levin@oracle.com</email>
</author>
<published>2014-10-13T22:51:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=204530a20b4951e573d9d3952dcd405cd090092c'/>
<id>204530a20b4951e573d9d3952dcd405cd090092c</id>
<content type='text'>
commit 71458cfc782eafe4b27656e078d379a34e472adf upstream.

We're missing include/linux/compiler-gcc5.h which is required now
because gcc branched off to v5 in trunk.

Just copy the relevant bits out of include/linux/compiler-gcc4.h,
no new code is added as of now.

This fixes a build error when using gcc 5.

Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 71458cfc782eafe4b27656e078d379a34e472adf upstream.

We're missing include/linux/compiler-gcc5.h which is required now
because gcc branched off to v5 in trunk.

Just copy the relevant bits out of include/linux/compiler-gcc4.h,
no new code is added as of now.

This fixes a build error when using gcc 5.

Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>mm: clear __GFP_FS when PF_MEMALLOC_NOIO is set</title>
<updated>2014-10-30T16:43:14+00:00</updated>
<author>
<name>Junxiao Bi</name>
<email>junxiao.bi@oracle.com</email>
</author>
<published>2014-10-09T22:28:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ba572a5ae63d8b8c9e5511951eb0061f55372f7b'/>
<id>ba572a5ae63d8b8c9e5511951eb0061f55372f7b</id>
<content type='text'>
commit 934f3072c17cc8886f4c043b47eeeb1b12f8de33 upstream.

commit 21caf2fc1931 ("mm: teach mm by current context info to not do I/O
during memory allocation") introduces PF_MEMALLOC_NOIO flag to avoid doing
I/O inside memory allocation, __GFP_IO is cleared when this flag is set,
but __GFP_FS implies __GFP_IO, it should also be cleared.  Or it may still
run into I/O, like in superblock shrinker.  And this will make the kernel
run into the deadlock case described in that commit.

See Dave Chinner's comment about io in superblock shrinker:

Filesystem shrinkers do indeed perform IO from the superblock shrinker and
have for years.  Even clean inodes can require IO before they can be freed
- e.g.  on an orphan list, need truncation of post-eof blocks, need to
wait for ordered operations to complete before it can be freed, etc.

IOWs, Ext4, btrfs and XFS all can issue and/or block on arbitrary amounts
of IO in the superblock shrinker context.  XFS, in particular, has been
doing transactions and IO from the VFS inode cache shrinker since it was
first introduced....

Fix this by clearing __GFP_FS in memalloc_noio_flags(), this function has
masked all the gfp_mask that will be passed into fs for the processes
setting PF_MEMALLOC_NOIO in the direct reclaim path.

v1 thread at: https://lkml.org/lkml/2014/9/3/32

Signed-off-by: Junxiao Bi &lt;junxiao.bi@oracle.com&gt;
Cc: Dave Chinner &lt;david@fromorbit.com&gt;
Cc: joyce.xue &lt;xuejiufei@huawei.com&gt;
Cc: Ming Lei &lt;ming.lei@canonical.com&gt;
Cc: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 934f3072c17cc8886f4c043b47eeeb1b12f8de33 upstream.

commit 21caf2fc1931 ("mm: teach mm by current context info to not do I/O
during memory allocation") introduces PF_MEMALLOC_NOIO flag to avoid doing
I/O inside memory allocation, __GFP_IO is cleared when this flag is set,
but __GFP_FS implies __GFP_IO, it should also be cleared.  Or it may still
run into I/O, like in superblock shrinker.  And this will make the kernel
run into the deadlock case described in that commit.

See Dave Chinner's comment about io in superblock shrinker:

Filesystem shrinkers do indeed perform IO from the superblock shrinker and
have for years.  Even clean inodes can require IO before they can be freed
- e.g.  on an orphan list, need truncation of post-eof blocks, need to
wait for ordered operations to complete before it can be freed, etc.

IOWs, Ext4, btrfs and XFS all can issue and/or block on arbitrary amounts
of IO in the superblock shrinker context.  XFS, in particular, has been
doing transactions and IO from the VFS inode cache shrinker since it was
first introduced....

Fix this by clearing __GFP_FS in memalloc_noio_flags(), this function has
masked all the gfp_mask that will be passed into fs for the processes
setting PF_MEMALLOC_NOIO in the direct reclaim path.

v1 thread at: https://lkml.org/lkml/2014/9/3/32

Signed-off-by: Junxiao Bi &lt;junxiao.bi@oracle.com&gt;
Cc: Dave Chinner &lt;david@fromorbit.com&gt;
Cc: joyce.xue &lt;xuejiufei@huawei.com&gt;
Cc: Ming Lei &lt;ming.lei@canonical.com&gt;
Cc: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Drivers: hv: util: Properly pack the data for file copy functionality</title>
<updated>2014-10-30T16:43:08+00:00</updated>
<author>
<name>K. Y. Srinivasan</name>
<email>kys@microsoft.com</email>
</author>
<published>2014-09-03T02:21:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6d9ac4d681bc52c2c600292654f976cbb48a0a39'/>
<id>6d9ac4d681bc52c2c600292654f976cbb48a0a39</id>
<content type='text'>
commit bc5a5b02331a3175a5fca20a4beba249e573b672 upstream.

Properly pack the data for file copy functionality. Patch based on
investigation done by Matej Muzila &lt;mmuzila@redhat.com&gt;

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Reported-by: &lt;qge@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit bc5a5b02331a3175a5fca20a4beba249e573b672 upstream.

Properly pack the data for file copy functionality. Patch based on
investigation done by Matej Muzila &lt;mmuzila@redhat.com&gt;

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Reported-by: &lt;qge@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>pci_ids: Add support for Intel Quark ILB</title>
<updated>2014-10-30T16:43:06+00:00</updated>
<author>
<name>Josef Ahmad</name>
<email>josef.ahmad@intel.com</email>
</author>
<published>2014-09-02T10:45:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ce74113f402d5354f9bd07262fb0533e05509724'/>
<id>ce74113f402d5354f9bd07262fb0533e05509724</id>
<content type='text'>
commit bb048713bba3ead39f6112910906d9fe3f88ede7 upstream.

This patch adds the PCI id for Intel Quark ILB.
It will be used for GPIO and Multifunction device driver.

Signed-off-by: Josef Ahmad &lt;josef.ahmad@intel.com&gt;
Acked-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Chang Rebecca Swee Fun &lt;rebecca.swee.fun.chang@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit bb048713bba3ead39f6112910906d9fe3f88ede7 upstream.

This patch adds the PCI id for Intel Quark ILB.
It will be used for GPIO and Multifunction device driver.

Signed-off-by: Josef Ahmad &lt;josef.ahmad@intel.com&gt;
Acked-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Chang Rebecca Swee Fun &lt;rebecca.swee.fun.chang@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>USB: Add device quirk for ASUS T100 Base Station keyboard</title>
<updated>2014-10-15T10:29:24+00:00</updated>
<author>
<name>Lu Baolu</name>
<email>baolu.lu@linux.intel.com</email>
</author>
<published>2014-09-19T02:13:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3cd99033c7ffd72c18a29ae4abefb80bfa89c3a4'/>
<id>3cd99033c7ffd72c18a29ae4abefb80bfa89c3a4</id>
<content type='text'>
commit ddbe1fca0bcb87ca8c199ea873a456ca8a948567 upstream.

This full-speed USB device generates spurious remote wakeup event
as soon as USB_DEVICE_REMOTE_WAKEUP feature is set. As the result,
Linux can't enter system suspend and S0ix power saving modes once
this keyboard is used.

This patch tries to introduce USB_QUIRK_IGNORE_REMOTE_WAKEUP quirk.
With this quirk set, wakeup capability will be ignored during
device configure.

This patch could be back-ported to kernels as old as 2.6.39.

Signed-off-by: Lu Baolu &lt;baolu.lu@linux.intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ddbe1fca0bcb87ca8c199ea873a456ca8a948567 upstream.

This full-speed USB device generates spurious remote wakeup event
as soon as USB_DEVICE_REMOTE_WAKEUP feature is set. As the result,
Linux can't enter system suspend and S0ix power saving modes once
this keyboard is used.

This patch tries to introduce USB_QUIRK_IGNORE_REMOTE_WAKEUP quirk.
With this quirk set, wakeup capability will be ignored during
device configure.

This patch could be back-ported to kernels as old as 2.6.39.

Signed-off-by: Lu Baolu &lt;baolu.lu@linux.intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>uas: Add no-report-opcodes quirk</title>
<updated>2014-10-15T10:29:24+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2014-09-16T16:36:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c0f5e44c171ed08de0929f83ff6f8faf912bb109'/>
<id>c0f5e44c171ed08de0929f83ff6f8faf912bb109</id>
<content type='text'>
commit 734016b00b50a3c6a0e1fc1b7b217e783f5123a1 upstream.

Besides the ASM1051 (*) needing sdev-&gt;no_report_opcodes = 1, it turns out that
the JMicron JMS567 also needs it to work properly with uas (usb-storage always
sets it). Since some of the scsi devs were not to keen on the idea to
outrightly set sdev-&gt;no_report_opcodes = 1 for all uas devices, so add a quirk
for this, and set it for the JMS567.

*) Which has become a non-issue since we've completely blacklisted uas on
the ASM1051 for other reasons

Reported-and-tested-by: Claudio Bizzarri &lt;claudio.bizzarri@gmail.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 734016b00b50a3c6a0e1fc1b7b217e783f5123a1 upstream.

Besides the ASM1051 (*) needing sdev-&gt;no_report_opcodes = 1, it turns out that
the JMicron JMS567 also needs it to work properly with uas (usb-storage always
sets it). Since some of the scsi devs were not to keen on the idea to
outrightly set sdev-&gt;no_report_opcodes = 1 for all uas devices, so add a quirk
for this, and set it for the JMS567.

*) Which has become a non-issue since we've completely blacklisted uas on
the ASM1051 for other reasons

Reported-and-tested-by: Claudio Bizzarri &lt;claudio.bizzarri@gmail.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>uas: Add a quirk for rejecting ATA_12 and ATA_16 commands</title>
<updated>2014-10-15T10:29:23+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2014-09-15T14:04:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c36cac9f20886a5a60d4f9388f6faef547d78d61'/>
<id>c36cac9f20886a5a60d4f9388f6faef547d78d61</id>
<content type='text'>
commit 593078525c8b234a35a36ff551b8716464e86481 upstream.

And set this quirk for the Seagate Expansion Desk (0bc2:2312), as that one
seems to hang upon receiving an ATA_12 or ATA_16 command.

https://bugzilla.kernel.org/show_bug.cgi?id=79511
https://bbs.archlinux.org/viewtopic.php?id=183190

While at it also add missing documentation for the u value for usb-storage
quirks.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 593078525c8b234a35a36ff551b8716464e86481 upstream.

And set this quirk for the Seagate Expansion Desk (0bc2:2312), as that one
seems to hang upon receiving an ATA_12 or ATA_16 command.

https://bugzilla.kernel.org/show_bug.cgi?id=79511
https://bbs.archlinux.org/viewtopic.php?id=183190

While at it also add missing documentation for the u value for usb-storage
quirks.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>irq_work: Force raised irq work to run on irq work interrupt</title>
<updated>2014-10-15T10:29:23+00:00</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2014-08-16T16:37:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6fd5de08a5337d0d601f6361671813df4f013da9'/>
<id>6fd5de08a5337d0d601f6361671813df4f013da9</id>
<content type='text'>
commit 76a33061b9323b7fdb220ae5fa116c10833ec22e upstream.

The nohz full kick, which restarts the tick when any resource depend
on it, can't be executed anywhere given the operation it does on timers.
If it is called from the scheduler or timers code, chances are that
we run into a deadlock.

This is why we run the nohz full kick from an irq work. That way we make
sure that the kick runs on a virgin context.

However if that's the case when irq work runs in its own dedicated
self-ipi, things are different for the big bunch of archs that don't
support the self triggered way. In order to support them, irq works are
also handled by the timer interrupt as fallback.

Now when irq works run on the timer interrupt, the context isn't blank.
More precisely, they can run in the context of the hrtimer that runs the
tick. But the nohz kick cancels and restarts this hrtimer and cancelling
an hrtimer from itself isn't allowed. This is why we run in an endless
loop:

	Kernel panic - not syncing: Watchdog detected hard LOCKUP on cpu 2
	CPU: 2 PID: 7538 Comm: kworker/u8:8 Not tainted 3.16.0+ #34
	Workqueue: btrfs-endio-write normal_work_helper [btrfs]
	 ffff880244c06c88 000000001b486fe1 ffff880244c06bf0 ffffffff8a7f1e37
	 ffffffff8ac52a18 ffff880244c06c78 ffffffff8a7ef928 0000000000000010
	 ffff880244c06c88 ffff880244c06c20 000000001b486fe1 0000000000000000
	Call Trace:
	 &lt;NMI[&lt;ffffffff8a7f1e37&gt;] dump_stack+0x4e/0x7a
	 [&lt;ffffffff8a7ef928&gt;] panic+0xd4/0x207
	 [&lt;ffffffff8a1450e8&gt;] watchdog_overflow_callback+0x118/0x120
	 [&lt;ffffffff8a186b0e&gt;] __perf_event_overflow+0xae/0x350
	 [&lt;ffffffff8a184f80&gt;] ? perf_event_task_disable+0xa0/0xa0
	 [&lt;ffffffff8a01a4cf&gt;] ? x86_perf_event_set_period+0xbf/0x150
	 [&lt;ffffffff8a187934&gt;] perf_event_overflow+0x14/0x20
	 [&lt;ffffffff8a020386&gt;] intel_pmu_handle_irq+0x206/0x410
	 [&lt;ffffffff8a01937b&gt;] perf_event_nmi_handler+0x2b/0x50
	 [&lt;ffffffff8a007b72&gt;] nmi_handle+0xd2/0x390
	 [&lt;ffffffff8a007aa5&gt;] ? nmi_handle+0x5/0x390
	 [&lt;ffffffff8a0cb7f8&gt;] ? match_held_lock+0x8/0x1b0
	 [&lt;ffffffff8a008062&gt;] default_do_nmi+0x72/0x1c0
	 [&lt;ffffffff8a008268&gt;] do_nmi+0xb8/0x100
	 [&lt;ffffffff8a7ff66a&gt;] end_repeat_nmi+0x1e/0x2e
	 [&lt;ffffffff8a0cb7f8&gt;] ? match_held_lock+0x8/0x1b0
	 [&lt;ffffffff8a0cb7f8&gt;] ? match_held_lock+0x8/0x1b0
	 [&lt;ffffffff8a0cb7f8&gt;] ? match_held_lock+0x8/0x1b0
	 &lt;&lt;EOE&gt;&lt;IRQ[&lt;ffffffff8a0ccd2f&gt;] lock_acquired+0xaf/0x450
	 [&lt;ffffffff8a0f74c5&gt;] ? lock_hrtimer_base.isra.20+0x25/0x50
	 [&lt;ffffffff8a7fc678&gt;] _raw_spin_lock_irqsave+0x78/0x90
	 [&lt;ffffffff8a0f74c5&gt;] ? lock_hrtimer_base.isra.20+0x25/0x50
	 [&lt;ffffffff8a0f74c5&gt;] lock_hrtimer_base.isra.20+0x25/0x50
	 [&lt;ffffffff8a0f7723&gt;] hrtimer_try_to_cancel+0x33/0x1e0
	 [&lt;ffffffff8a0f78ea&gt;] hrtimer_cancel+0x1a/0x30
	 [&lt;ffffffff8a109237&gt;] tick_nohz_restart+0x17/0x90
	 [&lt;ffffffff8a10a213&gt;] __tick_nohz_full_check+0xc3/0x100
	 [&lt;ffffffff8a10a25e&gt;] nohz_full_kick_work_func+0xe/0x10
	 [&lt;ffffffff8a17c884&gt;] irq_work_run_list+0x44/0x70
	 [&lt;ffffffff8a17c8da&gt;] irq_work_run+0x2a/0x50
	 [&lt;ffffffff8a0f700b&gt;] update_process_times+0x5b/0x70
	 [&lt;ffffffff8a109005&gt;] tick_sched_handle.isra.21+0x25/0x60
	 [&lt;ffffffff8a109b81&gt;] tick_sched_timer+0x41/0x60
	 [&lt;ffffffff8a0f7aa2&gt;] __run_hrtimer+0x72/0x470
	 [&lt;ffffffff8a109b40&gt;] ? tick_sched_do_timer+0xb0/0xb0
	 [&lt;ffffffff8a0f8707&gt;] hrtimer_interrupt+0x117/0x270
	 [&lt;ffffffff8a034357&gt;] local_apic_timer_interrupt+0x37/0x60
	 [&lt;ffffffff8a80010f&gt;] smp_apic_timer_interrupt+0x3f/0x50
	 [&lt;ffffffff8a7fe52f&gt;] apic_timer_interrupt+0x6f/0x80

To fix this we force non-lazy irq works to run on irq work self-IPIs
when available. That ability of the arch to trigger irq work self IPIs
is available with arch_irq_work_has_interrupt().

Reported-by: Catalin Iacob &lt;iacobcatalin@gmail.com&gt;
Reported-by: Dave Jones &lt;davej@redhat.com&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 76a33061b9323b7fdb220ae5fa116c10833ec22e upstream.

The nohz full kick, which restarts the tick when any resource depend
on it, can't be executed anywhere given the operation it does on timers.
If it is called from the scheduler or timers code, chances are that
we run into a deadlock.

This is why we run the nohz full kick from an irq work. That way we make
sure that the kick runs on a virgin context.

However if that's the case when irq work runs in its own dedicated
self-ipi, things are different for the big bunch of archs that don't
support the self triggered way. In order to support them, irq works are
also handled by the timer interrupt as fallback.

Now when irq works run on the timer interrupt, the context isn't blank.
More precisely, they can run in the context of the hrtimer that runs the
tick. But the nohz kick cancels and restarts this hrtimer and cancelling
an hrtimer from itself isn't allowed. This is why we run in an endless
loop:

	Kernel panic - not syncing: Watchdog detected hard LOCKUP on cpu 2
	CPU: 2 PID: 7538 Comm: kworker/u8:8 Not tainted 3.16.0+ #34
	Workqueue: btrfs-endio-write normal_work_helper [btrfs]
	 ffff880244c06c88 000000001b486fe1 ffff880244c06bf0 ffffffff8a7f1e37
	 ffffffff8ac52a18 ffff880244c06c78 ffffffff8a7ef928 0000000000000010
	 ffff880244c06c88 ffff880244c06c20 000000001b486fe1 0000000000000000
	Call Trace:
	 &lt;NMI[&lt;ffffffff8a7f1e37&gt;] dump_stack+0x4e/0x7a
	 [&lt;ffffffff8a7ef928&gt;] panic+0xd4/0x207
	 [&lt;ffffffff8a1450e8&gt;] watchdog_overflow_callback+0x118/0x120
	 [&lt;ffffffff8a186b0e&gt;] __perf_event_overflow+0xae/0x350
	 [&lt;ffffffff8a184f80&gt;] ? perf_event_task_disable+0xa0/0xa0
	 [&lt;ffffffff8a01a4cf&gt;] ? x86_perf_event_set_period+0xbf/0x150
	 [&lt;ffffffff8a187934&gt;] perf_event_overflow+0x14/0x20
	 [&lt;ffffffff8a020386&gt;] intel_pmu_handle_irq+0x206/0x410
	 [&lt;ffffffff8a01937b&gt;] perf_event_nmi_handler+0x2b/0x50
	 [&lt;ffffffff8a007b72&gt;] nmi_handle+0xd2/0x390
	 [&lt;ffffffff8a007aa5&gt;] ? nmi_handle+0x5/0x390
	 [&lt;ffffffff8a0cb7f8&gt;] ? match_held_lock+0x8/0x1b0
	 [&lt;ffffffff8a008062&gt;] default_do_nmi+0x72/0x1c0
	 [&lt;ffffffff8a008268&gt;] do_nmi+0xb8/0x100
	 [&lt;ffffffff8a7ff66a&gt;] end_repeat_nmi+0x1e/0x2e
	 [&lt;ffffffff8a0cb7f8&gt;] ? match_held_lock+0x8/0x1b0
	 [&lt;ffffffff8a0cb7f8&gt;] ? match_held_lock+0x8/0x1b0
	 [&lt;ffffffff8a0cb7f8&gt;] ? match_held_lock+0x8/0x1b0
	 &lt;&lt;EOE&gt;&lt;IRQ[&lt;ffffffff8a0ccd2f&gt;] lock_acquired+0xaf/0x450
	 [&lt;ffffffff8a0f74c5&gt;] ? lock_hrtimer_base.isra.20+0x25/0x50
	 [&lt;ffffffff8a7fc678&gt;] _raw_spin_lock_irqsave+0x78/0x90
	 [&lt;ffffffff8a0f74c5&gt;] ? lock_hrtimer_base.isra.20+0x25/0x50
	 [&lt;ffffffff8a0f74c5&gt;] lock_hrtimer_base.isra.20+0x25/0x50
	 [&lt;ffffffff8a0f7723&gt;] hrtimer_try_to_cancel+0x33/0x1e0
	 [&lt;ffffffff8a0f78ea&gt;] hrtimer_cancel+0x1a/0x30
	 [&lt;ffffffff8a109237&gt;] tick_nohz_restart+0x17/0x90
	 [&lt;ffffffff8a10a213&gt;] __tick_nohz_full_check+0xc3/0x100
	 [&lt;ffffffff8a10a25e&gt;] nohz_full_kick_work_func+0xe/0x10
	 [&lt;ffffffff8a17c884&gt;] irq_work_run_list+0x44/0x70
	 [&lt;ffffffff8a17c8da&gt;] irq_work_run+0x2a/0x50
	 [&lt;ffffffff8a0f700b&gt;] update_process_times+0x5b/0x70
	 [&lt;ffffffff8a109005&gt;] tick_sched_handle.isra.21+0x25/0x60
	 [&lt;ffffffff8a109b81&gt;] tick_sched_timer+0x41/0x60
	 [&lt;ffffffff8a0f7aa2&gt;] __run_hrtimer+0x72/0x470
	 [&lt;ffffffff8a109b40&gt;] ? tick_sched_do_timer+0xb0/0xb0
	 [&lt;ffffffff8a0f8707&gt;] hrtimer_interrupt+0x117/0x270
	 [&lt;ffffffff8a034357&gt;] local_apic_timer_interrupt+0x37/0x60
	 [&lt;ffffffff8a80010f&gt;] smp_apic_timer_interrupt+0x3f/0x50
	 [&lt;ffffffff8a7fe52f&gt;] apic_timer_interrupt+0x6f/0x80

To fix this we force non-lazy irq works to run on irq work self-IPIs
when available. That ability of the arch to trigger irq work self IPIs
is available with arch_irq_work_has_interrupt().

Reported-by: Catalin Iacob &lt;iacobcatalin@gmail.com&gt;
Reported-by: Dave Jones &lt;davej@redhat.com&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
</feed>
