<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net, branch v3.18-rc5</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge tag 'nfs-for-3.18-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs</title>
<updated>2014-11-15T22:15:16+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-11-15T22:15:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1afcb6ed0d34c5794a51fe325076f006c8babaf4'/>
<id>1afcb6ed0d34c5794a51fe325076f006c8babaf4</id>
<content type='text'>
Pull NFS client bugfixes from Trond Myklebust:
 "Highlights include:

   - stable patches to fix NFSv4.x delegation reclaim error paths
   - fix a bug whereby we were advertising NFSv4.1 but using NFSv4.2
     features
   - fix a use-after-free problem with pNFS block layouts
   - fix a memory leak in the pNFS files O_DIRECT code
   - replace an intrusive and Oops-prone performance fix in the NFSv4
     atomic open code with a safer one-line version and revert the two
     original patches"

* tag 'nfs-for-3.18-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  sunrpc: fix sleeping under rcu_read_lock in gss_stringify_acceptor
  NFS: Don't try to reclaim delegation open state if recovery failed
  NFSv4: Ensure that we call FREE_STATEID when NFSv4.x stateids are revoked
  NFSv4: Fix races between nfs_remove_bad_delegation() and delegation return
  NFSv4.1: nfs41_clear_delegation_stateid shouldn't trust NFS_DELEGATED_STATE
  NFSv4: Ensure that we remove NFSv4.0 delegations when state has expired
  NFS: SEEK is an NFS v4.2 feature
  nfs: Fix use of uninitialized variable in nfs_getattr()
  nfs: Remove bogus assignment
  nfs: remove spurious WARN_ON_ONCE in write path
  pnfs/blocklayout: serialize GETDEVICEINFO calls
  nfs: fix pnfs direct write memory leak
  Revert "NFS: nfs4_do_open should add negative results to the dcache."
  Revert "NFS: remove BUG possibility in nfs4_open_and_get_state"
  NFSv4: Ensure nfs_atomic_open set the dentry verifier on ENOENT
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull NFS client bugfixes from Trond Myklebust:
 "Highlights include:

   - stable patches to fix NFSv4.x delegation reclaim error paths
   - fix a bug whereby we were advertising NFSv4.1 but using NFSv4.2
     features
   - fix a use-after-free problem with pNFS block layouts
   - fix a memory leak in the pNFS files O_DIRECT code
   - replace an intrusive and Oops-prone performance fix in the NFSv4
     atomic open code with a safer one-line version and revert the two
     original patches"

* tag 'nfs-for-3.18-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  sunrpc: fix sleeping under rcu_read_lock in gss_stringify_acceptor
  NFS: Don't try to reclaim delegation open state if recovery failed
  NFSv4: Ensure that we call FREE_STATEID when NFSv4.x stateids are revoked
  NFSv4: Fix races between nfs_remove_bad_delegation() and delegation return
  NFSv4.1: nfs41_clear_delegation_stateid shouldn't trust NFS_DELEGATED_STATE
  NFSv4: Ensure that we remove NFSv4.0 delegations when state has expired
  NFS: SEEK is an NFS v4.2 feature
  nfs: Fix use of uninitialized variable in nfs_getattr()
  nfs: Remove bogus assignment
  nfs: remove spurious WARN_ON_ONCE in write path
  pnfs/blocklayout: serialize GETDEVICEINFO calls
  nfs: fix pnfs direct write memory leak
  Revert "NFS: nfs4_do_open should add negative results to the dcache."
  Revert "NFS: remove BUG possibility in nfs4_open_and_get_state"
  NFSv4: Ensure nfs_atomic_open set the dentry verifier on ENOENT
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2014-11-14T01:54:08+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-11-14T01:54:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5cf52037042d3ad7432df1aec004a935e83939a6'/>
<id>5cf52037042d3ad7432df1aec004a935e83939a6</id>
<content type='text'>
Pull networking fixes from David Miller:

 1) sunhme driver lacks DMA mapping error checks, based upon a report by
    Meelis Roos.

 2) Fix memory leak in mvpp2 driver, from Sudip Mukherjee.

 3) DMA memory allocation sizes are wrong in systemport ethernet driver,
    fix from Florian Fainelli.

 4) Fix use after free in mac80211 defragmentation code, from Johannes
    Berg.

 5) Some networking uapi headers missing from Kbuild file, from Stephen
    Hemminger.

 6) TUN driver gets csum_start offset wrong when VLAN accel is enabled,
    and macvtap has a similar bug, from Herbert Xu.

 7) Adjust several tunneling drivers to set dev-&gt;iflink after registry,
    because registry sets that to -1 overwriting whatever we did.  From
    Steffen Klassert.

 8) Geneve forgets to set inner tunneling type, causing GSO segmentation
    to fail on some NICs.  From Jesse Gross.

 9) Fix several locking bugs in stmmac driver, from Fabrice Gasnier and
    Giuseppe CAVALLARO.

10) Fix spurious timeouts with NewReno on low traffic connections, from
    Marcelo Leitner.

11) Fix descriptor updates in enic driver, from Govindarajulu
    Varadarajan.

12) PPP calls bpf_prog_create() with locks held, which isn't kosher.
    Fix from Takashi Iwai.

