<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include, branch v3.12.49</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.12.49</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.12.49'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-09-30T08:59:50Z</updated>
<entry>
<title>iio: Add inverse unit conversion macros</title>
<updated>2015-09-30T08:59:50Z</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2015-08-05T13:38:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2e42c785118a9ab1e7fccd5b837b2220c7398ea5'/>
<id>urn:sha1:2e42c785118a9ab1e7fccd5b837b2220c7398ea5</id>
<content type='text'>
commit c689a923c867eac40ed3826c1d9328edea8b6bc7 upstream.

Add inverse unit conversion macro to convert from standard IIO units to
units that might be used by some devices.

Those are useful in combination with scale factors that are specified as
IIO_VAL_FRACTIONAL. Typically the denominator for those specifications will
contain the maximum raw value the sensor will generate and the numerator
the value it maps to in a specific unit. Sometimes datasheets specify those
in different units than the standard IIO units (e.g. degree/s instead of
rad/s) and so we need to do a unit conversion.

From a mathematical point of view it does not make a difference whether we
apply the unit conversion to the numerator or the inverse unit conversion
to the denominator since (x / y) / z = x / (y * z). But as the denominator
is typically a larger value and we are rounding both the numerator and
denominator to integer values using the later method gives us a better
precision (E.g. the relative error is smaller if we round 8000.3 to 8000
rather than rounding 8.3 to 8).

This is where in inverse unit conversion macros will be used.

Marked for stable as used by some upcoming fixes.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>PCI: Add dev_flags bit to access VPD through function 0</title>
<updated>2015-09-18T07:26:29Z</updated>
<author>
<name>Mark Rustad</name>
<email>mark.d.rustad@intel.com</email>
</author>
<published>2015-07-13T18:40:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4386f737d429451d61358f771e315ed47e2f451f'/>
<id>urn:sha1:4386f737d429451d61358f771e315ed47e2f451f</id>
<content type='text'>
commit 932c435caba8a2ce473a91753bad0173269ef334 upstream.

Add a dev_flags bit, PCI_DEV_FLAGS_VPD_REF_F0, to access VPD through
function 0 to provide VPD access on other functions.  This is for hardware
devices that provide copies of the same VPD capability registers in
multiple functions.  Because the kernel expects that each function has its
own registers, both the locking and the state tracking are affected by VPD
accesses to different functions.

On such devices for example, if a VPD write is performed on function 0,
*any* later attempt to read VPD from any other function of that device will
hang.  This has to do with how the kernel tracks the expected value of the
F bit per function.

Concurrent accesses to different functions of the same device can not only
hang but also corrupt both read and write VPD data.

When hangs occur, typically the error message:

  vpd r/w failed.  This is likely a firmware bug on this device.

will be seen.

Never set this bit on function 0 or there will be an infinite recursion.

Signed-off-by: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Alexander Duyck &lt;alexander.h.duyck@redhat.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_conntrack: don't release a conntrack with non-zero refcnt</title>
<updated>2015-09-14T14:28:42Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2015-09-11T12:26:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a7775d15b11a277f8af0dc4df69ae420b266e3dd'/>
<id>urn:sha1:a7775d15b11a277f8af0dc4df69ae420b266e3dd</id>
<content type='text'>
[ Upstream commit e53376bef2cd97d3e3f61fdc677fb8da7d03d0da ]

With this patch, the conntrack refcount is initially set to zero and
it is bumped once it is added to any of the list, so we fulfill
Eric's golden rule which is that all released objects always have a
refcount that equals zero.

Andrey Vagin reports that nf_conntrack_free can't be called for a
conntrack with non-zero ref-counter, because it can race with
nf_conntrack_find_get().

A conntrack slab is created with SLAB_DESTROY_BY_RCU. Non-zero
ref-counter says that this conntrack is used. So when we release
a conntrack with non-zero counter, we break this assumption.

CPU1                                    CPU2
____nf_conntrack_find()
                                        nf_ct_put()
                                         destroy_conntrack()
                                        ...
                                        init_conntrack
                                         __nf_conntrack_alloc (set use = 1)
