Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1254799 > unrolled thread

[PATCH 4.1 00/46] 4.1.12-stable review

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2015-10-23 20:10 +0200
Last post2015-10-24 15:30 +0200
Articles 20 on this page of 22 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 4.1 00/46] 4.1.12-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
    [PATCH 4.1 05/46] inet: fix races in reqsk_queue_hash_req() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
    [PATCH 4.1 06/46] net: add pfmemalloc check in sk_add_backlog() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
    [PATCH 4.1 04/46] skbuff: Fix skb checksum partial check. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
    [PATCH 4.1 02/46] l2tp: protect tunnel->del_work by ref_count Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
    [PATCH 4.1 16/46] af_unix: return data from multiple SKBs on recv() with MSG_PEEK flag Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
    [PATCH 4.1 30/46] i2c: designware-platdrv: enable RuntimePM before registering to the core Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
    [PATCH 4.1 29/46] i2c: designware: Do not use parameters from ACPI on Dell Inspiron 7348 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
    [PATCH 4.1 34/46] drm/radeon: attach tile property to mst connector Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
    [PATCH 4.1 17/46] net/unix: fix logic about sk_peek_offset Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
    [PATCH 4.1 32/46] drm/nouveau/fbcon: take runpm reference when userspace has an open fd Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
    [PATCH 4.1 09/46] bpf: fix panic in SO_GET_FILTER with native ebpf programs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
    [PATCH 4.1 27/46] i2c: rcar: enable RuntimePM before registering to the core Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
    [PATCH 4.1 31/46] workqueue: make sure delayed work run in local cpu Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
    [PATCH 4.1 39/46] sched/preempt: Fix cond_resched_lock() and cond_resched_softirq() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-23 20:10 +0200
      Re: [PATCH 4.1 39/46] sched/preempt: Fix cond_resched_lock() and  cond_resched_softirq() Thomas Backlund <backlund.thomas@gmail.com> - 2015-10-23 22:20 +0200
        Re: [PATCH 4.1 39/46] sched/preempt: Fix cond_resched_lock() and  cond_resched_softirq() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-24 01:30 +0200
    Re: [PATCH 4.1 00/46] 4.1.12-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2015-10-23 22:40 +0200
      Re: [PATCH 4.1 00/46] 4.1.12-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-24 01:30 +0200
        Re: [PATCH 4.1 00/46] 4.1.12-stable review Guenter Roeck <linux@roeck-us.net> - 2015-10-24 03:20 +0200
    Re: [PATCH 4.1 00/46] 4.1.12-stable review Guenter Roeck <linux@roeck-us.net> - 2015-10-24 05:20 +0200
      Re: [PATCH 4.1 00/46] 4.1.12-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-24 15:30 +0200

Page 1 of 2  [1] 2  Next page →


#1254799 — [PATCH 4.1 00/46] 4.1.12-stable review

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 00/46] 4.1.12-stable review
Message-ID<qmONc-d5-11@gated-at.bofh.it>
This is the start of the stable review cycle for the 4.1.12 release.
There are 46 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:46:11 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/v4.x/stable-review/patch-4.1.12-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h

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

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

Jeff Layton <jeff.layton@primarydata.com>
    nfs4: have do_vfs_lock take an inode pointer

Jeff Layton <jeff.layton@primarydata.com>
    locks: inline posix_lock_file_wait and flock_lock_file_wait

Jeff Layton <jeff.layton@primarydata.com>
    locks: new helpers - flock_lock_inode_wait and posix_lock_inode_wait

Jeff Layton <jeff.layton@primarydata.com>
    locks: have flock_lock_file take an inode pointer instead of a filp

Steve Wise <swise@opengridcomputing.com>
    svcrdma: handle rdma read with a non-zero initial page offset

Steve Capper <steve.capper@linaro.org>
    arm64: Fix THP protection change logic

Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    pinctrl: imx25: ensure that a pin with id i is at position i in the info array

Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
    sched/preempt: Fix cond_resched_lock() and cond_resched_softirq()

Frederic Weisbecker <fweisbec@gmail.com>
    sched/preempt: Rename PREEMPT_CHECK_OFFSET to PREEMPT_DISABLE_OFFSET

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

Alex Deucher <alexander.deucher@amd.com>
    drm/radeon: add pm sysfs files late

Dave Airlie <airlied@redhat.com>
    drm/radeon: attach tile property to mst connector

Dave Airlie <airlied@gmail.com>
    drm/dp/mst: make mst i2c transfer code more robust.

Ben Skeggs <bskeggs@redhat.com>
    drm/nouveau/fbcon: take runpm reference when userspace has an open fd

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

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

Mika Westerberg <mika.westerberg@linux.intel.com>
    i2c: designware: Do not use parameters from ACPI on Dell Inspiron 7348

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

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

Javier Martinez Canillas <javier@osg.samsung.com>
    mfd: max77843: Fix max77843_chg_init() return on error

Christoph Hellwig <hch@lst.de>
    nfsd/blocklayout: accept any minlength

Will Deacon <will.deacon@arm.com>
    arm64: errata: use KBUILD_CFLAGS_MODULE for erratum #843419

Chris Mason <clm@fb.com>
    btrfs: fix use after free iterating extrefs

David Sterba <dsterba@suse.com>
    btrfs: check unsupported filters in balance arguments

Shaohua Li <shli@fb.com>
    memcg: convert threshold to bytes

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

Daniel Vetter <daniel.vetter@ffwll.ch>
    drm: Fix locking for sysfs dpms file

Andrey Vagin <avagin@openvz.org>
    net/unix: fix logic about sk_peek_offset

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