13) Fix NULL deref in SCTP with malformed INIT packets, from Daniel
    Borkmann.

14) psock_fanout selftest accesses past the end of the mmap ring, fix
    from Shuah Khan.

15) Fix PTP timestamping for VLAN packets, from Richard Cochran.

16) netlink_unbind() calls in netlink pass wrong initial argument, from
    Hiroaki SHIMODA.

17) vxlan socket reuse accidently reuses a socket when the address
    family is different, so we have to explicitly check this, from
    Marcelo Lietner.

18) Fix missing include in nft_reject_bridge.c breaking the build on ppc
    and other architectures, from Guenter Roeck.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (75 commits)
  vxlan: Do not reuse sockets for a different address family
  smsc911x: power-up phydev before doing a software reset.
  lib: rhashtable - Remove weird non-ASCII characters from comments
  net/smsc911x: Fix delays in the PHY enable/disable routines
  net/smsc911x: Fix rare soft reset timeout issue due to PHY power-down mode
  netlink: Properly unbind in error conditions.
  net: ptp: fix time stamp matching logic for VLAN packets.
  cxgb4 : dcb open-lldp interop fixes
  selftests/net: psock_fanout seg faults in sock_fanout_read_ring()
  net: bcmgenet: apply MII configuration in bcmgenet_open()
  net: bcmgenet: connect and disconnect from the PHY state machine
  net: qualcomm: Fix dependency
  ixgbe: phy: fix uninitialized status in ixgbe_setup_phy_link_tnx
  net: phy: Correctly handle MII ioctl which changes autonegotiation.
  ipv6: fix IPV6_PKTINFO with v4 mapped
  net: sctp: fix memory leak in auth key management
  net: sctp: fix NULL pointer dereference in af-&gt;from_addr_param on malformed packet
  net: ppp: Don't call bpf_prog_create() in ppp_lock
  net/mlx4_en: Advertize encapsulation offloads features only when VXLAN tunnel is set
  cxgb4 : Fix bug in DCB app deletion
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull networking fixes from David Miller:

 1) sunhme driver lacks DMA mapping error checks, based upon a report by
    Meelis Roos.

 2) Fix memory leak in mvpp2 driver, from Sudip Mukherjee.

 3) DMA memory allocation sizes are wrong in systemport ethernet driver,
    fix from Florian Fainelli.

 4) Fix use after free in mac80211 defragmentation code, from Johannes
    Berg.

 5) Some networking uapi headers missing from Kbuild file, from Stephen
    Hemminger.

 6) TUN driver gets csum_start offset wrong when VLAN accel is enabled,
    and macvtap has a similar bug, from Herbert Xu.

 7) Adjust several tunneling drivers to set dev-&gt;iflink after registry,
    because registry sets that to -1 overwriting whatever we did.  From
    Steffen Klassert.

 8) Geneve forgets to set inner tunneling type, causing GSO segmentation
    to fail on some NICs.  From Jesse Gross.

 9) Fix several locking bugs in stmmac driver, from Fabrice Gasnier and
    Giuseppe CAVALLARO.

10) Fix spurious timeouts with NewReno on low traffic connections, from
    Marcelo Leitner.

11) Fix descriptor updates in enic driver, from Govindarajulu
    Varadarajan.

12) PPP calls bpf_prog_create() with locks held, which isn't kosher.
    Fix from Takashi Iwai.

13) Fix NULL deref in SCTP with malformed INIT packets, from Daniel
    Borkmann.

14) psock_fanout selftest accesses past the end of the mmap ring, fix
    from Shuah Khan.

15) Fix PTP timestamping for VLAN packets, from Richard Cochran.

16) netlink_unbind() calls in netlink pass wrong initial argument, from
    Hiroaki SHIMODA.

17) vxlan socket reuse accidently reuses a socket when the address
    family is different, so we have to explicitly check this, from
    Marcelo Lietner.

18) Fix missing include in nft_reject_bridge.c breaking the build on ppc
    and other architectures, from Guenter Roeck.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (75 commits)
  vxlan: Do not reuse sockets for a different address family
  smsc911x: power-up phydev before doing a software reset.
  lib: rhashtable - Remove weird non-ASCII characters from comments
  net/smsc911x: Fix delays in the PHY enable/disable routines
  net/smsc911x: Fix rare soft reset timeout issue due to PHY power-down mode
  netlink: Properly unbind in error conditions.
  net: ptp: fix time stamp matching logic for VLAN packets.
  cxgb4 : dcb open-lldp interop fixes
  selftests/net: psock_fanout seg faults in sock_fanout_read_ring()
  net: bcmgenet: apply MII configuration in bcmgenet_open()
  net: bcmgenet: connect and disconnect from the PHY state machine
  net: qualcomm: Fix dependency
  ixgbe: phy: fix uninitialized status in ixgbe_setup_phy_link_tnx
  net: phy: Correctly handle MII ioctl which changes autonegotiation.
  ipv6: fix IPV6_PKTINFO with v4 mapped
  net: sctp: fix memory leak in auth key management
  net: sctp: fix NULL pointer dereference in af-&gt;from_addr_param on malformed packet
  net: ppp: Don't call bpf_prog_create() in ppp_lock
  net/mlx4_en: Advertize encapsulation offloads features only when VXLAN tunnel is set
  cxgb4 : Fix bug in DCB app deletion
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>libceph: change from BUG to WARN for __remove_osd() asserts</title>
<updated>2014-11-13T19:26:34+00:00</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@redhat.com</email>
</author>
<published>2014-11-05T16:33:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cc9f1f518cec079289d11d732efa490306b1ddad'/>
<id>cc9f1f518cec079289d11d732efa490306b1ddad</id>
<content type='text'>
No reason to use BUG_ON for osd request list assertions.

