All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3.10 00/17] 3.10.92-stable review
@ 2015-10-23 17:44 Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 01/17] l2tp: protect tunnel->del_work by ref_count Greg Kroah-Hartman
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah.kh, stable

This is the start of the stable review cycle for the 3.10.92 release.
There are 17 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Sun Oct 25 17:44:42 UTC 2015.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v3.x/stable-review/patch-3.10.92-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Linux 3.10.92-rc1

Ilya Dryomov <idryomov@gmail.com>
    rbd: fix double free on rbd_dev->header_name

Mike Snitzer <snitzer@redhat.com>
    dm thin: fix missing pool reference count decrement in pool_ctr error path

Shaohua Li <shli@fb.com>
    workqueue: make sure delayed work run in local cpu

Wolfram Sang <wsa+renesas@sang-engineering.com>
    i2c: rcar: enable RuntimePM before registering to the core

Russell King <rmk+kernel@arm.linux.org.uk>
    crypto: ahash - ensure statesize is non-zero

Dave Kleikamp <dave.kleikamp@oracle.com>
    crypto: sparc - initialize blkcipher.ivsize

Geert Uytterhoeven <geert@linux-m68k.org>
    m68k/uaccess: Fix asm constraints for userspace access

Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
    asix: Do full reset during ax88772_bind

Michel Stam <m.stam@fugro.nl>
    asix: Don't reset PHY on if_up for ASIX 88772

Joe Perches <joe@perches.com>
    ethtool: Use kcalloc instead of kmalloc for ethtool_get_strings

Guillaume Nault <g.nault@alphalink.fr>
    ppp: don't override sk->sk_state in pppoe_flush_dev()

Eric Dumazet <edumazet@google.com>
    net: add pfmemalloc check in sk_add_backlog()

Pravin B Shelar <pshelar@nicira.com>
    skbuff: Fix skb checksum partial check.

Pravin B Shelar <pshelar@nicira.com>
    skbuff: Fix skb checksum flag on skb pull

Aaron Conole <aconole@bytheb.org>
    af_unix: return data from multiple SKBs on recv() with MSG_PEEK flag

Aaron Conole <aconole@bytheb.org>
    af_unix: Convert the unix_sk macro to an inline function for type safety

Alexander Couzens <lynxis@fe80.eu>
    l2tp: protect tunnel->del_work by ref_count


-------------

Diffstat:

 Makefile                           |  4 ++--
 arch/m68k/include/asm/uaccess_mm.h |  8 ++++----
 arch/m68k/lib/uaccess.c            |  6 +++---
 arch/sparc/crypto/aes_glue.c       |  2 ++
 arch/sparc/crypto/camellia_glue.c  |  1 +
 arch/sparc/crypto/des_glue.c       |  2 ++
 crypto/ahash.c                     |  3 ++-
 drivers/block/rbd.c                |  1 -
 drivers/i2c/busses/i2c-rcar.c      |  7 ++++---
 drivers/md/dm-thin.c               |  2 +-
 drivers/net/ppp/pppoe.c            |  1 -
 drivers/net/usb/asix_devices.c     | 16 ++--------------
 include/linux/skbuff.h             |  3 +++
 include/net/af_unix.h              |  6 +++++-
 include/net/sock.h                 |  8 ++++++++
 kernel/workqueue.c                 |  8 ++++----
 net/core/ethtool.c                 |  2 +-
 net/core/skbuff.c                  |  9 +++++----
 net/l2tp/l2tp_core.c               | 11 +++++++++--
 net/unix/af_unix.c                 | 14 +++++++++++++-
 20 files changed, 71 insertions(+), 43 deletions(-)



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 01/17] l2tp: protect tunnel->del_work by ref_count
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
@ 2015-10-23 17:44 ` Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 02/17] af_unix: Convert the unix_sk macro to an inline function for type safety Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Couzens, James Chapman,
	David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alexander Couzens <lynxis@fe80.eu>

[ Upstream commit 06a15f51cf3618e32a73871ee6a547ef7fd902b5 ]

There is a small chance that tunnel_free() is called before tunnel->del_work scheduled
resulting in a zero pointer dereference.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Acked-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/l2tp/l2tp_core.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -1381,7 +1381,7 @@ static void l2tp_tunnel_del_work(struct
 	tunnel = container_of(work, struct l2tp_tunnel, del_work);
 	sk = l2tp_tunnel_sock_lookup(tunnel);
 	if (!sk)
-		return;
+		goto out;
 
 	sock = sk->sk_socket;
 
@@ -1402,6 +1402,8 @@ static void l2tp_tunnel_del_work(struct
 	}
 
 	l2tp_tunnel_sock_put(sk);
+out:
+	l2tp_tunnel_dec_refcount(tunnel);
 }
 
 /* Create a socket for the tunnel, if one isn't set up by
@@ -1731,8 +1733,13 @@ EXPORT_SYMBOL_GPL(l2tp_tunnel_create);
  */
 int l2tp_tunnel_delete(struct l2tp_tunnel *tunnel)
 {
+	l2tp_tunnel_inc_refcount(tunnel);
 	l2tp_tunnel_closeall(tunnel);
-	return (false == queue_work(l2tp_wq, &tunnel->del_work));
+	if (false == queue_work(l2tp_wq, &tunnel->del_work)) {
+		l2tp_tunnel_dec_refcount(tunnel);
+		return 1;
+	}
+	return 0;
 }
 EXPORT_SYMBOL_GPL(l2tp_tunnel_delete);
 



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 02/17] af_unix: Convert the unix_sk macro to an inline function for type safety
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 01/17] l2tp: protect tunnel->del_work by ref_count Greg Kroah-Hartman
@ 2015-10-23 17:44 ` Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 03/17] af_unix: return data from multiple SKBs on recv() with MSG_PEEK flag Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Aaron Conole, David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Aaron Conole <aconole@bytheb.org>

[ Upstream commit 4613012db1d911f80897f9446a49de817b2c4c47 ]

As suggested by Eric Dumazet this change replaces the
#define with a static inline function to enjoy
complaints by the compiler when misusing the API.

Signed-off-by: Aaron Conole <aconole@bytheb.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/net/af_unix.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -63,7 +63,11 @@ struct unix_sock {
 #define UNIX_GC_MAYBE_CYCLE	1
 	struct socket_wq	peer_wq;
 };