Arad, Ronen <ronen.arad@intel.com>
    netlink: Trim skb to alloc size to avoid MSG_TRUNC

Jon Paul Maloy <jon.maloy@ericsson.com>
    tipc: move fragment importance field to new header position

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

WANG Cong <xiyou.wangcong@gmail.com>
    act_mirred: clear sender cpu before sending to tx

Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
    ovs: do not allocate memory from offline numa node

Daniel Borkmann <daniel@iogearbox.net>
    bpf: fix panic in SO_GET_FILTER with native ebpf programs

Eric Dumazet <edumazet@google.com>
    inet: fix race in reqsk_queue_unlink()

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()

Eric Dumazet <edumazet@google.com>
    inet: fix races in reqsk_queue_hash_req()

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

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

Ivan Mikhaylov <ivan@ru.ibm.com>
    net/ibm/emac: bump version numbers for correct work with ethtool


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

Diffstat:

 Makefile                                    |  4 +-
 arch/arm64/Makefile                         |  2 +-
 arch/arm64/include/asm/pgtable.h            |  4 +-
 arch/sparc/crypto/aes_glue.c                |  2 +
 arch/sparc/crypto/camellia_glue.c           |  1 +
 arch/sparc/crypto/des_glue.c                |  2 +
 arch/x86/include/asm/preempt.h              |  4 +-
 crypto/ahash.c                              |  3 +-
 drivers/block/rbd.c                         |  1 -
 drivers/gpu/drm/drm_dp_mst_topology.c       |  3 +-
 drivers/gpu/drm/drm_sysfs.c                 | 12 ++----
 drivers/gpu/drm/nouveau/nouveau_fbcon.c     | 24 +++++++++++
 drivers/gpu/drm/radeon/radeon_display.c     | 14 +------
 drivers/gpu/drm/radeon/radeon_dp_mst.c      |  1 +
 drivers/gpu/drm/radeon/radeon_pm.c          | 63 +++++++++++++++++------------
 drivers/i2c/busses/i2c-designware-platdrv.c | 33 ++++++++++++---
 drivers/i2c/busses/i2c-rcar.c               |  7 ++--
 drivers/i2c/busses/i2c-s3c2410.c            |  8 ++--
 drivers/md/dm-thin.c                        |  2 +-
 drivers/mfd/max77843.c                      |  2 +-
 drivers/net/ethernet/ibm/emac/core.h        |  6 +--
 drivers/net/ppp/pppoe.c                     |  1 -
 drivers/pinctrl/freescale/pinctrl-imx25.c   |  4 +-
 fs/btrfs/backref.c                          |  8 ++--
 fs/btrfs/ioctl.c                            |  5 +++
 fs/btrfs/volumes.h                          |  8 ++++
 fs/locks.c                                  | 38 +++++++++--------
 fs/nfs/nfs4proc.c                           | 16 ++++----
 fs/nfsd/blocklayout.c                       |  8 ----
 include/asm-generic/preempt.h               |  5 ++-
 include/drm/drm_dp_mst_helper.h             |  3 +-
 include/linux/fs.h                          | 30 +++++++++-----
 include/linux/preempt.h                     |  5 ++-
 include/linux/preempt_mask.h                | 16 ++++++--
 include/linux/sched.h                       |  6 ---
 include/linux/skbuff.h                      |  3 ++
 include/net/af_unix.h                       |  6 ++-
 include/net/sock.h                          |  8 ++++
 kernel/sched/core.c                         |  6 +--
 kernel/workqueue.c                          |  8 ++--
 mm/memcontrol.c                             |  1 +
 net/core/ethtool.c                          |  2 +-
 net/core/filter.c                           |  6 ++-
 net/core/skbuff.c                           |  9 +++--
 net/ipv4/inet_connection_sock.c             | 27 +++++++------
 net/l2tp/l2tp_core.c                        | 11 ++++-
 net/netlink/af_netlink.c                    | 34 ++++++++++------
 net/openvswitch/flow_table.c                |  3 +-
 net/sched/act_mirred.c                      |  1 +
 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c     |  6 ++-
 net/tipc/msg.h                              |  4 +-
 net/unix/af_unix.c                          | 16 +++++++-
 52 files changed, 314 insertions(+), 188 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1254800 — [PATCH 4.1 05/46] inet: fix races in reqsk_queue_hash_req()

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 05/46] inet: fix races in reqsk_queue_hash_req()
Message-ID<qmOWT-DI-43@gated-at.bofh.it>
In reply to#1254799
4.1-stable review patch.  If anyone has any objections, please let me know.

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

From: Eric Dumazet <edumazet@google.com>

[ Upstream commit 29c6852602e259d2c1882f320b29d5c3fec0de04 ]

Before allowing lockless LISTEN processing, we need to make
sure to arm the SYN_RECV timer before the req socket is visible
in hash tables.

Also, req->rsk_hash should be written before we set rsk_refcnt
to a non zero value.