Signed-off-by: Ilya Dryomov &lt;idryomov@redhat.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No reason to use BUG_ON for osd request list assertions.

Signed-off-by: Ilya Dryomov &lt;idryomov@redhat.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libceph: clear r_req_lru_item in __unregister_linger_request()</title>
<updated>2014-11-13T19:21:14+00:00</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@redhat.com</email>
</author>
<published>2014-11-05T12:45:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ba9d114ec5578e6e99a4dfa37ff8ae688040fd64'/>
<id>ba9d114ec5578e6e99a4dfa37ff8ae688040fd64</id>
<content type='text'>
kick_requests() can put linger requests on the notarget list.  This
means we need to clear the much-overloaded req-&gt;r_req_lru_item in
__unregister_linger_request() as well, or we get an assertion failure
in ceph_osdc_release_request() - !list_empty(&amp;req-&gt;r_req_lru_item).

AFAICT the assumption was that registered linger requests cannot be on
any of req-&gt;r_req_lru_item lists, but that's clearly not the case.

Signed-off-by: Ilya Dryomov &lt;idryomov@redhat.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
kick_requests() can put linger requests on the notarget list.  This
means we need to clear the much-overloaded req-&gt;r_req_lru_item in
__unregister_linger_request() as well, or we get an assertion failure
in ceph_osdc_release_request() - !list_empty(&amp;req-&gt;r_req_lru_item).

AFAICT the assumption was that registered linger requests cannot be on
any of req-&gt;r_req_lru_item lists, but that's clearly not the case.

Signed-off-by: Ilya Dryomov &lt;idryomov@redhat.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libceph: unlink from o_linger_requests when clearing r_osd</title>
<updated>2014-11-13T19:21:13+00:00</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@redhat.com</email>
</author>
<published>2014-11-04T15:32:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a390de0208e7f2f8fdb2fbf970240e4f7b308037'/>
<id>a390de0208e7f2f8fdb2fbf970240e4f7b308037</id>
<content type='text'>
Requests have to be unlinked from both osd-&gt;o_requests (normal
requests) and osd-&gt;o_linger_requests (linger requests) lists when
clearing req-&gt;r_osd.  Otherwise __unregister_linger_request() gets
confused and we trip over a !list_empty(&amp;osd-&gt;o_linger_requests)
assert in __remove_osd().

MON=1 OSD=1:

    # cat remove-osd.sh
    #!/bin/bash
    rbd create --size 1 test
    DEV=$(rbd map test)
    ceph osd out 0
    sleep 3
    rbd map dne/dne # obtain a new osdmap as a side effect
    rbd unmap $DEV &amp; # will block
    sleep 3
    ceph osd in 0

Signed-off-by: Ilya Dryomov &lt;idryomov@redhat.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Requests have to be unlinked from both osd-&gt;o_requests (normal
requests) and osd-&gt;o_linger_requests (linger requests) lists when
clearing req-&gt;r_osd.  Otherwise __unregister_linger_request() gets
confused and we trip over a !list_empty(&amp;osd-&gt;o_linger_requests)
assert in __remove_osd().

MON=1 OSD=1:

    # cat remove-osd.sh
    #!/bin/bash
    rbd create --size 1 test
    DEV=$(rbd map test)
    ceph osd out 0
    sleep 3
    rbd map dne/dne # obtain a new osdmap as a side effect
    rbd unmap $DEV &amp; # will block
    sleep 3
    ceph osd in 0

Signed-off-by: Ilya Dryomov &lt;idryomov@redhat.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libceph: do not crash on large auth tickets</title>
<updated>2014-11-13T19:21:12+00:00</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@redhat.com</email>
</author>
<published>2014-10-22T20:25:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=aaef31703a0cf6a733e651885bfb49edc3ac6774'/>
<id>aaef31703a0cf6a733e651885bfb49edc3ac6774</id>
<content type='text'>
Large (greater than 32k, the value of PAGE_ALLOC_COSTLY_ORDER) auth
tickets will have their buffers vmalloc'ed, which leads to the
following crash in crypto:

[   28.685082] BUG: unable to handle kernel paging request at ffffeb04000032c0
[   28.686032] IP: [&lt;ffffffff81392b42&gt;] scatterwalk_pagedone+0x22/0x80
[   28.686032] PGD 0
[   28.688088] Oops: 0000 [#1] PREEMPT SMP
[   28.688088] Modules linked in:
[   28.688088] CPU: 0 PID: 878 Comm: kworker/0:2 Not tainted 3.17.0-vm+ #305
[   28.688088] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
[   28.688088] Workqueue: ceph-msgr con_work
[   28.688088] task: ffff88011a7f9030 ti: ffff8800d903c000 task.ti: ffff8800d903c000
[   28.688088] RIP: 0010:[&lt;ffffffff81392b42&gt;]  [&lt;ffffffff81392b42&gt;] scatterwalk_pagedone+0x22/0x80
[   28.688088] RSP: 0018:ffff8800d903f688  EFLAGS: 00010286
[   28.688088] RAX: ffffeb04000032c0 RBX: ffff8800d903f718 RCX: ffffeb04000032c0
[   28.688088] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff8800d903f750
[   28.688088] RBP: ffff8800d903f688 R08: 00000000000007de R09: ffff8800d903f880
[   28.688088] R10: 18df467c72d6257b R11: 0000000000000000 R12: 0000000000000010
[   28.688088] R13: ffff8800d903f750 R14: ffff8800d903f8a0 R15: 0000000000000000
[   28.688088] FS:  00007f50a41c7700(0000) GS:ffff88011fc00000(0000) knlGS:0000000000000000
[   28.688088] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   28.688088] CR2: ffffeb04000032c0 CR3: 00000000da3f3000 CR4: 00000000000006b0
[   28.688088] Stack:
[   28.688088]  ffff8800d903f698 ffffffff81392ca8 ffff8800d903f6e8 ffffffff81395d32
[   28.688088]  ffff8800dac96000 ffff880000000000 ffff8800d903f980 ffff880119b7e020
[   28.688088]  ffff880119b7e010 0000000000000000 0000000000000010 0000000000000010
[   28.688088] Call Trace:
[   28.688088]  [&lt;ffffffff81392ca8&gt;] scatterwalk_done+0x38/0x40
[   28.688088]  [&lt;ffffffff81392ca8&gt;] scatterwalk_done+0x38/0x40
[   28.688088]  [&lt;ffffffff81395d32&gt;] blkcipher_walk_done+0x182/0x220
[   28.688088]  [&lt;ffffffff813990bf&gt;] crypto_cbc_encrypt+0x15f/0x180
[   28.688088]  [&lt;ffffffff81399780&gt;] ? crypto_aes_set_key+0x30/0x30
[   28.688088]  [&lt;ffffffff8156c40c&gt;] ceph_aes_encrypt2+0x29c/0x2e0
[   28.688088]  [&lt;ffffffff8156d2a3&gt;] ceph_encrypt2+0x93/0xb0
[   28.688088]  [&lt;ffffffff8156d7da&gt;] ceph_x_encrypt+0x4a/0x60
[   28.688088]  [&lt;ffffffff8155b39d&gt;] ? ceph_buffer_new+0x5d/0xf0
[   28.688088]  [&lt;ffffffff8156e837&gt;] ceph_x_build_authorizer.isra.6+0x297/0x360
[   28.688088]  [&lt;ffffffff8112089b&gt;] ? kmem_cache_alloc_trace+0x11b/0x1c0
[   28.688088]  [&lt;ffffffff8156b496&gt;] ? ceph_auth_create_authorizer+0x36/0x80
[   28.688088]  [&lt;ffffffff8156ed83&gt;] ceph_x_create_authorizer+0x63/0xd0
[   28.688088]  [&lt;ffffffff8156b4b4&gt;] ceph_auth_create_authorizer+0x54/0x80
[   28.688088]  [&lt;ffffffff8155f7c0&gt;] get_authorizer+0x80/0xd0
[   28.688088]  [&lt;ffffffff81555a8b&gt;] prepare_write_connect+0x18b/0x2b0
[   28.688088]  [&lt;ffffffff81559289&gt;] try_read+0x1e59/0x1f10

This is because we set up crypto scatterlists as if all buffers were
kmalloc'ed.  Fix it.

Cc: stable@vger.kernel.org
Signed-off-by: Ilya Dryomov &lt;idryomov@redhat.com&gt;
Reviewed-by: Sage Weil &lt;sage@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Large (greater than 32k, the value of PAGE_ALLOC_COSTLY_ORDER) auth
tickets will have their buffers vmalloc'ed, which leads to the
following crash in crypto:

[   28.685082] BUG: unable to handle kernel paging request at ffffeb04000032c0
[   28.686032] IP: [&lt;ffffffff81392b42&gt;] scatterwalk_pagedone+0x22/0x80
[   28.686032] PGD 0
[   28.688088] Oops: 0000 [#1] PREEMPT SMP
[   28.688088] Modules linked in:
[   28.688088] CPU: 0 PID: 878 Comm: kworker/0:2 Not tainted 3.17.0-vm+ #305
[   28.688088] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
[   28.688088] Workqueue: ceph-msgr con_work
[   28.688088] task: ffff88011a7f9030 ti: ffff8800d903c000 task.ti: ffff8800d903c000
[   28.688088] RIP: 0010:[&lt;ffffffff81392b42&gt;]  [&lt;ffffffff81392b42&gt;] scatterwalk_pagedone+0x22/0x80
[   28.688088] RSP: 0018:ffff8800d903f688  EFLAGS: 00010286
[   28.688088] RAX: ffffeb04000032c0 RBX: ffff8800d903f718 RCX: ffffeb04000032c0
[   28.688088] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff8800d903f750
[   28.688088] RBP: ffff8800d903f688 R08: 00000000000007de R09: ffff8800d903f880
[   28.688088] R10: 18df467c72d6257b R11: 0000000000000000 R12: 0000000000000010
[   28.688088] R13: ffff8800d903f750 R14: ffff8800d903f8a0 R15: 0000000000000000
[   28.688088] FS:  00007f50a41c7700(0000) GS:ffff88011fc00000(0000) knlGS:0000000000000000
[   28.688088] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   28.688088] CR2: ffffeb04000032c0 CR3: 00000000da3f3000 CR4: 00000000000006b0
[   28.688088] Stack:
[   28.688088]  ffff8800d903f698 ffffffff81392ca8 ffff8800d903f6e8 ffffffff81395d32
[   28.688088]  ffff8800dac96000 ffff880000000000 ffff8800d903f980 ffff880119b7e020
[   28.688088]  ffff880119b7e010 0000000000000000 0000000000000010 0000000000000010
[   28.688088] Call Trace:
[   28.688088]  [&lt;ffffffff81392ca8&gt;] scatterwalk_done+0x38/0x40
[   28.688088]  [&lt;ffffffff81392ca8&gt;] scatterwalk_done+0x38/0x40
[   28.688088]  [&lt;ffffffff81395d32&gt;] blkcipher_walk_done+0x182/0x220
[   28.688088]  [&lt;ffffffff813990bf&gt;] crypto_cbc_encrypt+0x15f/0x180
[   28.688088]  [&lt;ffffffff81399780&gt;] ? crypto_aes_set_key+0x30/0x30
[   28.688088]  [&lt;ffffffff8156c40c&gt;] ceph_aes_encrypt2+0x29c/0x2e0
[   28.688088]  [&lt;ffffffff8156d2a3&gt;] ceph_encrypt2+0x93/0xb0
[   28.688088]  [&lt;ffffffff8156d7da&gt;] ceph_x_encrypt+0x4a/0x60
[   28.688088]  [&lt;ffffffff8155b39d&gt;] ? ceph_buffer_new+0x5d/0xf0
[   28.688088]  [&lt;ffffffff8156e837&gt;] ceph_x_build_authorizer.isra.6+0x297/0x360
[   28.688088]  [&lt;ffffffff8112089b&gt;] ? kmem_cache_alloc_trace+0x11b/0x1c0
[   28.688088]  [&lt;ffffffff8156b496&gt;] ? ceph_auth_create_authorizer+0x36/0x80
[   28.688088]  [&lt;ffffffff8156ed83&gt;] ceph_x_create_authorizer+0x63/0xd0
[   28.688088]  [&lt;ffffffff8156b4b4&gt;] ceph_auth_create_authorizer+0x54/0x80
[   28.688088]  [&lt;ffffffff8155f7c0&gt;] get_authorizer+0x80/0xd0
[   28.688088]  [&lt;ffffffff81555a8b&gt;] prepare_write_connect+0x18b/0x2b0
[   28.688088]  [&lt;ffffffff81559289&gt;] try_read+0x1e59/0x1f10

This is because we set up crypto scatterlists as if all buffers were
kmalloc'ed.  Fix it.