-#define unix_sk(__sk) ((struct unix_sock *)__sk)
+
+static inline struct unix_sock *unix_sk(struct sock *sk)
+{
+	return (struct unix_sock *)sk;
+}
 
 #define peer_wait peer_wq.wait
 



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 03/17] af_unix: return data from multiple SKBs on recv() with MSG_PEEK flag
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 01/17] l2tp: protect tunnel->del_work by ref_count Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 02/17] af_unix: Convert the unix_sk macro to an inline function for type safety Greg Kroah-Hartman
@ 2015-10-23 17:44 ` Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 04/17] skbuff: Fix skb checksum flag on skb pull Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Aaron Conole, David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Aaron Conole <aconole@bytheb.org>

[ Upstream commit 9f389e35674f5b086edd70ed524ca0f287259725 ]

AF_UNIX sockets now return multiple skbs from recv() when MSG_PEEK flag
is set.

This is referenced in kernel bugzilla #12323 @
https://bugzilla.kernel.org/show_bug.cgi?id=12323

As described both in the BZ and lkml thread @
http://lkml.org/lkml/2008/1/8/444 calling recv() with MSG_PEEK on an
AF_UNIX socket only reads a single skb, where the desired effect is
to return as much skb data has been queued, until hitting the recv
buffer size (whichever comes first).

The modified MSG_PEEK path will now move to the next skb in the tree
and jump to the again: label, rather than following the natural loop
structure. This requires duplicating some of the loop head actions.

This was tested using the python socketpair python code attached to
the bugzilla issue.

Signed-off-by: Aaron Conole <aconole@bytheb.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/unix/af_unix.c |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2063,8 +2063,20 @@ again:
 			if (UNIXCB(skb).fp)
 				siocb->scm->fp = scm_fp_dup(UNIXCB(skb).fp);
 
-			sk_peek_offset_fwd(sk, chunk);
+			if (skip) {
+				sk_peek_offset_fwd(sk, chunk);
+				skip -= chunk;
+			}
 
+			if (UNIXCB(skb).fp)
+				break;
+
+			last = skb;
+			unix_state_lock(sk);
+			skb = skb_peek_next(skb, &sk->sk_receive_queue);
+			if (skb)
+				goto again;
+			unix_state_unlock(sk);
 			break;
 		}
 	} while (size);



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 04/17] skbuff: Fix skb checksum flag on skb pull
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2015-10-23 17:44 ` [PATCH 3.10 03/17] af_unix: return data from multiple SKBs on recv() with MSG_PEEK flag Greg Kroah-Hartman
@ 2015-10-23 17:44 ` Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 05/17] skbuff: Fix skb checksum partial check Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Anupam Chanda, Pravin B Shelar,
	Tom Herbert, David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Pravin B Shelar <pshelar@nicira.com>

[ Upstream commit 6ae459bdaaeebc632b16e54dcbabb490c6931d61 ]

VXLAN device can receive skb with checksum partial. But the checksum
offset could be in outer header which is pulled on receive. This results
in negative checksum offset for the skb. Such skb can cause the assert
failure in skb_checksum_help(). Following patch fixes the bug by setting
checksum-none while pulling outer header.

Following is the kernel panic msg from old kernel hitting the bug.

------------[ cut here ]------------
kernel BUG at net/core/dev.c:1906!
RIP: 0010:[<ffffffff81518034>] skb_checksum_help+0x144/0x150
Call Trace:
<IRQ>
[<ffffffffa0164c28>] queue_userspace_packet+0x408/0x470 [openvswitch]
[<ffffffffa016614d>] ovs_dp_upcall+0x5d/0x60 [openvswitch]
[<ffffffffa0166236>] ovs_dp_process_packet_with_key+0xe6/0x100 [openvswitch]
[<ffffffffa016629b>] ovs_dp_process_received_packet+0x4b/0x80 [openvswitch]
[<ffffffffa016c51a>] ovs_vport_receive+0x2a/0x30 [openvswitch]
[<ffffffffa0171383>] vxlan_rcv+0x53/0x60 [openvswitch]
[<ffffffffa01734cb>] vxlan_udp_encap_recv+0x8b/0xf0 [openvswitch]
[<ffffffff8157addc>] udp_queue_rcv_skb+0x2dc/0x3b0
[<ffffffff8157b56f>] __udp4_lib_rcv+0x1cf/0x6c0
[<ffffffff8157ba7a>] udp_rcv+0x1a/0x20
[<ffffffff8154fdbd>] ip_local_deliver_finish+0xdd/0x280
[<ffffffff81550128>] ip_local_deliver+0x88/0x90
[<ffffffff8154fa7d>] ip_rcv_finish+0x10d/0x370
[<ffffffff81550365>] ip_rcv+0x235/0x300
[<ffffffff8151ba1d>] __netif_receive_skb+0x55d/0x620
[<ffffffff8151c360>] netif_receive_skb+0x80/0x90
[<ffffffff81459935>] virtnet_poll+0x555/0x6f0
[<ffffffff8151cd04>] net_rx_action+0x134/0x290
[<ffffffff810683d8>] __do_softirq+0xa8/0x210
[<ffffffff8162fe6c>] call_softirq+0x1c/0x30
[<ffffffff810161a5>] do_softirq+0x65/0xa0
[<ffffffff810687be>] irq_exit+0x8e/0xb0
[<ffffffff81630733>] do_IRQ+0x63/0xe0
[<ffffffff81625f2e>] common_interrupt+0x6e/0x6e

Reported-by: Anupam Chanda <achanda@vmware.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/linux/skbuff.h |    3 +++
 1 file changed, 3 insertions(+)

--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2363,6 +2363,9 @@ static inline void skb_postpull_rcsum(st
 {
 	if (skb->ip_summed == CHECKSUM_COMPLETE)
 		skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0));
+	else if (skb->ip_summed == CHECKSUM_PARTIAL &&
+		 skb_checksum_start_offset(skb) <= len)
+		skb->ip_summed = CHECKSUM_NONE;
 }
 
 unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len);



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 05/17] skbuff: Fix skb checksum partial check.
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2015-10-23 17:44 ` [PATCH 3.10 04/17] skbuff: Fix skb checksum flag on skb pull Greg Kroah-Hartman
@ 2015-10-23 17:44 ` Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 06/17] net: add pfmemalloc check in sk_add_backlog() Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Andrew Vagin, Pravin B Shelar,
	David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Pravin B Shelar <pshelar@nicira.com>

[ Upstream commit 31b33dfb0a144469dd805514c9e63f4993729a48 ]

Earlier patch 6ae459bda tried to detect void ckecksum partial
skb by comparing pull length to checksum offset. But it does
not work for all cases since checksum-offset depends on
updates to skb->data.

Following patch fixes it by validating checksum start offset
after skb-data pointer is updated. Negative value of checksum
offset start means there is no need to checksum.

Fixes: 6ae459bda ("skbuff: Fix skb checksum flag on skb pull")
Reported-by: Andrew Vagin <avagin@odin.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/linux/skbuff.h |    2 +-
 net/core/skbuff.c      |    9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2364,7 +2364,7 @@ static inline void skb_postpull_rcsum(st
 	if (skb->ip_summed == CHECKSUM_COMPLETE)
 		skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0));
 	else if (skb->ip_summed == CHECKSUM_PARTIAL &&
-		 skb_checksum_start_offset(skb) <= len)
+		 skb_checksum_start_offset(skb) < 0)
 		skb->ip_summed = CHECKSUM_NONE;
 }
 
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2711,11 +2711,12 @@ EXPORT_SYMBOL(skb_append_datato_frags);
  */
 unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len)
 {
+	unsigned char *data = skb->data;
+
 	BUG_ON(len > skb->len);
-	skb->len -= len;
-	BUG_ON(skb->len < skb->data_len);
-	skb_postpull_rcsum(skb, skb->data, len);
-	return skb->data += len;
+	__skb_pull(skb, len);
+	skb_postpull_rcsum(skb, data, len);
+	return skb->data;
 }
 EXPORT_SYMBOL_GPL(skb_pull_rcsum);
 



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 06/17] net: add pfmemalloc check in sk_add_backlog()
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2015-10-23 17:44 ` [PATCH 3.10 05/17] skbuff: Fix skb checksum partial check Greg Kroah-Hartman
@ 2015-10-23 17:44 ` Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 07/17] ppp: dont override sk->sk_state in pppoe_flush_dev() Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Eric Dumazet, Greg Thelen, David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Eric Dumazet <edumazet@google.com>

[ Upstream commit c7c49b8fde26b74277188bdc6c9dca38db6fa35b ]

Greg reported crashes hitting the following check in __sk_backlog_rcv()

	BUG_ON(!sock_flag(sk, SOCK_MEMALLOC));

The pfmemalloc bit is currently checked in sk_filter().

This works correctly for TCP, because sk_filter() is ran in
tcp_v[46]_rcv() before hitting the prequeue or backlog checks.

For UDP or other protocols, this does not work, because the sk_filter()
is ran from sock_queue_rcv_skb(), which might be called _after_ backlog
queuing if socket is owned by user by the time packet is processed by
softirq handler.

Fixes: b4b9e35585089 ("netvm: set PF_MEMALLOC as appropriate during SKB processing")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Greg Thelen <gthelen@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/net/sock.h |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -782,6 +782,14 @@ static inline __must_check int sk_add_ba
 	if (sk_rcvqueues_full(sk, skb, limit))
 		return -ENOBUFS;
 
+	/*
+	 * If the skb was allocated from pfmemalloc reserves, only
+	 * allow SOCK_MEMALLOC sockets to use it as this socket is
+	 * helping free memory
+	 */
+	if (skb_pfmemalloc(skb) && !sock_flag(sk, SOCK_MEMALLOC))
+		return -ENOMEM;
+
 	__sk_add_backlog(sk, skb);
 	sk->sk_backlog.len += skb->truesize;
 	return 0;



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 07/17] ppp: dont override sk->sk_state in pppoe_flush_dev()
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2015-10-23 17:44 ` [PATCH 3.10 06/17] net: add pfmemalloc check in sk_add_backlog() Greg Kroah-Hartman
@ 2015-10-23 17:44 ` Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 08/17] ethtool: Use kcalloc instead of kmalloc for ethtool_get_strings Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Oleksii Berezhniak, Guillaume Nault,
	David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Guillaume Nault <g.nault@alphalink.fr>

[ Upstream commit e6740165b8f7f06d8caee0fceab3fb9d790a6fed ]

Since commit 2b018d57ff18 ("pppoe: drop PPPOX_ZOMBIEs in pppoe_release"),
pppoe_release() calls dev_put(po->pppoe_dev) if sk is in the
PPPOX_ZOMBIE state. But pppoe_flush_dev() can set sk->sk_state to
PPPOX_ZOMBIE _and_ reset po->pppoe_dev to NULL. This leads to the
following oops:

[  570.140800] BUG: unable to handle kernel NULL pointer dereference at 00000000000004e0
[  570.142931] IP: [<ffffffffa018c701>] pppoe_release+0x50/0x101 [pppoe]
[  570.144601] PGD 3d119067 PUD 3dbc1067 PMD 0
[  570.144601] Oops: 0000 [#1] SMP
[  570.144601] Modules linked in: l2tp_ppp l2tp_netlink l2tp_core ip6_udp_tunnel udp_tunnel pppoe pppox ppp_generic slhc loop crc32c_intel ghash_clmulni_intel jitterentropy_rng sha256_generic hmac drbg ansi_cprng aesni_intel aes_x86_64 ablk_helper cryptd lrw gf128mul glue_helper acpi_cpufreq evdev serio_raw processor button ext4 crc16 mbcache jbd2 virtio_net virtio_blk virtio_pci virtio_ring virtio
[  570.144601] CPU: 1 PID: 15738 Comm: ppp-apitest Not tainted 4.2.0 #1
[  570.144601] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014
[  570.144601] task: ffff88003d30d600 ti: ffff880036b60000 task.ti: ffff880036b60000
[  570.144601] RIP: 0010:[<ffffffffa018c701>]  [<ffffffffa018c701>] pppoe_release+0x50/0x101 [pppoe]
[  570.144601] RSP: 0018:ffff880036b63e08  EFLAGS: 00010202
[  570.144601] RAX: 0000000000000000 RBX: ffff880034340000 RCX: 0000000000000206
[  570.144601] RDX: 0000000000000006 RSI: ffff88003d30dd20 RDI: ffff88003d30dd20
[  570.144601] RBP: ffff880036b63e28 R08: 0000000000000001 R09: 0000000000000000
[  570.144601] R10: 00007ffee9b50420 R11: ffff880034340078 R12: ffff8800387ec780
[  570.144601] R13: ffff8800387ec7b0 R14: ffff88003e222aa0 R15: ffff8800387ec7b0
[  570.144601] FS:  00007f5672f48700(0000) GS:ffff88003fc80000(0000) knlGS:0000000000000000
[  570.144601] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  570.144601] CR2: 00000000000004e0 CR3: 0000000037f7e000 CR4: 00000000000406a0
[  570.144601] Stack:
[  570.144601]  ffffffffa018f240 ffff8800387ec780 ffffffffa018f240 ffff8800387ec7b0
[  570.144601]  ffff880036b63e48 ffffffff812caabe ffff880039e4e000 0000000000000008
[  570.144601]  ffff880036b63e58 ffffffff812cabad ffff880036b63ea8 ffffffff811347f5
[  570.144601] Call Trace:
[  570.144601]  [<ffffffff812caabe>] sock_release+0x1a/0x75
[  570.144601]  [<ffffffff812cabad>] sock_close+0xd/0x11
[  570.144601]  [<ffffffff811347f5>] __fput+0xff/0x1a5
[  570.144601]  [<ffffffff811348cb>] ____fput+0x9/0xb
[  570.144601]  [<ffffffff81056682>] task_work_run+0x66/0x90
[  570.144601]  [<ffffffff8100189e>] prepare_exit_to_usermode+0x8c/0xa7
[  570.144601]  [<ffffffff81001a26>] syscall_return_slowpath+0x16d/0x19b
[  570.144601]  [<ffffffff813babb1>] int_ret_from_sys_call+0x25/0x9f
[  570.144601] Code: 48 8b 83 c8 01 00 00 a8 01 74 12 48 89 df e8 8b 27 14 e1 b8 f7 ff ff ff e9 b7 00 00 00 8a 43 12 a8 0b 74 1c 48 8b 83 a8 04 00 00 <48> 8b 80 e0 04 00 00 65 ff 08 48 c7 83 a8 04 00 00 00 00 00 00
[  570.144601] RIP  [<ffffffffa018c701>] pppoe_release+0x50/0x101 [pppoe]
[  570.144601]  RSP <ffff880036b63e08>
[  570.144601] CR2: 00000000000004e0
[  570.200518] ---[ end trace 46956baf17349563 ]---

pppoe_flush_dev() has no reason to override sk->sk_state with
PPPOX_ZOMBIE. pppox_unbind_sock() already sets sk->sk_state to
PPPOX_DEAD, which is the correct state given that sk is unbound and
po->pppoe_dev is NULL.

Fixes: 2b018d57ff18 ("pppoe: drop PPPOX_ZOMBIEs in pppoe_release")
Tested-by: Oleksii Berezhniak <core@irc.lg.ua>
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ppp/pppoe.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/net/ppp/pppoe.c
+++ b/drivers/net/ppp/pppoe.c
@@ -313,7 +313,6 @@ static void pppoe_flush_dev(struct net_d
 			if (po->pppoe_dev == dev &&
 			    sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) {
 				pppox_unbind_sock(sk);
-				sk->sk_state = PPPOX_ZOMBIE;
 				sk->sk_state_change(sk);
 				po->pppoe_dev = NULL;
 				dev_put(dev);



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 08/17] ethtool: Use kcalloc instead of kmalloc for ethtool_get_strings
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2015-10-23 17:44 ` [PATCH 3.10 07/17] ppp: dont override sk->sk_state in pppoe_flush_dev() Greg Kroah-Hartman
@ 2015-10-23 17:44 ` Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 09/17] asix: Dont reset PHY on if_up for ASIX 88772 Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Joe Perches, Ben Hutchings, David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Joe Perches <joe@perches.com>

[ Upstream commit 077cb37fcf6f00a45f375161200b5ee0cd4e937b ]

It seems that kernel memory can leak into userspace by a
kmalloc, ethtool_get_strings, then copy_to_user sequence.

Avoid this by using kcalloc to zero fill the copied buffer.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/core/ethtool.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -1066,7 +1066,7 @@ static int ethtool_get_strings(struct ne
 
 	gstrings.len = ret;
 
-	data = kmalloc(gstrings.len * ETH_GSTRING_LEN, GFP_USER);
+	data = kcalloc(gstrings.len, ETH_GSTRING_LEN, GFP_USER);
 	if (!data)
 		return -ENOMEM;
 



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 09/17] asix: Dont reset PHY on if_up for ASIX 88772
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2015-10-23 17:44 ` [PATCH 3.10 08/17] ethtool: Use kcalloc instead of kmalloc for ethtool_get_strings Greg Kroah-Hartman
@ 2015-10-23 17:44 ` Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 10/17] asix: Do full reset during ax88772_bind Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Michel Stam, David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Michel Stam <m.stam@fugro.nl>

[ Upstream commit 3cc81d85ee01e5a0b7ea2f4190e2ed1165f53c31 ]

I've noticed every time the interface is set to 'up,', the kernel
reports that the link speed is set to 100 Mbps/Full Duplex, even
when ethtool is used to set autonegotiation to 'off', half
duplex, 10 Mbps.
It can be tested by:
 ifconfig eth0 down
 ethtool -s eth0 autoneg off speed 10 duplex half
 ifconfig eth0 up

Then checking 'dmesg' for the link speed.

Signed-off-by: Michel Stam <m.stam@fugro.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/usb/asix_devices.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -888,7 +888,7 @@ static const struct driver_info ax88772_
 	.unbind = ax88772_unbind,
 	.status = asix_status,
 	.link_reset = ax88772_link_reset,
-	.reset = ax88772_reset,
+	.reset = ax88772_link_reset,
 	.flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR | FLAG_MULTI_PACKET,
 	.rx_fixup = asix_rx_fixup_common,
 	.tx_fixup = asix_tx_fixup,



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 10/17] asix: Do full reset during ax88772_bind
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2015-10-23 17:44 ` [PATCH 3.10 09/17] asix: Dont reset PHY on if_up for ASIX 88772 Greg Kroah-Hartman
@ 2015-10-23 17:44 ` Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 11/17] m68k/uaccess: Fix asm constraints for userspace access Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Charles Keepax, Riku Voipio, David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

[ Upstream commit 436c2a5036b6ffe813310df2cf327d3b69be0734 ]

commit 3cc81d85ee01 ("asix: Don't reset PHY on if_up for ASIX 88772")
causes the ethernet on Arndale to no longer function. This appears to
be because the Arndale ethernet requires a full reset before it will
function correctly, however simply reverting the above patch causes
problems with ethtool settings getting reset.

It seems the problem is that the ethernet is not properly reset during
bind, and indeed the code in ax88772_bind that resets the device is a
very small subset of the actual ax88772_reset function. This patch uses
ax88772_reset in place of the existing reset code in ax88772_bind which
removes some code duplication and fixes the ethernet on Arndale.

It is still possible that the original patch causes some issues with
suspend and resume but that seems like a separate issue and I haven't
had a chance to test that yet.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tested-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/usb/asix_devices.c |   14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -466,19 +466,7 @@ static int ax88772_bind(struct usbnet *d
 		return ret;
 	}
 
-	ret = asix_sw_reset(dev, AX_SWRESET_IPPD | AX_SWRESET_PRL);
-	if (ret < 0)
-		return ret;
-
-	msleep(150);
-
-	ret = asix_sw_reset(dev, AX_SWRESET_CLEAR);
-	if (ret < 0)
-		return ret;
-
-	msleep(150);
-
-	ret = asix_sw_reset(dev, embd_phy ? AX_SWRESET_IPRL : AX_SWRESET_PRTE);
+	ax88772_reset(dev);
 
 	/* Read PHYID register *AFTER* the PHY was reset properly */
 	phyid = asix_get_phyid(dev);



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 11/17] m68k/uaccess: Fix asm constraints for userspace access
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2015-10-23 17:44 ` [PATCH 3.10 10/17] asix: Do full reset during ax88772_bind Greg Kroah-Hartman
@ 2015-10-23 17:44 ` Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 12/17] crypto: sparc - initialize blkcipher.ivsize Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven, Guenter Roeck

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Geert Uytterhoeven <geert@linux-m68k.org>

commit 631d8b674f5f8235e9cb7e628b0fe9e5200e3158 upstream.

When compiling a MMU kernel with CPU_HAS_ADDRESS_SPACES=n (e.g. "MMU=y
allnoconfig": "echo CONFIG_MMU=y > allno.config && make KCONFIG_ALLCONFIG=1
allnoconfig"), we use plain "move" instead of "moves", and I got:

  CC      arch/m68k/lib/uaccess.o
{standard input}: Assembler messages:
{standard input}:47: Error: operands mismatch -- statement `move.b %a0,(%a1)' ignored