Fixes: fa76ce7328b2 ("inet: get rid of central tcp/dccp listener timer")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ying Cai <ycai@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ipv4/inet_connection_sock.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -676,20 +676,20 @@ void reqsk_queue_hash_req(struct request
 	req->num_timeout = 0;
 	req->sk = NULL;
 
+	setup_timer(&req->rsk_timer, reqsk_timer_handler, (unsigned long)req);
+	mod_timer_pinned(&req->rsk_timer, jiffies + timeout);
+	req->rsk_hash = hash;
+
 	/* before letting lookups find us, make sure all req fields
 	 * are committed to memory and refcnt initialized.
 	 */
 	smp_wmb();
 	atomic_set(&req->rsk_refcnt, 2);
-	setup_timer(&req->rsk_timer, reqsk_timer_handler, (unsigned long)req);
-	req->rsk_hash = hash;
 
 	spin_lock(&queue->syn_wait_lock);
 	req->dl_next = lopt->syn_table[hash];
 	lopt->syn_table[hash] = req;
 	spin_unlock(&queue->syn_wait_lock);
-
-	mod_timer_pinned(&req->rsk_timer, jiffies + timeout);
 }
 EXPORT_SYMBOL(reqsk_queue_hash_req);
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254801 — [PATCH 4.1 06/46] net: add pfmemalloc check in sk_add_backlog()

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 06/46] net: add pfmemalloc check in sk_add_backlog()
Message-ID<qmOWT-DI-47@gated-at.bofh.it>
In reply to#1254799
4.1-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
@@ -826,6 +826,14 @@ static inline __must_check int sk_add_ba
 	if (sk_rcvqueues_full(sk, 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;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254802 — [PATCH 4.1 04/46] skbuff: Fix skb checksum partial check.

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 04/46] skbuff: Fix skb checksum partial check.
Message-ID<qmOWT-DI-53@gated-at.bofh.it>
In reply to#1254799
4.1-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
@@ -2589,7 +2589,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
@@ -2976,11 +2976,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);
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254803 — [PATCH 4.1 02/46] l2tp: protect tunnel->del_work by ref_count

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 02/46] l2tp: protect tunnel->del_work by ref_count
Message-ID<qmOWT-DI-55@gated-at.bofh.it>
In reply to#1254799
4.1-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
@@ -1319,7 +1319,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;
 
@@ -1340,6 +1340,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
@@ -1639,8 +1641,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);
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254804 — [PATCH 4.1 16/46] af_unix: return data from multiple SKBs on recv() with MSG_PEEK flag

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 16/46] af_unix: return data from multiple SKBs on recv() with MSG_PEEK flag
Message-ID<qmOWT-DI-57@gated-at.bofh.it>
In reply to#1254799
4.1-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
@@ -2046,8 +2046,20 @@ again:
 			if (UNIXCB(skb).fp)
 				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);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254805 — [PATCH 4.1 30/46] i2c: designware-platdrv: enable RuntimePM before registering to the core

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 30/46] i2c: designware-platdrv: enable RuntimePM before registering to the core
Message-ID<qmOWU-DI-59@gated-at.bofh.it>
In reply to#1254799
4.1-stable review patch.  If anyone has any objections, please let me know.

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

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

commit 36d48fb5766aee9717e429f772046696b215282d 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.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/i2c/busses/i2c-designware-platdrv.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -273,12 +273,6 @@ static int dw_i2c_probe(struct platform_
 	adap->dev.parent = &pdev->dev;
 	adap->dev.of_node = pdev->dev.of_node;
 
-	r = i2c_add_numbered_adapter(adap);
-	if (r) {
-		dev_err(&pdev->dev, "failure adding adapter\n");
-		return r;
-	}
-
 	if (dev->pm_runtime_disabled) {
 		pm_runtime_forbid(&pdev->dev);
 	} else {
@@ -288,6 +282,13 @@ static int dw_i2c_probe(struct platform_
 		pm_runtime_enable(&pdev->dev);
 	}
 
+	r = i2c_add_numbered_adapter(adap);
+	if (r) {
+		dev_err(&pdev->dev, "failure adding adapter\n");
+		pm_runtime_disable(&pdev->dev);
+		return r;
+	}
+
 	return 0;
 }
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254806 — [PATCH 4.1 29/46] i2c: designware: Do not use parameters from ACPI on Dell Inspiron 7348

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 29/46] i2c: designware: Do not use parameters from ACPI on Dell Inspiron 7348
Message-ID<qmOWU-DI-61@gated-at.bofh.it>
In reply to#1254799
4.1-stable review patch.  If anyone has any objections, please let me know.

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

From: Mika Westerberg <mika.westerberg@linux.intel.com>

commit 56d4b8a24cef5d66f0d10ac778a520d3c2c68a48 upstream.

ACPI SSCN/FMCN methods were originally added because then the platform can
provide the most accurate HCNT/LCNT values to the driver. However, this
seems not to be true for Dell Inspiron 7348 where using these causes the
touchpad to fail in boot:

  i2c_hid i2c-DLL0675:00: failed to retrieve report from device.
  i2c_designware INT3433:00: i2c_dw_handle_tx_abort: lost arbitration
  i2c_hid i2c-DLL0675:00: failed to retrieve report from device.
  i2c_designware INT3433:00: controller timed out

The values received from ACPI are (in fast mode):

  HCNT: 72
  LCNT: 160

this translates to following timings (input clock is 100MHz on Broadwell):

  tHIGH: 720 ns (spec min 600 ns)
  tLOW: 1600 ns (spec min 1300 ns)
  Bus period: 2920 ns (assuming 300 ns tf and tr)
  Bus speed: 342.5 kHz

Both tHIGH and tLOW are within the I2C specification.

The calculated values when ACPI parameters are not used are (in fast mode):

  HCNT: 87
  LCNT: 159

which translates to:

  tHIGH: 870 ns (spec min 600 ns)
  tLOW: 1590 ns (spec min 1300 ns)
  Bus period 3060 ns (assuming 300 ns tf and tr)
  Bus speed 326.8 kHz

These values are also within the I2C specification.

Since both ACPI and calculated values meet the I2C specification timing
requirements it is hard to say why the touchpad does not function properly
with the ACPI values except that the bus speed is higher in this case (but
still well below the max 400kHz).