atomic_inc_not_zero(&amp;ct-&gt;use) (use = 2)
                                         if (!l4proto-&gt;new(ct, skb, dataoff, timeouts))
                                          nf_conntrack_free(ct); (use = 2 !!!)
                                        ...
                                        __nf_conntrack_alloc (set use = 1)
 if (!nf_ct_key_equal(h, tuple, zone))
  nf_ct_put(ct); (use = 0)
   destroy_conntrack()
                                        /* continue to work with CT */

After applying the path "[PATCH] netfilter: nf_conntrack: fix RCU
race in nf_conntrack_find_get" another bug was triggered in
destroy_conntrack():

&lt;4&gt;[67096.759334] ------------[ cut here ]------------
&lt;2&gt;[67096.759353] kernel BUG at net/netfilter/nf_conntrack_core.c:211!
...
&lt;4&gt;[67096.759837] Pid: 498649, comm: atdd veid: 666 Tainted: G         C ---------------    2.6.32-042stab084.18 #1 042stab084_18 /DQ45CB
&lt;4&gt;[67096.759932] RIP: 0010:[&lt;ffffffffa03d99ac&gt;]  [&lt;ffffffffa03d99ac&gt;] destroy_conntrack+0x15c/0x190 [nf_conntrack]
&lt;4&gt;[67096.760255] Call Trace:
&lt;4&gt;[67096.760255]  [&lt;ffffffff814844a7&gt;] nf_conntrack_destroy+0x17/0x30
&lt;4&gt;[67096.760255]  [&lt;ffffffffa03d9bb5&gt;] nf_conntrack_find_get+0x85/0x130 [nf_conntrack]
&lt;4&gt;[67096.760255]  [&lt;ffffffffa03d9fb2&gt;] nf_conntrack_in+0x352/0xb60 [nf_conntrack]
&lt;4&gt;[67096.760255]  [&lt;ffffffffa048c771&gt;] ipv4_conntrack_local+0x51/0x60 [nf_conntrack_ipv4]
&lt;4&gt;[67096.760255]  [&lt;ffffffff81484419&gt;] nf_iterate+0x69/0xb0
&lt;4&gt;[67096.760255]  [&lt;ffffffff814b5b00&gt;] ? dst_output+0x0/0x20
&lt;4&gt;[67096.760255]  [&lt;ffffffff814845d4&gt;] nf_hook_slow+0x74/0x110
&lt;4&gt;[67096.760255]  [&lt;ffffffff814b5b00&gt;] ? dst_output+0x0/0x20
&lt;4&gt;[67096.760255]  [&lt;ffffffff814b66d5&gt;] raw_sendmsg+0x775/0x910
&lt;4&gt;[67096.760255]  [&lt;ffffffff8104c5a8&gt;] ? flush_tlb_others_ipi+0x128/0x130
&lt;4&gt;[67096.760255]  [&lt;ffffffff8100bc4e&gt;] ? apic_timer_interrupt+0xe/0x20
&lt;4&gt;[67096.760255]  [&lt;ffffffff8100bc4e&gt;] ? apic_timer_interrupt+0xe/0x20
&lt;4&gt;[67096.760255]  [&lt;ffffffff814c136a&gt;] inet_sendmsg+0x4a/0xb0
&lt;4&gt;[67096.760255]  [&lt;ffffffff81444e93&gt;] ? sock_sendmsg+0x13/0x140
&lt;4&gt;[67096.760255]  [&lt;ffffffff81444f97&gt;] sock_sendmsg+0x117/0x140
&lt;4&gt;[67096.760255]  [&lt;ffffffff8102e299&gt;] ? native_smp_send_reschedule+0x49/0x60
&lt;4&gt;[67096.760255]  [&lt;ffffffff81519beb&gt;] ? _spin_unlock_bh+0x1b/0x20
&lt;4&gt;[67096.760255]  [&lt;ffffffff8109d930&gt;] ? autoremove_wake_function+0x0/0x40
&lt;4&gt;[67096.760255]  [&lt;ffffffff814960f0&gt;] ? do_ip_setsockopt+0x90/0xd80
&lt;4&gt;[67096.760255]  [&lt;ffffffff8100bc4e&gt;] ? apic_timer_interrupt+0xe/0x20
&lt;4&gt;[67096.760255]  [&lt;ffffffff8100bc4e&gt;] ? apic_timer_interrupt+0xe/0x20
&lt;4&gt;[67096.760255]  [&lt;ffffffff814457c9&gt;] sys_sendto+0x139/0x190
&lt;4&gt;[67096.760255]  [&lt;ffffffff810efa77&gt;] ? audit_syscall_entry+0x1d7/0x200
&lt;4&gt;[67096.760255]  [&lt;ffffffff810ef7c5&gt;] ? __audit_syscall_exit+0x265/0x290
&lt;4&gt;[67096.760255]  [&lt;ffffffff81474daf&gt;] compat_sys_socketcall+0x13f/0x210
&lt;4&gt;[67096.760255]  [&lt;ffffffff8104dea3&gt;] ia32_sysret+0x0/0x5