This happens because plain "move" doesn't support byte transfers between
memory and address registers, while "moves" does.

Fix the asm constraints for __generic_copy_from_user(),
__generic_copy_to_user(), and __clear_user() to only use data registers
when accessing userspace.

Also, relax the asm constraints for 16-bit userspace accesses in
__put_user() and __get_user(), as both "move" and "moves" do support
such transfers between memory and address registers.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/m68k/include/asm/uaccess_mm.h |    8 ++++----
 arch/m68k/lib/uaccess.c            |    6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

--- a/arch/m68k/include/asm/uaccess_mm.h
+++ b/arch/m68k/include/asm/uaccess_mm.h
@@ -90,7 +90,7 @@ asm volatile ("\n"					\
 		__put_user_asm(__pu_err, __pu_val, ptr, b, d, -EFAULT);	\
 		break;							\
 	case 2:								\
-		__put_user_asm(__pu_err, __pu_val, ptr, w, d, -EFAULT);	\
+		__put_user_asm(__pu_err, __pu_val, ptr, w, r, -EFAULT);	\
 		break;							\
 	case 4:								\
 		__put_user_asm(__pu_err, __pu_val, ptr, l, r, -EFAULT);	\
@@ -158,7 +158,7 @@ asm volatile ("\n"					\
 		__get_user_asm(__gu_err, x, ptr, u8, b, d, -EFAULT);	\
 		break;							\
 	case 2:								\
-		__get_user_asm(__gu_err, x, ptr, u16, w, d, -EFAULT);	\
+		__get_user_asm(__gu_err, x, ptr, u16, w, r, -EFAULT);	\
 		break;							\
 	case 4:								\
 		__get_user_asm(__gu_err, x, ptr, u32, l, r, -EFAULT);	\
@@ -245,7 +245,7 @@ __constant_copy_from_user(void *to, cons
 		__get_user_asm(res, *(u8 *)to, (u8 __user *)from, u8, b, d, 1);
 		break;
 	case 2:
-		__get_user_asm(res, *(u16 *)to, (u16 __user *)from, u16, w, d, 2);
+		__get_user_asm(res, *(u16 *)to, (u16 __user *)from, u16, w, r, 2);
 		break;
 	case 3:
 		__constant_copy_from_user_asm(res, to, from, tmp, 3, w, b,);
@@ -326,7 +326,7 @@ __constant_copy_to_user(void __user *to,
 		__put_user_asm(res, *(u8 *)from, (u8 __user *)to, b, d, 1);
 		break;
 	case 2:
-		__put_user_asm(res, *(u16 *)from, (u16 __user *)to, w, d, 2);
+		__put_user_asm(res, *(u16 *)from, (u16 __user *)to, w, r, 2);
 		break;
 	case 3:
 		__constant_copy_to_user_asm(res, to, from, tmp, 3, w, b,);
--- a/arch/m68k/lib/uaccess.c
+++ b/arch/m68k/lib/uaccess.c
@@ -52,7 +52,7 @@ unsigned long __generic_copy_from_user(v
 		"	.long	3b,30b\n"
 		"	.long	5b,50b\n"
 		"	.previous"
-		: "=d" (res), "+a" (from), "+a" (to), "=&r" (tmp)
+		: "=d" (res), "+a" (from), "+a" (to), "=&d" (tmp)
 		: "0" (n / 4), "d" (n & 3));
 
 	return res;
@@ -96,7 +96,7 @@ unsigned long __generic_copy_to_user(voi
 		"	.long	7b,50b\n"
 		"	.long	8b,50b\n"
 		"	.previous"
-		: "=d" (res), "+a" (from), "+a" (to), "=&r" (tmp)
+		: "=d" (res), "+a" (from), "+a" (to), "=&d" (tmp)
 		: "0" (n / 4), "d" (n & 3));
 
 	return res;
@@ -141,7 +141,7 @@ unsigned long __clear_user(void __user *
 		"	.long	7b,40b\n"
 		"	.previous"
 		: "=d" (res), "+a" (to)
-		: "r" (0), "0" (n / 4), "d" (n & 3));
+		: "d" (0), "0" (n / 4), "d" (n & 3));
 
     return res;
 }



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 12/17] crypto: sparc - initialize blkcipher.ivsize
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2015-10-23 17:44 ` [PATCH 3.10 11/17] m68k/uaccess: Fix asm constraints for userspace access Greg Kroah-Hartman
@ 2015-10-23 17:44 ` Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 13/17] crypto: ahash - ensure statesize is non-zero Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dave Kleikamp, Herbert Xu

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dave Kleikamp <dave.kleikamp@oracle.com>