Cc: stable@vger.kernel.org
Signed-off-by: Ilya Dryomov &lt;idryomov@redhat.com&gt;
Reviewed-by: Sage Weil &lt;sage@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sunrpc: fix sleeping under rcu_read_lock in gss_stringify_acceptor</title>
<updated>2014-11-13T18:15:49+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@primarydata.com</email>
</author>
<published>2014-11-13T12:30:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b3ecba096729f521312d1863ad22530695527aed'/>
<id>b3ecba096729f521312d1863ad22530695527aed</id>
<content type='text'>
Bruce reported that he was seeing the following BUG pop:

    BUG: sleeping function called from invalid context at mm/slab.c:2846
    in_atomic(): 0, irqs_disabled(): 0, pid: 4539, name: mount.nfs
    2 locks held by mount.nfs/4539:
    #0:  (nfs_clid_init_mutex){+.+.+.}, at: [&lt;ffffffffa01c0a9a&gt;] nfs4_discover_server_trunking+0x4a/0x2f0 [nfsv4]
    #1:  (rcu_read_lock){......}, at: [&lt;ffffffffa00e3185&gt;] gss_stringify_acceptor+0x5/0xb0 [auth_rpcgss]
    Preemption disabled at:[&lt;ffffffff81a4f082&gt;] printk+0x4d/0x4f

    CPU: 3 PID: 4539 Comm: mount.nfs Not tainted 3.18.0-rc1-00013-g5b095e9 #3393
    Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
    ffff880021499390 ffff8800381476a8 ffffffff81a534cf 0000000000000001
    0000000000000000 ffff8800381476c8 ffffffff81097854 00000000000000d0
    0000000000000018 ffff880038147718 ffffffff8118e4f3 0000000020479f00
    Call Trace:
    [&lt;ffffffff81a534cf&gt;] dump_stack+0x4f/0x7c
    [&lt;ffffffff81097854&gt;] __might_sleep+0x114/0x180
    [&lt;ffffffff8118e4f3&gt;] __kmalloc+0x1a3/0x280
    [&lt;ffffffffa00e31d8&gt;] gss_stringify_acceptor+0x58/0xb0 [auth_rpcgss]
    [&lt;ffffffffa00e3185&gt;] ? gss_stringify_acceptor+0x5/0xb0 [auth_rpcgss]
    [&lt;ffffffffa006b438&gt;] rpcauth_stringify_acceptor+0x18/0x30 [sunrpc]
    [&lt;ffffffffa01b0469&gt;] nfs4_proc_setclientid+0x199/0x380 [nfsv4]
    [&lt;ffffffffa01b04d0&gt;] ? nfs4_proc_setclientid+0x200/0x380 [nfsv4]
    [&lt;ffffffffa01bdf1a&gt;] nfs40_discover_server_trunking+0xda/0x150 [nfsv4]
    [&lt;ffffffffa01bde45&gt;] ? nfs40_discover_server_trunking+0x5/0x150 [nfsv4]
    [&lt;ffffffffa01c0acf&gt;] nfs4_discover_server_trunking+0x7f/0x2f0 [nfsv4]
    [&lt;ffffffffa01c8e24&gt;] nfs4_init_client+0x104/0x2f0 [nfsv4]
    [&lt;ffffffffa01539b4&gt;] nfs_get_client+0x314/0x3f0 [nfs]
    [&lt;ffffffffa0153780&gt;] ? nfs_get_client+0xe0/0x3f0 [nfs]
    [&lt;ffffffffa01c83aa&gt;] nfs4_set_client+0x8a/0x110 [nfsv4]
    [&lt;ffffffffa0069708&gt;] ? __rpc_init_priority_wait_queue+0xa8/0xf0 [sunrpc]
    [&lt;ffffffffa01c9b2f&gt;] nfs4_create_server+0x12f/0x390 [nfsv4]
    [&lt;ffffffffa01c1472&gt;] nfs4_remote_mount+0x32/0x60 [nfsv4]
    [&lt;ffffffff81196489&gt;] mount_fs+0x39/0x1b0
    [&lt;ffffffff81166145&gt;] ? __alloc_percpu+0x15/0x20
    [&lt;ffffffff811b276b&gt;] vfs_kern_mount+0x6b/0x150
    [&lt;ffffffffa01c1396&gt;] nfs_do_root_mount+0x86/0xc0 [nfsv4]
    [&lt;ffffffffa01c1784&gt;] nfs4_try_mount+0x44/0xc0 [nfsv4]
    [&lt;ffffffffa01549b7&gt;] ? get_nfs_version+0x27/0x90 [nfs]
    [&lt;ffffffffa0161a2d&gt;] nfs_fs_mount+0x47d/0xd60 [nfs]
    [&lt;ffffffff81a59c5e&gt;] ? mutex_unlock+0xe/0x10
    [&lt;ffffffffa01606a0&gt;] ? nfs_remount+0x430/0x430 [nfs]
    [&lt;ffffffffa01609c0&gt;] ? nfs_clone_super+0x140/0x140 [nfs]
    [&lt;ffffffff81196489&gt;] mount_fs+0x39/0x1b0
    [&lt;ffffffff81166145&gt;] ? __alloc_percpu+0x15/0x20
    [&lt;ffffffff811b276b&gt;] vfs_kern_mount+0x6b/0x150
    [&lt;ffffffff811b5830&gt;] do_mount+0x210/0xbe0
    [&lt;ffffffff811b54ca&gt;] ? copy_mount_options+0x3a/0x160
    [&lt;ffffffff811b651f&gt;] SyS_mount+0x6f/0xb0
    [&lt;ffffffff81a5c852&gt;] system_call_fastpath+0x12/0x17

Sleeping under the rcu_read_lock is bad. This patch fixes it by dropping
the rcu_read_lock before doing the allocation and then reacquiring it
and redoing the dereference before doing the copy. If we find that the
string has somehow grown in the meantime, we'll reallocate and try again.