I have reused the original title for the RFC patch that Andrey posted and
most of the original patch description.

Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Andrew Vagin &lt;avagin@parallels.com&gt;
Cc: Florian Westphal &lt;fw@strlen.de&gt;
Reported-by: Andrew Vagin &lt;avagin@parallels.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Andrew Vagin &lt;avagin@parallels.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>ipv6: lock socket in ip6_datagram_connect()</title>
<updated>2015-08-27T07:27:01Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-07-14T06:10:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b29321b96de6167daf84306903cedc5b214fe5b7'/>
<id>urn:sha1:b29321b96de6167daf84306903cedc5b214fe5b7</id>
<content type='text'>
[ Upstream commit 03645a11a570d52e70631838cb786eb4253eb463 ]

ip6_datagram_connect() is doing a lot of socket changes without
socket being locked.

This looks wrong, at least for udp_lib_rehash() which could corrupt
lists because of concurrent udp_sk(sk)-&gt;udp_portaddr_hash accesses.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>drm/radeon: add new OLAND pci id</title>
<updated>2015-08-25T14:57:10Z</updated>
<author>
<name>Alex Deucher</name>
<email>alexander.deucher@amd.com</email>
</author>
<published>2015-08-10T19:28:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f81a12e9e7909be0d6b523b80844c0c310f02dc5'/>
<id>urn:sha1:f81a12e9e7909be0d6b523b80844c0c310f02dc5</id>
<content type='text'>
commit e037239e5e7b61007763984aa35a8329596d8c88 upstream.

Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>rcu: Move lockless_dereference() out of rcupdate.h</title>
<updated>2015-08-25T14:57:00Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2015-05-27T01:39:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=554b079bb453188670a2f8bfa49192ba9b360392'/>
<id>urn:sha1:554b079bb453188670a2f8bfa49192ba9b360392</id>
<content type='text'>
commit 0a04b0166929405cd833c1cc40f99e862b965ddc upstream.

I want to use lockless_dereference() from seqlock.h, which would mean
including rcupdate.h from it, however rcupdate.h already includes
seqlock.h.

Avoid this by moving lockless_dereference() into compiler.h. This is
somewhat tricky since it uses smp_read_barrier_depends() which isn't
available there, but its a CPP macro so we can get away with it.

The alternative would be moving it into asm/barrier.h, but that would
be updating each arch (I can do if people feel that is more
appropriate).

Cc: Paul McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>rcu: Provide counterpart to rcu_dereference() for non-RCU situations</title>
<updated>2015-08-25T14:56:59Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2014-10-28T04:11:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=afadae320b2116f9a4dee89fd431f3c1ab64103e'/>
<id>urn:sha1:afadae320b2116f9a4dee89fd431f3c1ab64103e</id>
<content type='text'>
commit 54ef6df3f3f1353d99c80c437259d317b2cd1cbd upstream.