Solve this by adding DMI quirk to the driver that disables using ACPI
parameters on this particulare machine.

Reported-by: Pavel Roskin <plroskin@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Pavel Roskin <plroskin@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/i2c/busses/i2c-designware-platdrv.c |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -24,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/delay.h>
+#include <linux/dmi.h>
 #include <linux/i2c.h>
 #include <linux/clk.h>
 #include <linux/clk-provider.h>
@@ -51,6 +52,22 @@ static u32 i2c_dw_get_clk_rate_khz(struc
 }
 
 #ifdef CONFIG_ACPI
+/*
+ * The HCNT/LCNT information coming from ACPI should be the most accurate
+ * for given platform. However, some systems get it wrong. On such systems
+ * we get better results by calculating those based on the input clock.
+ */
+static const struct dmi_system_id dw_i2c_no_acpi_params[] = {
+	{
+		.ident = "Dell Inspiron 7348",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 7348"),
+		},
+	},
+	{ }
+};
+
 static void dw_i2c_acpi_params(struct platform_device *pdev, char method[],
 			       u16 *hcnt, u16 *lcnt, u32 *sda_hold)
 {
@@ -58,6 +75,9 @@ static void dw_i2c_acpi_params(struct pl
 	acpi_handle handle = ACPI_HANDLE(&pdev->dev);
 	union acpi_object *obj;
 
+	if (dmi_check_system(dw_i2c_no_acpi_params))
+		return;
+
 	if (ACPI_FAILURE(acpi_evaluate_object(handle, method, NULL, &buf)))
 		return;
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254807 — [PATCH 4.1 34/46] drm/radeon: attach tile property to mst connector

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 34/46] drm/radeon: attach tile property to mst connector
Message-ID<qmOWU-DI-63@gated-at.bofh.it>
In reply to#1254799
4.1-stable review patch.  If anyone has any objections, please let me know.

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

From: Dave Airlie <airlied@redhat.com>

commit bc8c131ccdd62d4ed4f33c6b50f92907e7c32dee upstream.

This allows tiled monitors to work with radeon once mst is enabled.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/radeon/radeon_dp_mst.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
+++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
@@ -283,6 +283,7 @@ static struct drm_connector *radeon_dp_a
 	radeon_connector->mst_encoder = radeon_dp_create_fake_mst_encoder(master);
 
 	drm_object_attach_property(&connector->base, dev->mode_config.path_property, 0);
+	drm_object_attach_property(&connector->base, dev->mode_config.tile_property, 0);
 	drm_mode_connector_set_path_property(connector, pathprop);
 	drm_reinit_primary_mode_group(dev);
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254809 — [PATCH 4.1 17/46] net/unix: fix logic about sk_peek_offset

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 17/46] net/unix: fix logic about sk_peek_offset
Message-ID<qmOWU-DI-67@gated-at.bofh.it>
In reply to#1254799
4.1-stable review patch.  If anyone has any objections, please let me know.

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

From: Andrey Vagin <avagin@openvz.org>

[ Upstream commit e9193d60d363e4dff75ff6d43a48f22be26d59c7 ]

Now send with MSG_PEEK can return data from multiple SKBs.

Unfortunately we take into account the peek offset for each skb,
that is wrong. We need to apply the peek offset only once.

In addition, the peek offset should be used only if MSG_PEEK is set.

Cc: "David S. Miller" <davem@davemloft.net> (maintainer:NETWORKING
Cc: Eric Dumazet <edumazet@google.com> (commit_signer:1/14=7%)
Cc: Aaron Conole <aconole@bytheb.org>
Fixes: 9f389e35674f ("af_unix: return data from multiple SKBs on recv() with MSG_PEEK flag")
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Tested-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 |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1938,6 +1938,11 @@ static int unix_stream_recvmsg(struct so
 		goto out;
 	}
 
+	if (flags & MSG_PEEK)
+		skip = sk_peek_offset(sk, flags);
+	else
+		skip = 0;
+
 	do {
 		int chunk;
 		struct sk_buff *skb, *last;
@@ -1984,7 +1989,6 @@ again:
 			break;
 		}
 
-		skip = sk_peek_offset(sk, flags);
 		while (skip >= unix_skb_len(skb)) {
 			skip -= unix_skb_len(skb);
 			last = skb;
@@ -2046,14 +2050,12 @@ again:
 			if (UNIXCB(skb).fp)
 				scm.fp = scm_fp_dup(UNIXCB(skb).fp);
 
-			if (skip) {
-				sk_peek_offset_fwd(sk, chunk);
-				skip -= chunk;
-			}
+			sk_peek_offset_fwd(sk, chunk);
 
 			if (UNIXCB(skb).fp)
 				break;
 
+			skip = 0;
 			last = skb;
 			unix_state_lock(sk);
 			skb = skb_peek_next(skb, &sk->sk_receive_queue);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254810 — [PATCH 4.1 32/46] drm/nouveau/fbcon: take runpm reference when userspace has an open fd

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 32/46] drm/nouveau/fbcon: take runpm reference when userspace has an open fd
Message-ID<qmOWU-DI-71@gated-at.bofh.it>
In reply to#1254799
4.1-stable review patch.  If anyone has any objections, please let me know.

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

From: Ben Skeggs <bskeggs@redhat.com>

commit f231976c2e8964ceaa9250e57d27c35ff03825c2 upstream.

We need to do this in order to prevent accesses to the device while it's
powered down.  Userspace may have an mmap of the fb, and there's no good
way (that I know of) to prevent it from touching the device otherwise.

This fixes some nasty races between runpm and plymouth on some systems,
which result in the GPU getting very upset and hanging the boot.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/nouveau/nouveau_fbcon.c |   24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -178,8 +178,30 @@ nouveau_fbcon_sync(struct fb_info *info)
 	return 0;
 }
 