Cc: &lt;stable@vger.kernel.org&gt; # v3.17+
Reported-by: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
Signed-off-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bruce reported that he was seeing the following BUG pop:

    BUG: sleeping function called from invalid context at mm/slab.c:2846
    in_atomic(): 0, irqs_disabled(): 0, pid: 4539, name: mount.nfs
    2 locks held by mount.nfs/4539:
    #0:  (nfs_clid_init_mutex){+.+.+.}, at: [&lt;ffffffffa01c0a9a&gt;] nfs4_discover_server_trunking+0x4a/0x2f0 [nfsv4]
    #1:  (rcu_read_lock){......}, at: [&lt;ffffffffa00e3185&gt;] gss_stringify_acceptor+0x5/0xb0 [auth_rpcgss]
    Preemption disabled at:[&lt;ffffffff81a4f082&gt;] printk+0x4d/0x4f

    CPU: 3 PID: 4539 Comm: mount.nfs Not tainted 3.18.0-rc1-00013-g5b095e9 #3393
    Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
    ffff880021499390 ffff8800381476a8 ffffffff81a534cf 0000000000000001
    0000000000000000 ffff8800381476c8 ffffffff81097854 00000000000000d0
    0000000000000018 ffff880038147718 ffffffff8118e4f3 0000000020479f00
    Call Trace:
    [&lt;ffffffff81a534cf&gt;] dump_stack+0x4f/0x7c
    [&lt;ffffffff81097854&gt;] __might_sleep+0x114/0x180
    [&lt;ffffffff8118e4f3&gt;] __kmalloc+0x1a3/0x280
    [&lt;ffffffffa00e31d8&gt;] gss_stringify_acceptor+0x58/0xb0 [auth_rpcgss]
    [&lt;ffffffffa00e3185&gt;] ? gss_stringify_acceptor+0x5/0xb0 [auth_rpcgss]
    [&lt;ffffffffa006b438&gt;] rpcauth_stringify_acceptor+0x18/0x30 [sunrpc]
    [&lt;ffffffffa01b0469&gt;] nfs4_proc_setclientid+0x199/0x380 [nfsv4]
    [&lt;ffffffffa01b04d0&gt;] ? nfs4_proc_setclientid+0x200/0x380 [nfsv4]
    [&lt;ffffffffa01bdf1a&gt;] nfs40_discover_server_trunking+0xda/0x150 [nfsv4]
    [&lt;ffffffffa01bde45&gt;] ? nfs40_discover_server_trunking+0x5/0x150 [nfsv4]
    [&lt;ffffffffa01c0acf&gt;] nfs4_discover_server_trunking+0x7f/0x2f0 [nfsv4]
    [&lt;ffffffffa01c8e24&gt;] nfs4_init_client+0x104/0x2f0 [nfsv4]
    [&lt;ffffffffa01539b4&gt;] nfs_get_client+0x314/0x3f0 [nfs]
    [&lt;ffffffffa0153780&gt;] ? nfs_get_client+0xe0/0x3f0 [nfs]
    [&lt;ffffffffa01c83aa&gt;] nfs4_set_client+0x8a/0x110 [nfsv4]
    [&lt;ffffffffa0069708&gt;] ? __rpc_init_priority_wait_queue+0xa8/0xf0 [sunrpc]
    [&lt;ffffffffa01c9b2f&gt;] nfs4_create_server+0x12f/0x390 [nfsv4]
    [&lt;ffffffffa01c1472&gt;] nfs4_remote_mount+0x32/0x60 [nfsv4]
    [&lt;ffffffff81196489&gt;] mount_fs+0x39/0x1b0
    [&lt;ffffffff81166145&gt;] ? __alloc_percpu+0x15/0x20
    [&lt;ffffffff811b276b&gt;] vfs_kern_mount+0x6b/0x150
    [&lt;ffffffffa01c1396&gt;] nfs_do_root_mount+0x86/0xc0 [nfsv4]
    [&lt;ffffffffa01c1784&gt;] nfs4_try_mount+0x44/0xc0 [nfsv4]
    [&lt;ffffffffa01549b7&gt;] ? get_nfs_version+0x27/0x90 [nfs]
    [&lt;ffffffffa0161a2d&gt;] nfs_fs_mount+0x47d/0xd60 [nfs]
    [&lt;ffffffff81a59c5e&gt;] ? mutex_unlock+0xe/0x10
    [&lt;ffffffffa01606a0&gt;] ? nfs_remount+0x430/0x430 [nfs]
    [&lt;ffffffffa01609c0&gt;] ? nfs_clone_super+0x140/0x140 [nfs]
    [&lt;ffffffff81196489&gt;] mount_fs+0x39/0x1b0
    [&lt;ffffffff81166145&gt;] ? __alloc_percpu+0x15/0x20
    [&lt;ffffffff811b276b&gt;] vfs_kern_mount+0x6b/0x150
    [&lt;ffffffff811b5830&gt;] do_mount+0x210/0xbe0
    [&lt;ffffffff811b54ca&gt;] ? copy_mount_options+0x3a/0x160
    [&lt;ffffffff811b651f&gt;] SyS_mount+0x6f/0xb0
    [&lt;ffffffff81a5c852&gt;] system_call_fastpath+0x12/0x17

Sleeping under the rcu_read_lock is bad. This patch fixes it by dropping
the rcu_read_lock before doing the allocation and then reacquiring it
and redoing the dereference before doing the copy. If we find that the
string has somehow grown in the meantime, we'll reallocate and try again.

Cc: &lt;stable@vger.kernel.org&gt; # v3.17+
Reported-by: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
Signed-off-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netlink: Properly unbind in error conditions.</title>
<updated>2014-11-12T20:12:06+00:00</updated>
<author>
<name>Hiroaki SHIMODA</name>
<email>shimoda.hiroaki@gmail.com</email>
</author>
<published>2014-11-12T19:24:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6251edd932ce3faadbfe27b0a0fe79780e0972e9'/>
<id>6251edd932ce3faadbfe27b0a0fe79780e0972e9</id>
<content type='text'>
Even if netlink_kernel_cfg::unbind is implemented the unbind() method is
not called, because cfg-&gt;unbind is omitted in __netlink_kernel_create().
And fix wrong argument of test_bit() and off by one problem.

At this point, no unbind() method is implemented, so there is no real
issue.