Although rcu_dereference() and friends can be used in situations where
object lifetimes are being managed by something other than RCU, the
resulting sparse and lockdep-RCU noise can be annoying.  This commit
therefore supplies a lockless_dereference(), which provides the
protection for dereferences without the RCU-related debugging noise.

Reported-by: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>arch: Introduce smp_load_acquire(), smp_store_release()</title>
<updated>2015-08-25T14:56:59Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2013-11-06T13:57:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ad3b8fca4a918003cc03e8546b2f35506fd5d2e7'/>
<id>urn:sha1:ad3b8fca4a918003cc03e8546b2f35506fd5d2e7</id>
<content type='text'>
commit 47933ad41a86a4a9b50bed7c9b9bd2ba242aac63 upstream.

A number of situations currently require the heavyweight smp_mb(),
even though there is no need to order prior stores against later
loads.  Many architectures have much cheaper ways to handle these
situations, but the Linux kernel currently has no portable way
to make use of them.

This commit therefore supplies smp_load_acquire() and
smp_store_release() to remedy this situation.  The new
smp_load_acquire() primitive orders the specified load against
any subsequent reads or writes, while the new smp_store_release()
primitive orders the specifed store against any prior reads or
writes.  These primitives allow array-based circular FIFOs to be
implemented without an smp_mb(), and also allow a theoretical
hole in rcu_assign_pointer() to be closed at no additional
expense on most architectures.

In addition, the RCU experience transitioning from explicit
smp_read_barrier_depends() and smp_wmb() to rcu_dereference()
and rcu_assign_pointer(), respectively resulted in substantial
improvements in readability.  It therefore seems likely that
replacing other explicit barriers with smp_load_acquire() and
smp_store_release() will provide similar benefits.  It appears
that roughly half of the explicit barriers in core kernel code
might be so replaced.

[Changelog by PaulMck]

Reviewed-by: "Paul E. McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Cc: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Cc: Michael Neuling &lt;mikey@neuling.org&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Victor Kaplansky &lt;VICTORK@il.ibm.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Link: http://lkml.kernel.org/r/20131213150640.908486364@infradead.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>nfs: increase size of EXCHANGE_ID name string buffer</title>
<updated>2015-08-04T14:52:33Z</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@poochiereds.net</email>
</author>
<published>2015-06-09T23:43:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d636bf2af4943d6e379633f253544f6c9bdcfdd5'/>
<id>urn:sha1:d636bf2af4943d6e379633f253544f6c9bdcfdd5</id>
<content type='text'>
commit 764ad8ba8cd4c6f836fca9378f8c5121aece0842 upstream.

The current buffer is much too small if you have a relatively long
hostname. Bring it up to the size of the one that SETCLIENTID has.

Reported-by: Michael Skralivetsky &lt;michael.skralivetsky@primarydata.com&gt;
Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>USB: usbfs: allow URBs to be reaped after disconnection</title>
<updated>2015-08-04T14:52:31Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2015-01-29T16:29:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fe4f4ced37ee0acde613a7993c71d5909cd3c244'/>
<id>urn:sha1:fe4f4ced37ee0acde613a7993c71d5909cd3c244</id>
<content type='text'>
commit 3f2cee73b650921b2e214bf487b2061a1c266504 upstream.

The usbfs API has a peculiar hole: Users are not allowed to reap their
URBs after the device has been disconnected.  There doesn't seem to be
any good reason for this; it is an ad-hoc inconsistency.

The patch allows users to issue the USBDEVFS_REAPURB and
USBDEVFS_REAPURBNDELAY ioctls (together with their 32-bit counterparts
on 64-bit systems) even after the device is gone.  If no URBs are
pending for a disconnected device then the ioctls will return -ENODEV
rather than -EAGAIN, because obviously no new URBs will ever be able
to complete.

The patch also adds a new capability flag for
USBDEVFS_GET_CAPABILITIES to indicate that the reap-after-disconnect
feature is supported.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Chris Dickens &lt;christopher.a.dickens@gmail.com&gt;
Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

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