+static int
+nouveau_fbcon_open(struct fb_info *info, int user)
+{
+	struct nouveau_fbdev *fbcon = info->par;
+	struct nouveau_drm *drm = nouveau_drm(fbcon->dev);
+	int ret = pm_runtime_get_sync(drm->dev->dev);
+	if (ret < 0 && ret != -EACCES)
+		return ret;
+	return 0;
+}
+
+static int
+nouveau_fbcon_release(struct fb_info *info, int user)
+{
+	struct nouveau_fbdev *fbcon = info->par;
+	struct nouveau_drm *drm = nouveau_drm(fbcon->dev);
+	pm_runtime_put(drm->dev->dev);
+	return 0;
+}
+
 static struct fb_ops nouveau_fbcon_ops = {
 	.owner = THIS_MODULE,
+	.fb_open = nouveau_fbcon_open,
+	.fb_release = nouveau_fbcon_release,
 	.fb_check_var = drm_fb_helper_check_var,
 	.fb_set_par = drm_fb_helper_set_par,
 	.fb_fillrect = nouveau_fbcon_fillrect,
@@ -195,6 +217,8 @@ static struct fb_ops nouveau_fbcon_ops =
 
 static struct fb_ops nouveau_fbcon_sw_ops = {
 	.owner = THIS_MODULE,
+	.fb_open = nouveau_fbcon_open,
+	.fb_release = nouveau_fbcon_release,
 	.fb_check_var = drm_fb_helper_check_var,
 	.fb_set_par = drm_fb_helper_set_par,
 	.fb_fillrect = cfb_fillrect,


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254811 — [PATCH 4.1 09/46] bpf: fix panic in SO_GET_FILTER with native ebpf programs

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 09/46] bpf: fix panic in SO_GET_FILTER with native ebpf programs
Message-ID<qmOWV-DI-73@gated-at.bofh.it>
In reply to#1254799
4.1-stable review patch.  If anyone has any objections, please let me know.

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

From: Daniel Borkmann <daniel@iogearbox.net>

[ Upstream commit 93d08b6966cf730ea669d4d98f43627597077153 ]

When sockets have a native eBPF program attached through
setsockopt(sk, SOL_SOCKET, SO_ATTACH_BPF, ...), and then try to
dump these over getsockopt(sk, SOL_SOCKET, SO_GET_FILTER, ...),
the following panic appears:

  [49904.178642] BUG: unable to handle kernel NULL pointer dereference at (null)
  [49904.178762] IP: [<ffffffff81610fd9>] sk_get_filter+0x39/0x90
  [49904.182000] PGD 86fc9067 PUD 531a1067 PMD 0
  [49904.185196] Oops: 0000 [#1] SMP
  [...]
  [49904.224677] Call Trace:
  [49904.226090]  [<ffffffff815e3d49>] sock_getsockopt+0x319/0x740
  [49904.227535]  [<ffffffff812f59e3>] ? sock_has_perm+0x63/0x70
  [49904.228953]  [<ffffffff815e2fc8>] ? release_sock+0x108/0x150
  [49904.230380]  [<ffffffff812f5a43>] ? selinux_socket_getsockopt+0x23/0x30
  [49904.231788]  [<ffffffff815dff36>] SyS_getsockopt+0xa6/0xc0
  [49904.233267]  [<ffffffff8171b9ae>] entry_SYSCALL_64_fastpath+0x12/0x71

The underlying issue is the very same as in commit b382c0865600
("sock, diag: fix panic in sock_diag_put_filterinfo"), that is,
native eBPF programs don't store an original program since this
is only needed in cBPF ones.

However, sk_get_filter() wasn't updated to test for this at the
time when eBPF could be attached. Just throw an error to the user
to indicate that eBPF cannot be dumped over this interface.
That way, it can also be known that a program _is_ attached (as
opposed to just return 0), and a different (future) method needs
to be consulted for a dump.

Fixes: 89aa075832b0 ("net: sock: allow eBPF programs to be attached to sockets")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/core/filter.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -1526,9 +1526,13 @@ int sk_get_filter(struct sock *sk, struc
 		goto out;
 
 	/* We're copying the filter that has been originally attached,
-	 * so no conversion/decode needed anymore.
+	 * so no conversion/decode needed anymore. eBPF programs that
+	 * have no original program cannot be dumped through this.
 	 */
+	ret = -EACCES;
 	fprog = filter->prog->orig_prog;
+	if (!fprog)
+		goto out;
 
 	ret = fprog->len;
 	if (!len)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254812 — [PATCH 4.1 27/46] i2c: rcar: enable RuntimePM before registering to the core

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 27/46] i2c: rcar: enable RuntimePM before registering to the core
Message-ID<qmOWV-DI-75@gated-at.bofh.it>
In reply to#1254799
4.1-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
@@ -688,15 +688,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;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254813 — [PATCH 4.1 31/46] workqueue: make sure delayed work run in local cpu

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 31/46] workqueue: make sure delayed work run in local cpu
Message-ID<qmOWV-DI-81@gated-at.bofh.it>
In reply to#1254799
4.1-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
@@ -1451,13 +1451,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);
 }
 
 /**


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254814 — [PATCH 4.1 39/46] sched/preempt: Fix cond_resched_lock() and cond_resched_softirq()

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-23 20:10 +0200
Subject[PATCH 4.1 39/46] sched/preempt: Fix cond_resched_lock() and cond_resched_softirq()
Message-ID<qmOWV-DI-79@gated-at.bofh.it>
In reply to#1254799
4.1-stable review patch.  If anyone has any objections, please let me know.

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

From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>

commit fe32d3cd5e8eb0f82e459763374aa80797023403 upstream.

These functions check should_resched() before unlocking spinlock/bh-enable:
preempt_count always non-zero => should_resched() always returns false.
cond_resched_lock() worked iff spin_needbreak is set.

This patch adds argument "preempt_offset" to should_resched().

preempt_count offset constants for that:

  PREEMPT_DISABLE_OFFSET  - offset after preempt_disable()
  PREEMPT_LOCK_OFFSET     - offset after spin_lock()
  SOFTIRQ_DISABLE_OFFSET  - offset after local_bh_distable()
  SOFTIRQ_LOCK_OFFSET     - offset after spin_lock_bh()

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Graf <agraf@suse.de>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: bdb438065890 ("sched: Extract the basic add/sub preempt_count modifiers")
Link: http://lkml.kernel.org/r/20150715095204.12246.98268.stgit@buzz
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/x86/include/asm/preempt.h |    4 ++--
 include/asm-generic/preempt.h  |    5 +++--
 include/linux/preempt.h        |    5 +++--
 include/linux/preempt_mask.h   |   14 +++++++++++---
 include/linux/sched.h          |    6 ------
 kernel/sched/core.c            |    6 +++---
 6 files changed, 22 insertions(+), 18 deletions(-)

--- a/arch/x86/include/asm/preempt.h
+++ b/arch/x86/include/asm/preempt.h
@@ -90,9 +90,9 @@ static __always_inline bool __preempt_co
 /*
  * Returns true when we need to resched and can (barring IRQ state).
  */
