<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git, branch v3.10.104</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.10.104</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.10.104'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2016-10-21T10:13:35+00:00</updated>
<entry>
<title>Linux 3.10.104</title>
<updated>2016-10-21T10:13:35+00:00</updated>
<author>
<name>Willy Tarreau</name>
<email>w@1wt.eu</email>
</author>
<published>2016-10-21T10:13:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7828a9658951301a3fd83daa4ed0a607d370399e'/>
<id>urn:sha1:7828a9658951301a3fd83daa4ed0a607d370399e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mm: remove gup_flags FOLL_WRITE games from __get_user_pages()</title>
<updated>2016-10-19T22:46:32+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-10-13T20:07:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9691eac5593ff1e2f82391ad327f21d90322aec1'/>
<id>urn:sha1:9691eac5593ff1e2f82391ad327f21d90322aec1</id>
<content type='text'>
commit 19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619 upstream.

This is an ancient bug that was actually attempted to be fixed once
(badly) by me eleven years ago in commit 4ceb5db9757a ("Fix
get_user_pages() race for write access") but that was then undone due to
problems on s390 by commit f33ea7f404e5 ("fix get_user_pages bug").

In the meantime, the s390 situation has long been fixed, and we can now
fix it by checking the pte_dirty() bit properly (and do it better).  The
s390 dirty bit was implemented in abf09bed3cce ("s390/mm: implement
software dirty bits") which made it into v3.9.  Earlier kernels will
have to look at the page state itself.

Also, the VM has become more scalable, and what used a purely
theoretical race back then has become easier to trigger.

To fix it, we introduce a new internal FOLL_COW flag to mark the "yes,
we already did a COW" rather than play racy games with FOLL_WRITE that
is very fundamental, and then use the pte dirty flag to validate that
the FOLL_COW flag is still valid.

Reported-and-tested-by: Phil "not Paul" Oester &lt;kernel@linuxace.com&gt;
Acked-by: Hugh Dickins &lt;hughd@google.com&gt;
Reviewed-by: Michal Hocko &lt;mhocko@suse.com&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Cc: Nick Piggin &lt;npiggin@gmail.com&gt;
Cc: Greg Thelen &lt;gthelen@google.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
[wt: s/gup.c/memory.c; s/follow_page_pte/follow_page_mask;
     s/faultin_page/__get_user_page]
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>xen-netback: ref count shared rings</title>
<updated>2016-10-19T22:46:31+00:00</updated>
<author>
<name>Wei Liu</name>
<email>wei.liu2@citrix.com</email>
</author>
<published>2014-07-11T16:37:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4cebb475eb0f713547dcbdd8c11be535930b1660'/>
<id>urn:sha1:4cebb475eb0f713547dcbdd8c11be535930b1660</id>
<content type='text'>
... so that we can make sure the rings are not freed until all SKBs in
internal queues are consumed.

1. The VM is receiving packets through bonding + bridge + netback +
   netfront.
2. For some unknown reason at least one packet remains in the rx queue
   and is not delivered to the domU immediately by netback.
3. The VM finishes shutting down.
4. The shared ring between dom0 and domU is freed.
5. then xen-netback continues processing the pending requests and tries
   to put the packet into the now already released shared ring.

&gt; XXXlan0: port 9(vif26.0) entered disabled state
&gt; BUG: unable to handle kernel paging request at ffffc900108641d8
&gt; IP: [&lt;ffffffffa04147dc&gt;] xen_netbk_rx_action+0x18b/0x6f0 [xen_netback]
&gt; PGD 57e20067 PUD 57e21067 PMD 571a7067 PTE 0
&gt; Oops: 0000 [#1] SMP
&gt; ...
&gt; CPU: 0 PID: 12587 Comm: netback/0 Not tainted 3.10.0-ucs58-amd64 #1 Debian 3.10.11-1.58.201405060908
&gt; Hardware name: FUJITSU PRIMERGY BX620 S6/D3051, BIOS 080015 Rev.3C78.3051 07/22/2011
&gt; task: ffff880004b067c0 ti: ffff8800561ec000 task.ti: ffff8800561ec000
&gt; RIP: e030:[&lt;ffffffffa04147dc&gt;]  [&lt;ffffffffa04147dc&gt;] xen_netbk_rx_action+0x18b/0x6f0 [xen_netback]
&gt; RSP: e02b:ffff8800561edce8  EFLAGS: 00010202
&gt; RAX: ffffc900104adac0 RBX: ffff8800541e95c0 RCX: ffffc90010864000
&gt; RDX: 000000000000003b RSI: 0000000000000000 RDI: ffff880040014380
&gt; RBP: ffff8800570e6800 R08: 0000000000000000 R09: ffff880004799800
&gt; R10: ffffffff813ca115 R11: ffff88005e4fdb08 R12: ffff880054e6f800
&gt; R13: ffff8800561edd58 R14: ffffc900104a1000 R15: 0000000000000000
&gt; FS:  00007f19a54a8700(0000) GS:ffff88005da00000(0000) knlGS:0000000000000000
&gt; CS:  e033 DS: 0000 ES: 0000 CR0: 000000008005003b
&gt; CR2: ffffc900108641d8 CR3: 0000000054cb3000 CR4: 0000000000002660
&gt; DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
&gt; DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
&gt; Stack:
&gt;  ffff880004b06ba0 0000000000000000 ffff88005da13ec0 ffff88005da13ec0
&gt;  0000000004b067c0 ffffc900104a8ac0 ffffc900104a1020 000000005da13ec0
&gt;  0000000000000000 0000000000000001 ffffc900104a8ac0 ffffc900104adac0
&gt; Call Trace:
&gt;  [&lt;ffffffff813ca32d&gt;] ? _raw_spin_lock_irqsave+0x11/0x2f
&gt;  [&lt;ffffffffa0416033&gt;] ? xen_netbk_kthread+0x174/0x841 [xen_netback]
&gt;  [&lt;ffffffff8105d373&gt;] ? wake_up_bit+0x20/0x20
&gt;  [&lt;ffffffffa0415ebf&gt;] ? xen_netbk_tx_build_gops+0xce8/0xce8 [xen_netback]
&gt;  [&lt;ffffffff8105cd73&gt;] ? kthread_freezable_should_stop+0x56/0x56
&gt;  [&lt;ffffffffa0415ebf&gt;] ? xen_netbk_tx_build_gops+0xce8/0xce8 [xen_netback]
&gt;  [&lt;ffffffff8105ce1e&gt;] ? kthread+0xab/0xb3
&gt;  [&lt;ffffffff81003638&gt;] ? xen_end_context_switch+0xe/0x1c
&gt;  [&lt;ffffffff8105cd73&gt;] ? kthread_freezable_should_stop+0x56/0x56
&gt;  [&lt;ffffffff813cfbfc&gt;] ? ret_from_fork+0x7c/0xb0
&gt;  [&lt;ffffffff8105cd73&gt;] ? kthread_freezable_should_stop+0x56/0x56
&gt; Code: 8b b3 d0 00 00 00 48 8b bb d8 00 00 00 0f b7 74 37 02 89 70 08 eb 07 c7 40 08 00 00 00 00 89 d2 c7 40 04 00 00 00 00 48 83 c2 08 &lt;0f&gt; b7 34 d1 89 30 c7 44 24 60 00 00 00 00 8b 44 d1 04 89 44 24
&gt; RIP  [&lt;ffffffffa04147dc&gt;] xen_netbk_rx_action+0x18b/0x6f0 [xen_netback]
&gt;  RSP &lt;ffff8800561edce8&gt;
&gt; CR2: ffffc900108641d8

Track the shared ring buffer being unmapped and drop those packets.

Ref-count the rings as followed:
  map         -&gt; set to 1
   start_xmit -&gt; inc when queueing SKB to internal queue
   rx_action  -&gt; dec after finishing processing a SKB
  unmap       -&gt; dec and wait to be 0

Note that this is different from ref counting the vif structure itself.
Currently only guest Rx path is taken care of because that's where the
bug surfaced.

This bug doesn't exist in kernel &gt;=3.12 as multi-queue support was added
there.

Link: &lt;https://lists.xenproject.org/archives/html/xen-devel/2014-06/msg00818.html&gt;
Signed-off-by: Wei Liu &lt;wei.liu2@citrix.com&gt;
Signed-off-by: Philipp Hahn &lt;hahn@univention.de&gt;
Cc: David Vrabel &lt;david.vrabel@citrix.com&gt;
Tested-by: Philipp Hahn &lt;hahn@univention.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>security: let security modules use PTRACE_MODE_* with bitmasks</title>
<updated>2016-10-19T22:46:31+00:00</updated>
<author>
<name>Jann Horn</name>
<email>jann@thejh.net</email>
</author>
<published>2016-01-20T23:00:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=72f0c1143c836de1af5edae0aba1d2db80f9ccd0'/>
<id>urn:sha1:72f0c1143c836de1af5edae0aba1d2db80f9ccd0</id>
<content type='text'>
commit 3dfb7d8cdbc7ea0c2970450e60818bb3eefbad69 upstream.

It looks like smack and yama weren't aware that the ptrace mode
can have flags ORed into it - PTRACE_MODE_NOAUDIT until now, but
only for /proc/$pid/stat, and with the PTRACE_MODE_*CREDS patch,
all modes have flags ORed into them.

Signed-off-by: Jann Horn &lt;jann@thejh.net&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: James Morris &lt;james.l.morris@oracle.com&gt;
Cc: "Serge E. Hallyn" &lt;serge.hallyn@ubuntu.com&gt;
Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
[wt: no smk_ptrace_mode() in 3.10]
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>MIPS: KVM: Check for pfn noslot case</title>
<updated>2016-10-19T22:46:31+00:00</updated>
<author>
<name>James Hogan</name>
<email>james.hogan@imgtec.com</email>
</author>
<published>2016-09-15T21:51:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fea24c07f635457eaa7b8422b5300e7b49e57a2b'/>
<id>urn:sha1:fea24c07f635457eaa7b8422b5300e7b49e57a2b</id>
<content type='text'>
commit ba913e4f72fc9cfd03dad968dfb110eb49211d80 upstream.

When mapping a page into the guest we error check using is_error_pfn(),
however this doesn't detect a value of KVM_PFN_NOSLOT, indicating an
error HVA for the page. This can only happen on MIPS right now due to
unusual memslot management (e.g. being moved / removed / resized), or
with an Enhanced Virtual Memory (EVA) configuration where the default
KVM_HVA_ERR_* and kvm_is_error_hva() definitions are unsuitable (fixed
in a later patch). This case will be treated as a pfn of zero, mapping
the first page of physical memory into the guest.

It would appear the MIPS KVM port wasn't updated prior to being merged
(in v3.10) to take commit 81c52c56e2b4 ("KVM: do not treat noslot pfn as
a error pfn") into account (merged v3.8), which converted a bunch of
is_error_pfn() calls to is_error_noslot_pfn(). Switch to using
is_error_noslot_pfn() instead to catch this case properly.

Fixes: 858dd5d45733 ("KVM/MIPS32: MMU/TLB operations for the Guest.")
Signed-off-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: "Radim KrÄmÃ¡Å" &lt;rkrcmar@redhat.com&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
[james.hogan@imgtec.com: Backport to v3.16.y]
Signed-off-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>mm: thp: fix SMP race condition between THP page fault and MADV_DONTNEED</title>
<updated>2016-10-19T22:46:31+00:00</updated>
<author>
<name>Andrea Arcangeli</name>
<email>aarcange@redhat.com</email>
</author>
<published>2016-02-26T23:19:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=afac3781d218861569ff1b4ced4f8a29be997ed4'/>
<id>urn:sha1:afac3781d218861569ff1b4ced4f8a29be997ed4</id>
<content type='text'>
commit ad33bb04b2a6cee6c1f99fabb15cddbf93ff0433 upstream.

pmd_trans_unstable()/pmd_none_or_trans_huge_or_clear_bad() were
introduced to locklessy (but atomically) detect when a pmd is a regular
(stable) pmd or when the pmd is unstable and can infinitely transition
from pmd_none() and pmd_trans_huge() from under us, while only holding
the mmap_sem for reading (for writing not).

While holding the mmap_sem only for reading, MADV_DONTNEED can run from
under us and so before we can assume the pmd to be a regular stable pmd
we need to compare it against pmd_none() and pmd_trans_huge() in an
atomic way, with pmd_trans_unstable().  The old pmd_trans_huge() left a
tiny window for a race.

Useful applications are unlikely to notice the difference as doing
MADV_DONTNEED concurrently with a page fault would lead to undefined
behavior.

[js] 3.12 backport: no pmd_devmap in 3.12 yet.

[akpm@linux-foundation.org: tidy up comment grammar/layout]
Signed-off-by: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Reported-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>ACPI / sysfs: fix error code in get_status()</title>
<updated>2016-10-19T22:46:31+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2016-05-05T13:23:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=40772621b96c5c05e3cb28d60f43bd77f963cabd'/>
<id>urn:sha1:40772621b96c5c05e3cb28d60f43bd77f963cabd</id>
<content type='text'>
commit f18ebc211e259d4f591e39e74b2aa2de226c9a1d upstream.

The problem with ornamental, do-nothing gotos is that they lead to
"forgot to set the error code" bugs.  We should be returning -EINVAL
here but we don't.  It leads to an uninitalized variable in
counter_show():

    drivers/acpi/sysfs.c:603 counter_show()
    error: uninitialized symbol 'status'.

Fixes: 1c8fce27e275 (ACPI: introduce drivers/acpi/sysfs.c)
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>staging: comedi: daqboard2000: bug fix board type matching code</title>
<updated>2016-10-19T22:46:31+00:00</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2016-06-29T19:27:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=479c12a03b99cab376b02b28aab81ea450f2137a'/>
<id>urn:sha1:479c12a03b99cab376b02b28aab81ea450f2137a</id>
<content type='text'>
commit 80e162ee9b31d77d851b10f8c5299132be1e120f upstream.

`daqboard2000_find_boardinfo()` is supposed to check if the
DaqBoard/2000 series model is supported, based on the PCI subvendor and
subdevice ID.  The current code is wrong as it is comparing the PCI
device's subdevice ID to an expected, fixed value for the subvendor ID.
It should be comparing the PCI device's subvendor ID to this fixed
value.  Correct it.

Fixes: 7e8401b23e7f ("staging: comedi: daqboard2000: add back
subsystem_device check")
Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 3.7+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>crypto: nx - off by one bug in nx_of_update_msc()</title>
<updated>2016-10-19T22:46:31+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2016-07-15T11:09:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c0a803c102d6d82f08ccfa2c2c526da7f0cfb0f0'/>
<id>urn:sha1:c0a803c102d6d82f08ccfa2c2c526da7f0cfb0f0</id>
<content type='text'>
commit e514cc0a492a3f39ef71b31590a7ef67537ee04b upstream.

The props-&gt;ap[] array is defined like this:

	struct alg_props ap[NX_MAX_FC][NX_MAX_MODE][3];

So we can see that if msc-&gt;fc and msc-&gt;mode are == to NX_MAX_FC or
NX_MAX_MODE then we're off by one.

Fixes: ae0222b7289d ('powerpc/crypto: nx driver code supporting nx encryption')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>megaraid_sas: Fix probing cards without io port</title>
<updated>2016-10-19T22:46:31+00:00</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2016-08-06T06:37:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=40605334e4a94d005e78684beed7f38fe7e23729'/>
<id>urn:sha1:40605334e4a94d005e78684beed7f38fe7e23729</id>
<content type='text'>
commit e7f851684efb3377e9c93aca7fae6e76212e5680 upstream.

Found one megaraid_sas HBA probe fails,

[  187.235190] scsi host2: Avago SAS based MegaRAID driver
[  191.112365] megaraid_sas 0000:89:00.0: BAR 0: can't reserve [io  0x0000-0x00ff]
[  191.120548] megaraid_sas 0000:89:00.0: IO memory region busy!

and the card has resource like,
[  125.097714] pci 0000:89:00.0: [1000:005d] type 00 class 0x010400
[  125.104446] pci 0000:89:00.0: reg 0x10: [io  0x0000-0x00ff]
[  125.110686] pci 0000:89:00.0: reg 0x14: [mem 0xce400000-0xce40ffff 64bit]
[  125.118286] pci 0000:89:00.0: reg 0x1c: [mem 0xce300000-0xce3fffff 64bit]
[  125.125891] pci 0000:89:00.0: reg 0x30: [mem 0xce200000-0xce2fffff pref]

that does not io port resource allocated from BIOS, and kernel can not
assign one as io port shortage.

The driver is only looking for MEM, and should not fail.

It turns out megasas_init_fw() etc are using bar index as mask.  index 1
is used as mask 1, so that pci_request_selected_regions() is trying to
request BAR0 instead of BAR1.

Fix all related reference.

Fixes: b6d5d8808b4c ("megaraid_sas: Use lowest memory bar for SR-IOV VF support")
Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Acked-by: Kashyap Desai &lt;kashyap.desai@broadcom.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
</feed>