Fixes: 4f520900522f ("netlink: have netlink per-protocol bind function return an error code.")
Signed-off-by: Hiroaki SHIMODA &lt;shimoda.hiroaki@gmail.com&gt;
Cc: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Acked-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Even if netlink_kernel_cfg::unbind is implemented the unbind() method is
not called, because cfg-&gt;unbind is omitted in __netlink_kernel_create().
And fix wrong argument of test_bit() and off by one problem.

At this point, no unbind() method is implemented, so there is no real
issue.

Fixes: 4f520900522f ("netlink: have netlink per-protocol bind function return an error code.")
Signed-off-by: Hiroaki SHIMODA &lt;shimoda.hiroaki@gmail.com&gt;
Cc: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Acked-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv6: fix IPV6_PKTINFO with v4 mapped</title>
<updated>2014-11-11T20:32:45+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2014-11-11T01:54:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5337b5b75cd9bd3624a6820e3c2a084d2480061c'/>
<id>5337b5b75cd9bd3624a6820e3c2a084d2480061c</id>
<content type='text'>
Use IS_ENABLED(CONFIG_IPV6), to enable this code if IPv6 is
a module.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Fixes: c8e6ad0829a7 ("ipv6: honor IPV6_PKTINFO with v4 mapped addresses on sendmsg")
Acked-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use IS_ENABLED(CONFIG_IPV6), to enable this code if IPv6 is
a module.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Fixes: c8e6ad0829a7 ("ipv6: honor IPV6_PKTINFO with v4 mapped addresses on sendmsg")
Acked-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: sctp: fix memory leak in auth key management</title>
<updated>2014-11-11T20:19:11+00:00</updated>
<author>
<name>Daniel Borkmann</name>
<email>dborkman@redhat.com</email>
</author>
<published>2014-11-10T17:00:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4184b2a79a7612a9272ce20d639934584a1f3786'/>
<id>4184b2a79a7612a9272ce20d639934584a1f3786</id>
<content type='text'>
A very minimal and simple user space application allocating an SCTP
socket, setting SCTP_AUTH_KEY setsockopt(2) on it and then closing
the socket again will leak the memory containing the authentication
key from user space:

unreferenced object 0xffff8800837047c0 (size 16):
  comm "a.out", pid 2789, jiffies 4296954322 (age 192.258s)
  hex dump (first 16 bytes):
    01 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;ffffffff816d7e8e&gt;] kmemleak_alloc+0x4e/0xb0
    [&lt;ffffffff811c88d8&gt;] __kmalloc+0xe8/0x270
    [&lt;ffffffffa0870c23&gt;] sctp_auth_create_key+0x23/0x50 [sctp]
    [&lt;ffffffffa08718b1&gt;] sctp_auth_set_key+0xa1/0x140 [sctp]
    [&lt;ffffffffa086b383&gt;] sctp_setsockopt+0xd03/0x1180 [sctp]
    [&lt;ffffffff815bfd94&gt;] sock_common_setsockopt+0x14/0x20
    [&lt;ffffffff815beb61&gt;] SyS_setsockopt+0x71/0xd0
    [&lt;ffffffff816e58a9&gt;] system_call_fastpath+0x12/0x17
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

This is bad because of two things, we can bring down a machine from
user space when auth_enable=1, but also we would leave security sensitive
keying material in memory without clearing it after use. The issue is
that sctp_auth_create_key() already sets the refcount to 1, but after
allocation sctp_auth_set_key() does an additional refcount on it, and
thus leaving it around when we free the socket.

Fixes: 65b07e5d0d0 ("[SCTP]: API updates to suport SCTP-AUTH extensions.")
Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Cc: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A very minimal and simple user space application allocating an SCTP
socket, setting SCTP_AUTH_KEY setsockopt(2) on it and then closing
the socket again will leak the memory containing the authentication
key from user space:

unreferenced object 0xffff8800837047c0 (size 16):
  comm "a.out", pid 2789, jiffies 4296954322 (age 192.258s)
  hex dump (first 16 bytes):
    01 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;ffffffff816d7e8e&gt;] kmemleak_alloc+0x4e/0xb0
    [&lt;ffffffff811c88d8&gt;] __kmalloc+0xe8/0x270
    [&lt;ffffffffa0870c23&gt;] sctp_auth_create_key+0x23/0x50 [sctp]
    [&lt;ffffffffa08718b1&gt;] sctp_auth_set_key+0xa1/0x140 [sctp]
    [&lt;ffffffffa086b383&gt;] sctp_setsockopt+0xd03/0x1180 [sctp]
    [&lt;ffffffff815bfd94&gt;] sock_common_setsockopt+0x14/0x20
    [&lt;ffffffff815beb61&gt;] SyS_setsockopt+0x71/0xd0
    [&lt;ffffffff816e58a9&gt;] system_call_fastpath+0x12/0x17
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

This is bad because of two things, we can bring down a machine from
user space when auth_enable=1, but also we would leave security sensitive
keying material in memory without clearing it after use. The issue is
that sctp_auth_create_key() already sets the refcount to 1, but after
allocation sctp_auth_set_key() does an additional refcount on it, and
thus leaving it around when we free the socket.

Fixes: 65b07e5d0d0 ("[SCTP]: API updates to suport SCTP-AUTH extensions.")
Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Cc: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