-static __always_inline bool should_resched(void)
+static __always_inline bool should_resched(int preempt_offset)
 {
-	return unlikely(!raw_cpu_read_4(__preempt_count));
+	return unlikely(raw_cpu_read_4(__preempt_count) == preempt_offset);
 }
 
 #ifdef CONFIG_PREEMPT
--- a/include/asm-generic/preempt.h
+++ b/include/asm-generic/preempt.h
@@ -71,9 +71,10 @@ static __always_inline bool __preempt_co
 /*
  * Returns true when we need to resched and can (barring IRQ state).
  */
-static __always_inline bool should_resched(void)
+static __always_inline bool should_resched(int preempt_offset)
 {
-	return unlikely(!preempt_count() && tif_need_resched());
+	return unlikely(preempt_count() == preempt_offset &&
+			tif_need_resched());
 }
 
 #ifdef CONFIG_PREEMPT
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -20,7 +20,8 @@
 #if defined(CONFIG_DEBUG_PREEMPT) || defined(CONFIG_PREEMPT_TRACER)
 extern void preempt_count_add(int val);
 extern void preempt_count_sub(int val);
-#define preempt_count_dec_and_test() ({ preempt_count_sub(1); should_resched(); })
+#define preempt_count_dec_and_test() \
+	({ preempt_count_sub(1); should_resched(0); })
 #else
 #define preempt_count_add(val)	__preempt_count_add(val)
 #define preempt_count_sub(val)	__preempt_count_sub(val)