commit a66d7f724a96d6fd279bfbd2ee488def6b081bea upstream.

Some of the crypto algorithms write to the initialization vector,
but no space has been allocated for it. This clobbers adjacent memory.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/sparc/crypto/aes_glue.c      |    2 ++
 arch/sparc/crypto/camellia_glue.c |    1 +
 arch/sparc/crypto/des_glue.c      |    2 ++
 3 files changed, 5 insertions(+)

--- a/arch/sparc/crypto/aes_glue.c
+++ b/arch/sparc/crypto/aes_glue.c
@@ -433,6 +433,7 @@ static struct crypto_alg algs[] = { {
 		.blkcipher = {
 			.min_keysize	= AES_MIN_KEY_SIZE,
 			.max_keysize	= AES_MAX_KEY_SIZE,
+			.ivsize		= AES_BLOCK_SIZE,
 			.setkey		= aes_set_key,
 			.encrypt	= cbc_encrypt,
 			.decrypt	= cbc_decrypt,
@@ -452,6 +453,7 @@ static struct crypto_alg algs[] = { {
 		.blkcipher = {
 			.min_keysize	= AES_MIN_KEY_SIZE,
 			.max_keysize	= AES_MAX_KEY_SIZE,
+			.ivsize		= AES_BLOCK_SIZE,
 			.setkey		= aes_set_key,
 			.encrypt	= ctr_crypt,
 			.decrypt	= ctr_crypt,
--- a/arch/sparc/crypto/camellia_glue.c
+++ b/arch/sparc/crypto/camellia_glue.c
@@ -274,6 +274,7 @@ static struct crypto_alg algs[] = { {
 		.blkcipher = {
 			.min_keysize	= CAMELLIA_MIN_KEY_SIZE,
 			.max_keysize	= CAMELLIA_MAX_KEY_SIZE,
+			.ivsize		= CAMELLIA_BLOCK_SIZE,
 			.setkey		= camellia_set_key,
 			.encrypt	= cbc_encrypt,
 			.decrypt	= cbc_decrypt,
--- a/arch/sparc/crypto/des_glue.c
+++ b/arch/sparc/crypto/des_glue.c
@@ -429,6 +429,7 @@ static struct crypto_alg algs[] = { {
 		.blkcipher = {
 			.min_keysize	= DES_KEY_SIZE,
 			.max_keysize	= DES_KEY_SIZE,
+			.ivsize		= DES_BLOCK_SIZE,
 			.setkey		= des_set_key,
 			.encrypt	= cbc_encrypt,
 			.decrypt	= cbc_decrypt,
@@ -485,6 +486,7 @@ static struct crypto_alg algs[] = { {
 		.blkcipher = {
 			.min_keysize	= DES3_EDE_KEY_SIZE,
 			.max_keysize	= DES3_EDE_KEY_SIZE,
+			.ivsize		= DES3_EDE_BLOCK_SIZE,
 			.setkey		= des3_ede_set_key,
 			.encrypt	= cbc3_encrypt,
 			.decrypt	= cbc3_decrypt,



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 13/17] crypto: ahash - ensure statesize is non-zero
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2015-10-23 17:44 ` [PATCH 3.10 12/17] crypto: sparc - initialize blkcipher.ivsize Greg Kroah-Hartman
@ 2015-10-23 17:44 ` Greg Kroah-Hartman
  2015-10-23 17:44 ` [PATCH 3.10 14/17] i2c: rcar: enable RuntimePM before registering to the core Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Russell King, Herbert Xu

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Russell King <rmk+kernel@arm.linux.org.uk>

commit 8996eafdcbad149ac0f772fb1649fbb75c482a6a upstream.

Unlike shash algorithms, ahash drivers must implement export
and import as their descriptors may contain hardware state and
cannot be exported as is.  Unfortunately some ahash drivers did
not provide them and end up causing crashes with algif_hash.

This patch adds a check to prevent these drivers from registering
ahash algorithms until they are fixed.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/ahash.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -462,7 +462,8 @@ static int ahash_prepare_alg(struct ahas
 	struct crypto_alg *base = &alg->halg.base;
 
 	if (alg->halg.digestsize > PAGE_SIZE / 8 ||
-	    alg->halg.statesize > PAGE_SIZE / 8)
+	    alg->halg.statesize > PAGE_SIZE / 8 ||
+	    alg->halg.statesize == 0)
 		return -EINVAL;
 
 	base->cra_type = &crypto_ahash_type;



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 14/17] i2c: rcar: enable RuntimePM before registering to the core
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2015-10-23 17:44 ` [PATCH 3.10 13/17] crypto: ahash - ensure statesize is non-zero Greg Kroah-Hartman
@ 2015-10-23 17:44 ` Greg Kroah-Hartman
  2015-10-23 17:45 ` [PATCH 3.10 15/17] workqueue: make sure delayed work run in local cpu Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven, Wolfram Sang,
	Wolfram Sang

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Wolfram Sang <wsa+renesas@sang-engineering.com>

commit 4f7effddf4549d57114289f273710f077c4c330a upstream.

The core may register clients attached to this master which may use
funtionality from the master. So, RuntimePM must be enabled before, otherwise
this will fail. While here, move drvdata, too.

Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/i2c/busses/i2c-rcar.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -673,15 +673,16 @@ static int rcar_i2c_probe(struct platfor
 		return ret;
 	}
 
+	pm_runtime_enable(dev);
+	platform_set_drvdata(pdev, priv);
+
 	ret = i2c_add_numbered_adapter(adap);
 	if (ret < 0) {
 		dev_err(dev, "reg adap failed: %d\n", ret);
+		pm_runtime_disable(dev);
 		return ret;
 	}
 
-	pm_runtime_enable(dev);
-	platform_set_drvdata(pdev, priv);
-
 	dev_info(dev, "probed\n");
 
 	return 0;



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 15/17] workqueue: make sure delayed work run in local cpu
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2015-10-23 17:44 ` [PATCH 3.10 14/17] i2c: rcar: enable RuntimePM before registering to the core Greg Kroah-Hartman
@ 2015-10-23 17:45 ` Greg Kroah-Hartman
  2015-10-23 17:45 ` [PATCH 3.10 16/17] dm thin: fix missing pool reference count decrement in pool_ctr error path Greg Kroah-Hartman
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Shaohua Li, Tejun Heo

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Shaohua Li <shli@fb.com>

commit 874bbfe600a660cba9c776b3957b1ce393151b76 upstream.

My system keeps crashing with below message. vmstat_update() schedules a delayed
work in current cpu and expects the work runs in the cpu.
schedule_delayed_work() is expected to make delayed work run in local cpu. The
problem is timer can be migrated with NO_HZ. __queue_work() queues work in
timer handler, which could run in a different cpu other than where the delayed
work is scheduled. The end result is the delayed work runs in different cpu.
The patch makes __queue_delayed_work records local cpu earlier. Where the timer
runs doesn't change where the work runs with the change.

[   28.010131] ------------[ cut here ]------------
[   28.010609] kernel BUG at ../mm/vmstat.c:1392!
[   28.011099] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC KASAN
[   28.011860] Modules linked in:
[   28.012245] CPU: 0 PID: 289 Comm: kworker/0:3 Tainted: G        W4.3.0-rc3+ #634
[   28.013065] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140709_153802- 04/01/2014
[   28.014160] Workqueue: events vmstat_update
[   28.014571] task: ffff880117682580 ti: ffff8800ba428000 task.ti: ffff8800ba428000
[   28.015445] RIP: 0010:[<ffffffff8115f921>]  [<ffffffff8115f921>]vmstat_update+0x31/0x80
[   28.016282] RSP: 0018:ffff8800ba42fd80  EFLAGS: 00010297
[   28.016812] RAX: 0000000000000000 RBX: ffff88011a858dc0 RCX:0000000000000000
[   28.017585] RDX: ffff880117682580 RSI: ffffffff81f14d8c RDI:ffffffff81f4df8d
[   28.018366] RBP: ffff8800ba42fd90 R08: 0000000000000001 R09:0000000000000000
[   28.019169] R10: 0000000000000000 R11: 0000000000000121 R12:ffff8800baa9f640
[   28.019947] R13: ffff88011a81e340 R14: ffff88011a823700 R15:0000000000000000
[   28.020071] FS:  0000000000000000(0000) GS:ffff88011a800000(0000)knlGS:0000000000000000
[   28.020071] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   28.020071] CR2: 00007ff6144b01d0 CR3: 00000000b8e93000 CR4:00000000000006f0
[   28.020071] Stack:
[   28.020071]  ffff88011a858dc0 ffff8800baa9f640 ffff8800ba42fe00ffffffff8106bd88
[   28.020071]  ffffffff8106bd0b 0000000000000096 0000000000000000ffffffff82f9b1e8
[   28.020071]  ffffffff829f0b10 0000000000000000 ffffffff81f18460ffff88011a81e340
[   28.020071] Call Trace:
[   28.020071]  [<ffffffff8106bd88>] process_one_work+0x1c8/0x540
[   28.020071]  [<ffffffff8106bd0b>] ? process_one_work+0x14b/0x540
[   28.020071]  [<ffffffff8106c214>] worker_thread+0x114/0x460
[   28.020071]  [<ffffffff8106c100>] ? process_one_work+0x540/0x540
[   28.020071]  [<ffffffff81071bf8>] kthread+0xf8/0x110
[   28.020071]  [<ffffffff81071b00>] ?kthread_create_on_node+0x200/0x200
[   28.020071]  [<ffffffff81a6522f>] ret_from_fork+0x3f/0x70
[   28.020071]  [<ffffffff81071b00>] ?kthread_create_on_node+0x200/0x200

Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/workqueue.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1450,13 +1450,13 @@ static void __queue_delayed_work(int cpu
 	timer_stats_timer_set_start_info(&dwork->timer);
 
 	dwork->wq = wq;
+	/* timer isn't guaranteed to run in this cpu, record earlier */
+	if (cpu == WORK_CPU_UNBOUND)
+		cpu = raw_smp_processor_id();
 	dwork->cpu = cpu;
 	timer->expires = jiffies + delay;
 
-	if (unlikely(cpu != WORK_CPU_UNBOUND))
-		add_timer_on(timer, cpu);
-	else
-		add_timer(timer);
+	add_timer_on(timer, cpu);
 }
 
 /**



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 16/17] dm thin: fix missing pool reference count decrement in pool_ctr error path
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2015-10-23 17:45 ` [PATCH 3.10 15/17] workqueue: make sure delayed work run in local cpu Greg Kroah-Hartman
@ 2015-10-23 17:45 ` Greg Kroah-Hartman
  2015-10-23 17:45 ` [PATCH 3.10 17/17] rbd: fix double free on rbd_dev->header_name Greg Kroah-Hartman
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Mike Snitzer

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Mike Snitzer <snitzer@redhat.com>

commit ba30670f4d5292c4e7f7980bbd5071f7c4794cdd upstream.

Fixes: ac8c3f3df ("dm thin: generate event when metadata threshold passed")
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/md/dm-thin.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -2109,7 +2109,7 @@ static int pool_ctr(struct dm_target *ti
 						metadata_low_callback,
 						pool);
 	if (r)
-		goto out_free_pt;
+		goto out_flags_changed;
 
 	pt->callbacks.congested_fn = pool_is_congested;
 	dm_table_add_target_callbacks(ti->table, &pt->callbacks);



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 17/17] rbd: fix double free on rbd_dev->header_name
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2015-10-23 17:45 ` [PATCH 3.10 16/17] dm thin: fix missing pool reference count decrement in pool_ctr error path Greg Kroah-Hartman
@ 2015-10-23 17:45 ` Greg Kroah-Hartman
  2015-10-23 21:07 ` [PATCH 3.10 00/17] 3.10.92-stable review Shuah Khan
  2015-10-24  2:01 ` Guenter Roeck
  18 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-23 17:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ilya Dryomov, Alex Elder

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ilya Dryomov <idryomov@gmail.com>

commit 3ebe138ac642a195c7f2efdb918f464734421fd6 upstream.

If rbd_dev_image_probe() in rbd_dev_probe_parent() fails, header_name
is freed twice: once in rbd_dev_probe_parent() and then in its caller
rbd_dev_image_probe() (rbd_dev_image_probe() is called recursively to
handle parent images).

rbd_dev_probe_parent() is responsible for probing the parent, so it
shouldn't muck with clone's fields.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/block/rbd.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -4860,7 +4860,6 @@ static int rbd_dev_probe_parent(struct r
 out_err:
 	if (parent) {
 		rbd_dev_unparent(rbd_dev);
-		kfree(rbd_dev->header_name);
 		rbd_dev_destroy(parent);
 	} else {
 		rbd_put_client(rbdc);



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3.10 00/17] 3.10.92-stable review
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2015-10-23 17:45 ` [PATCH 3.10 17/17] rbd: fix double free on rbd_dev->header_name Greg Kroah-Hartman
@ 2015-10-23 21:07 ` Shuah Khan
  2015-10-24  2:01 ` Guenter Roeck
  18 siblings, 0 replies; 20+ messages in thread
From: Shuah Khan @ 2015-10-23 21:07 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel; +Cc: torvalds, akpm, linux, shuah.kh, stable

On 10/23/2015 11:44 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.92 release.
> There are 17 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Sun Oct 25 17:44:42 UTC 2015.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	kernel.org/pub/linux/kernel/v3.x/stable-review/patch-3.10.92-rc1.gz
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h

Compiled and booted on my test system. No dmesg regressions.

thanks,
-- Shuah


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3.10 00/17] 3.10.92-stable review
  2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2015-10-23 21:07 ` [PATCH 3.10 00/17] 3.10.92-stable review Shuah Khan
@ 2015-10-24  2:01 ` Guenter Roeck
  18 siblings, 0 replies; 20+ messages in thread
From: Guenter Roeck @ 2015-10-24  2:01 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel; +Cc: torvalds, akpm, shuah.kh, stable

On 10/23/2015 10:44 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.92 release.
> There are 17 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Sun Oct 25 17:44:42 UTC 2015.
> Anything received after that time might be too late.
>

Build results:
	total: 121 pass: 121 fail: 0
Qemu test results:
	total: 70 pass: 70 fail: 0

Details are available at http://server.roeck-us.net:8010/builders.

Guenter


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2015-10-24  2:01 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-23 17:44 [PATCH 3.10 00/17] 3.10.92-stable review Greg Kroah-Hartman
2015-10-23 17:44 ` [PATCH 3.10 01/17] l2tp: protect tunnel->del_work by ref_count Greg Kroah-Hartman
2015-10-23 17:44 ` [PATCH 3.10 02/17] af_unix: Convert the unix_sk macro to an inline function for type safety Greg Kroah-Hartman
2015-10-23 17:44 ` [PATCH 3.10 03/17] af_unix: return data from multiple SKBs on recv() with MSG_PEEK flag Greg Kroah-Hartman
2015-10-23 17:44 ` [PATCH 3.10 04/17] skbuff: Fix skb checksum flag on skb pull Greg Kroah-Hartman
2015-10-23 17:44 ` [PATCH 3.10 05/17] skbuff: Fix skb checksum partial check Greg Kroah-Hartman
2015-10-23 17:44 ` [PATCH 3.10 06/17] net: add pfmemalloc check in sk_add_backlog() Greg Kroah-Hartman
2015-10-23 17:44 ` [PATCH 3.10 07/17] ppp: dont override sk->sk_state in pppoe_flush_dev() Greg Kroah-Hartman
2015-10-23 17:44 ` [PATCH 3.10 08/17] ethtool: Use kcalloc instead of kmalloc for ethtool_get_strings Greg Kroah-Hartman
2015-10-23 17:44 ` [PATCH 3.10 09/17] asix: Dont reset PHY on if_up for ASIX 88772 Greg Kroah-Hartman
2015-10-23 17:44 ` [PATCH 3.10 10/17] asix: Do full reset during ax88772_bind Greg Kroah-Hartman
2015-10-23 17:44 ` [PATCH 3.10 11/17] m68k/uaccess: Fix asm constraints for userspace access Greg Kroah-Hartman
2015-10-23 17:44 ` [PATCH 3.10 12/17] crypto: sparc - initialize blkcipher.ivsize Greg Kroah-Hartman
2015-10-23 17:44 ` [PATCH 3.10 13/17] crypto: ahash - ensure statesize is non-zero Greg Kroah-Hartman
2015-10-23 17:44 ` [PATCH 3.10 14/17] i2c: rcar: enable RuntimePM before registering to the core Greg Kroah-Hartman
2015-10-23 17:45 ` [PATCH 3.10 15/17] workqueue: make sure delayed work run in local cpu Greg Kroah-Hartman
2015-10-23 17:45 ` [PATCH 3.10 16/17] dm thin: fix missing pool reference count decrement in pool_ctr error path Greg Kroah-Hartman
2015-10-23 17:45 ` [PATCH 3.10 17/17] rbd: fix double free on rbd_dev->header_name Greg Kroah-Hartman
2015-10-23 21:07 ` [PATCH 3.10 00/17] 3.10.92-stable review Shuah Khan
2015-10-24  2:01 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.