@@ -59,7 +60,7 @@ do { \
 
 #define preempt_check_resched() \
 do { \
-	if (should_resched()) \
+	if (should_resched(0)) \
 		__preempt_schedule(); \
 } while (0)
 
--- a/include/linux/preempt_mask.h
+++ b/include/linux/preempt_mask.h
@@ -71,13 +71,21 @@
  */
 #define in_nmi()	(preempt_count() & NMI_MASK)
 
+/*
+ * The preempt_count offset after preempt_disable();
+ */
 #if defined(CONFIG_PREEMPT_COUNT)
-# define PREEMPT_DISABLE_OFFSET 1
+# define PREEMPT_DISABLE_OFFSET	PREEMPT_OFFSET
 #else
-# define PREEMPT_DISABLE_OFFSET 0
+# define PREEMPT_DISABLE_OFFSET	0
 #endif
 
 /*
+ * The preempt_count offset after spin_lock()
+ */
+#define PREEMPT_LOCK_OFFSET	PREEMPT_DISABLE_OFFSET
+
+/*
  * The preempt_count offset needed for things like:
  *
  *  spin_lock_bh()
@@ -90,7 +98,7 @@
  *
  * Work as expected.
  */
-#define SOFTIRQ_LOCK_OFFSET (SOFTIRQ_DISABLE_OFFSET + PREEMPT_DISABLE_OFFSET)
+#define SOFTIRQ_LOCK_OFFSET (SOFTIRQ_DISABLE_OFFSET + PREEMPT_LOCK_OFFSET)
 
 /*
  * Are we running in atomic context?  WARNING: this macro cannot
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2834,12 +2834,6 @@ extern int _cond_resched(void);
 
 extern int __cond_resched_lock(spinlock_t *lock);
 
-#ifdef CONFIG_PREEMPT_COUNT
-#define PREEMPT_LOCK_OFFSET	PREEMPT_OFFSET
-#else
-#define PREEMPT_LOCK_OFFSET	0
-#endif
-
 #define cond_resched_lock(lock) ({				\
 	___might_sleep(__FILE__, __LINE__, PREEMPT_LOCK_OFFSET);\
 	__cond_resched_lock(lock);				\
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4232,7 +4232,7 @@ SYSCALL_DEFINE0(sched_yield)
 
 int __sched _cond_resched(void)
 {
-	if (should_resched()) {
+	if (should_resched(0)) {
 		preempt_schedule_common();
 		return 1;
 	}
@@ -4250,7 +4250,7 @@ EXPORT_SYMBOL(_cond_resched);
  */
 int __cond_resched_lock(spinlock_t *lock)
 {
-	int resched = should_resched();
+	int resched = should_resched(PREEMPT_LOCK_OFFSET);
 	int ret = 0;
 
 	lockdep_assert_held(lock);
@@ -4272,7 +4272,7 @@ int __sched __cond_resched_softirq(void)
 {
 	BUG_ON(!in_softirq());
 
-	if (should_resched()) {
+	if (should_resched(SOFTIRQ_DISABLE_OFFSET)) {
 		local_bh_enable();
 		preempt_schedule_common();
 		local_bh_disable();


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254996 — Re: [PATCH 4.1 39/46] sched/preempt: Fix cond_resched_lock() and cond_resched_softirq()

FromThomas Backlund <backlund.thomas@gmail.com>
Date2015-10-23 22:20 +0200
SubjectRe: [PATCH 4.1 39/46] sched/preempt: Fix cond_resched_lock() and cond_resched_softirq()
Message-ID<qmQYG-3xd-19@gated-at.bofh.it>
In reply to#1254814
Den 23.10.2015 kl. 20:46, skrev Greg Kroah-Hartman:
> 4.1-stable review patch.  If anyone has any objections, please let me know.
>
> ------------------
>
> From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
>
> commit fe32d3cd5e8eb0f82e459763374aa80797023403 upstream.

This one broke drivers/xen/  build


drivers/xen/preempt.c: In function ”xen_maybe_preempt_hcall”:
drivers/xen/preempt.c:34:11: error: too few arguments to function 
”should_resched”
         && should_resched())) {
            ^


Needed fix is:

 From 0fa2f5cb2b0ecd8d56baa51f35f09aab234eb0bf Mon Sep 17 00:00:00 2001
From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Date: Wed, 15 Jul 2015 12:52:01 +0300
Subject: [PATCH] sched/preempt, xen: Use need_resched() instead of
  should_resched()


--
Thomas

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1255051 — Re: [PATCH 4.1 39/46] sched/preempt: Fix cond_resched_lock() and cond_resched_softirq()

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-24 01:30 +0200
SubjectRe: [PATCH 4.1 39/46] sched/preempt: Fix cond_resched_lock() and cond_resched_softirq()
Message-ID<qmTWy-7MT-23@gated-at.bofh.it>
In reply to#1254996
On Fri, Oct 23, 2015 at 11:14:30PM +0300, Thomas Backlund wrote:
> Den 23.10.2015 kl. 20:46, skrev Greg Kroah-Hartman:
> >4.1-stable review patch.  If anyone has any objections, please let me know.
> >
> >------------------
> >
> >From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> >
> >commit fe32d3cd5e8eb0f82e459763374aa80797023403 upstream.
> 
> This one broke drivers/xen/  build
> 
> 
> drivers/xen/preempt.c: In function ”xen_maybe_preempt_hcall”:
> drivers/xen/preempt.c:34:11: error: too few arguments to function
> ”should_resched”
>         && should_resched())) {
>            ^
> 
> 
> Needed fix is:
> 
> From 0fa2f5cb2b0ecd8d56baa51f35f09aab234eb0bf Mon Sep 17 00:00:00 2001
> From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> Date: Wed, 15 Jul 2015 12:52:01 +0300
> Subject: [PATCH] sched/preempt, xen: Use need_resched() instead of
>  should_resched()

Thanks, now queued up.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1255003

FromShuah Khan <shuahkh@osg.samsung.com>
Date2015-10-23 22:40 +0200
Message-ID<qmRi1-3TB-3@gated-at.bofh.it>
In reply to#1254799
On 10/23/2015 11:45 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.1.12 release.
> There are 46 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:46:11 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/v4.x/stable-review/patch-4.1.12-rc1.gz
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 

I am seeing the following compile error (was seen in 4.2.4-rc1)

In file included from include/uapi/linux/stddef.h:1:0,
                 from include/linux/stddef.h:4,
                 from ./include/uapi/linux/posix_types.h:4,
                 from include/uapi/linux/types.h:13,
                 from include/linux/types.h:5,
                 from include/uapi/linux/capability.h:16,
                 from include/linux/capability.h:15,
                 from include/linux/sched.h:15,
                 from drivers/xen/preempt.c:12:
drivers/xen/preempt.c: In function ‘xen_maybe_preempt_hcall’:
drivers/xen/preempt.c:34:11: error: too few arguments to function
‘should_resched’
        && should_resched())) {
           ^
include/linux/compiler.h:164:42: note: in definition of macro ‘unlikely’
 # define unlikely(x) __builtin_expect(!!(x), 0)
                                          ^
In file included from include/linux/preempt.h:18:0,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/uapi/linux/timex.h:56,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:19,
                 from drivers/xen/preempt.c:12:
./arch/x86/include/asm/preempt.h:93:29: note: declared here
 static __always_inline bool should_resched(int preempt_offset)
                             ^
scripts/Makefile.build:258: recipe for target 'drivers/xen/preempt.o' failed
make[2]: *** [drivers/xen/preempt.o] Error 1
make[2]: *** Waiting for unfinished jobs....
scripts/Makefile.build:403: recipe for target 'drivers/xen' failed
make[1]: *** [drivers/xen] Error 2
Makefile:947: recipe for target 'drivers' failed
make: *** [drivers] Error 2

thanks,
-- Shuah


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1255054

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-10-24 01:30 +0200
Message-ID<qmTWy-7MT-27@gated-at.bofh.it>
In reply to#1255003
On Fri, Oct 23, 2015 at 02:34:56PM -0600, Shuah Khan wrote:
> On 10/23/2015 11:45 AM, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.1.12 release.
> > There are 46 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:46:11 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/v4.x/stable-review/patch-4.1.12-rc1.gz
> > and the diffstat can be found below.
> > 
> > thanks,
> > 
> > greg k-h
> > 
> 
> I am seeing the following compile error (was seen in 4.2.4-rc1)
> 
> In file included from include/uapi/linux/stddef.h:1:0,
>                  from include/linux/stddef.h:4,
>                  from ./include/uapi/linux/posix_types.h:4,
>                  from include/uapi/linux/types.h:13,
>                  from include/linux/types.h:5,
>                  from include/uapi/linux/capability.h:16,
>                  from include/linux/capability.h:15,
>                  from include/linux/sched.h:15,
>                  from drivers/xen/preempt.c:12:
> drivers/xen/preempt.c: In function ‘xen_maybe_preempt_hcall’:
> drivers/xen/preempt.c:34:11: error: too few arguments to function
> ‘should_resched’
>         && should_resched())) {
>            ^
> include/linux/compiler.h:164:42: note: in definition of macro ‘unlikely’
>  # define unlikely(x) __builtin_expect(!!(x), 0)
>                                           ^
> In file included from include/linux/preempt.h:18:0,
>                  from include/linux/spinlock.h:50,
>                  from include/linux/seqlock.h:35,
>                  from include/linux/time.h:5,
>                  from include/uapi/linux/timex.h:56,
>                  from include/linux/timex.h:56,
>                  from include/linux/sched.h:19,
>                  from drivers/xen/preempt.c:12:
> ./arch/x86/include/asm/preempt.h:93:29: note: declared here
>  static __always_inline bool should_resched(int preempt_offset)
>                              ^
> scripts/Makefile.build:258: recipe for target 'drivers/xen/preempt.o' failed
> make[2]: *** [drivers/xen/preempt.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> scripts/Makefile.build:403: recipe for target 'drivers/xen' failed
> make[1]: *** [drivers/xen] Error 2
> Makefile:947: recipe for target 'drivers' failed
> make: *** [drivers] Error 2

Thanks for reporting this, there's a -rc2 tarball:

 	kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.1.12-rc2.gz

that should fix it, can you test that?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1255080

FromGuenter Roeck <linux@roeck-us.net>
Date2015-10-24 03:20 +0200
Message-ID<qmVEZ-1Qb-3@gated-at.bofh.it>
In reply to#1255054
On 10/23/2015 04:22 PM, Greg Kroah-Hartman wrote:
> On Fri, Oct 23, 2015 at 02:34:56PM -0600, Shuah Khan wrote:
>> On 10/23/2015 11:45 AM, Greg Kroah-Hartman wrote:
>>> This is the start of the stable review cycle for the 4.1.12 release.
>>> There are 46 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:46:11 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/v4.x/stable-review/patch-4.1.12-rc1.gz
>>> and the diffstat can be found below.
>>>
>>> thanks,
>>>
>>> greg k-h
>>>
>>
>> I am seeing the following compile error (was seen in 4.2.4-rc1)
>>
>> In file included from include/uapi/linux/stddef.h:1:0,
>>                   from include/linux/stddef.h:4,
>>                   from ./include/uapi/linux/posix_types.h:4,
>>                   from include/uapi/linux/types.h:13,
>>                   from include/linux/types.h:5,
>>                   from include/uapi/linux/capability.h:16,
>>                   from include/linux/capability.h:15,
>>                   from include/linux/sched.h:15,
>>                   from drivers/xen/preempt.c:12:
>> drivers/xen/preempt.c: In function ‘xen_maybe_preempt_hcall’:
>> drivers/xen/preempt.c:34:11: error: too few arguments to function
>> ‘should_resched’
>>          && should_resched())) {
>>             ^
>> include/linux/compiler.h:164:42: note: in definition of macro ‘unlikely’
>>   # define unlikely(x) __builtin_expect(!!(x), 0)
>>                                            ^
>> In file included from include/linux/preempt.h:18:0,
>>                   from include/linux/spinlock.h:50,
>>                   from include/linux/seqlock.h:35,
>>                   from include/linux/time.h:5,
>>                   from include/uapi/linux/timex.h:56,
>>                   from include/linux/timex.h:56,
>>                   from include/linux/sched.h:19,
>>                   from drivers/xen/preempt.c:12:
>> ./arch/x86/include/asm/preempt.h:93:29: note: declared here
>>   static __always_inline bool should_resched(int preempt_offset)
>>                               ^
>> scripts/Makefile.build:258: recipe for target 'drivers/xen/preempt.o' failed
>> make[2]: *** [drivers/xen/preempt.o] Error 1
>> make[2]: *** Waiting for unfinished jobs....
>> scripts/Makefile.build:403: recipe for target 'drivers/xen' failed
>> make[1]: *** [drivers/xen] Error 2
>> Makefile:947: recipe for target 'drivers' failed
>> make: *** [drivers] Error 2
>
Also for powerpc:

arch/powerpc/kvm/book3s_hv.c: In function 'kvmppc_run_vcpu':
arch/powerpc/kvm/book3s_hv.c:2181:3: error: too few arguments to function 'should_resched'

[ Didn't we have that before ? ]

Guenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.kernel


csiph-web