From 55d5380c9143600ac8d56de9dc303f7e68f3c3bf Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Thu, 3 Sep 2015 09:56:49 -0400 Subject: [PATCH] Linux v4.2-4507-g1e1a4e8f4391 --- config-generic | 3 + config-powerpc64-generic | 1 + ...on-recovery_tmo-sysfs-writes-persist.patch | 89 -------------- kernel.spec | 8 +- ...-device_cgroup-fix-RCU-lockdep-splat.patch | 110 +++++++++--------- sources | 2 +- 6 files changed, 64 insertions(+), 149 deletions(-) delete mode 100644 iSCSI-let-session-recovery_tmo-sysfs-writes-persist.patch diff --git a/config-generic b/config-generic index c10793af4..d6b235dce 100644 --- a/config-generic +++ b/config-generic @@ -321,6 +321,8 @@ CONFIG_MTD_CFI_I2=y # CONFIG_MTD_NAND_ECC_BCH is not set # CONFIG_MTD_NAND_DISKONCHIP is not set # CONFIG_MTD_NAND_HISI504 is not set +# CONFIG_MTD_NAND_DENALI_PCI is not set +# CONFIG_MTD_NAND_DENALI_DT is not set # CONFIG_MTD_LPDDR is not set CONFIG_MTD_UBI=m CONFIG_MTD_UBI_WL_THRESHOLD=4096 @@ -4889,6 +4891,7 @@ CONFIG_CGROUPS=y CONFIG_CGROUP_CPUACCT=y CONFIG_CGROUP_DEVICE=y CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_PIDS=y CONFIG_CGROUP_SCHED=y CONFIG_MEMCG=y CONFIG_MEMCG_SWAP=y diff --git a/config-powerpc64-generic b/config-powerpc64-generic index ce547a8d2..89ffe53da 100644 --- a/config-powerpc64-generic +++ b/config-powerpc64-generic @@ -127,6 +127,7 @@ CONFIG_MTD_POWERNV_FLASH=m CONFIG_PPC_TRANSACTIONAL_MEM=y CONFIG_BLK_DEV_RSXX=m CONFIG_CXL=m +CONFIG_CXLFLASH=m CONFIG_IBMEBUS=y CONFIG_EHEA=m CONFIG_INFINIBAND_EHCA=m diff --git a/iSCSI-let-session-recovery_tmo-sysfs-writes-persist.patch b/iSCSI-let-session-recovery_tmo-sysfs-writes-persist.patch deleted file mode 100644 index 174cccb02..000000000 --- a/iSCSI-let-session-recovery_tmo-sysfs-writes-persist.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 9c8108a4d3a837c51a29f28229a06d97654eaeb6 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Tue, 16 Jun 2015 16:07:13 -0700 -Subject: iSCSI: let session recovery_tmo sysfs writes persist across recovery - -The iSCSI session recovery_tmo setting is writeable in sysfs, but it's -also set every time a connection is established when parameters are set -from iscsid over netlink. That results in the timeout being reset to -the default value after every recovery. - -The DM multipath tools want to use the sysfs interface to lower the -default timeout when there are multiple paths to fail over. It has -caused confusion that we have a writeable sysfs value that seem to keep -resetting itself. - -This patch adds an in-kernel flag that gets set once a sysfs write -occurs, and then ignores netlink parameter setting once it's been -modified via the sysfs interface. My thinking here is that the sysfs -interface is much simpler for external tools to influence the session -timeout, but if we're going to allow it to be modified directly we -should ensure that setting is maintained. - -Signed-off-by: Chris Leech -Reviewed-by: Mike Christie -Signed-off-by: James Bottomley - -diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c -index 55647aa..4c25539 100644 ---- a/drivers/scsi/scsi_transport_iscsi.c -+++ b/drivers/scsi/scsi_transport_iscsi.c -@@ -2042,6 +2042,7 @@ iscsi_alloc_session(struct Scsi_Host *shost, struct iscsi_transport *transport, - session->transport = transport; - session->creator = -1; - session->recovery_tmo = 120; -+ session->recovery_tmo_sysfs_override = false; - session->state = ISCSI_SESSION_FREE; - INIT_DELAYED_WORK(&session->recovery_work, session_recovery_timedout); - INIT_LIST_HEAD(&session->sess_list); -@@ -2786,7 +2787,8 @@ iscsi_set_param(struct iscsi_transport *transport, struct iscsi_uevent *ev) - switch (ev->u.set_param.param) { - case ISCSI_PARAM_SESS_RECOVERY_TMO: - sscanf(data, "%d", &value); -- session->recovery_tmo = value; -+ if (!session->recovery_tmo_sysfs_override) -+ session->recovery_tmo = value; - break; - default: - err = transport->set_param(conn, ev->u.set_param.param, -@@ -4049,13 +4051,15 @@ store_priv_session_##field(struct device *dev, \ - if ((session->state == ISCSI_SESSION_FREE) || \ - (session->state == ISCSI_SESSION_FAILED)) \ - return -EBUSY; \ -- if (strncmp(buf, "off", 3) == 0) \ -+ if (strncmp(buf, "off", 3) == 0) { \ - session->field = -1; \ -- else { \ -+ session->field##_sysfs_override = true; \ -+ } else { \ - val = simple_strtoul(buf, &cp, 0); \ - if (*cp != '\0' && *cp != '\n') \ - return -EINVAL; \ - session->field = val; \ -+ session->field##_sysfs_override = true; \ - } \ - return count; \ - } -@@ -4066,6 +4070,7 @@ store_priv_session_##field(struct device *dev, \ - static ISCSI_CLASS_ATTR(priv_sess, field, S_IRUGO | S_IWUSR, \ - show_priv_session_##field, \ - store_priv_session_##field) -+ - iscsi_priv_session_rw_attr(recovery_tmo, "%d"); - - static struct attribute *iscsi_session_attrs[] = { -diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h -index 2555ee5..6183d20 100644 ---- a/include/scsi/scsi_transport_iscsi.h -+++ b/include/scsi/scsi_transport_iscsi.h -@@ -241,6 +241,7 @@ struct iscsi_cls_session { - - /* recovery fields */ - int recovery_tmo; -+ bool recovery_tmo_sysfs_override; - struct delayed_work recovery_work; - - unsigned int target_id; --- -cgit v0.10.2 - diff --git a/kernel.spec b/kernel.spec index e0836c0c5..01b82d06f 100644 --- a/kernel.spec +++ b/kernel.spec @@ -67,7 +67,7 @@ Summary: The Linux kernel # The rc snapshot level %define rcrev 0 # The git snapshot level -%define gitrev 4 +%define gitrev 5 # Set rpm version accordingly %define rpmversion 4.%{upstream_sublevel}.0 %endif @@ -587,9 +587,6 @@ Patch508: kexec-uefi-copy-secure_boot-flag-in-boot-params.patch #rhbz 1239050 Patch509: ideapad-laptop-Add-Lenovo-Yoga-3-14-to-no_hw_rfkill-.patch -#rhbz 1253789 -Patch510: iSCSI-let-session-recovery_tmo-sysfs-writes-persist.patch - #rhbz 1250717 Patch512: ext4-dont-manipulate-recovery-flag-when-freezing.patch @@ -2054,6 +2051,9 @@ fi # # %changelog +* Thu Sep 03 2015 Josh Boyer - 4.3.0-0.rc0.git5.1 +- Linux v4.2-4507-g1e1a4e8f4391 + * Wed Sep 02 2015 Josh Boyer - 4.3.0-0.rc0.git4.1 - Linux v4.2-4282-gae982073095a diff --git a/security-device_cgroup-fix-RCU-lockdep-splat.patch b/security-device_cgroup-fix-RCU-lockdep-splat.patch index 2de959ee9..0ecacdfe4 100644 --- a/security-device_cgroup-fix-RCU-lockdep-splat.patch +++ b/security-device_cgroup-fix-RCU-lockdep-splat.patch @@ -1,71 +1,71 @@ -From 28e1b4326abcc66839c6e21dd410fe983ee83fb3 Mon Sep 17 00:00:00 2001 -From: Felipe Balbi -Date: Wed, 2 Sep 2015 08:12:28 -0500 +From 85f4e5ec7bbb5f8d7cc023a12af39d76c05cd204 Mon Sep 17 00:00:00 2001 +From: "Paul E. McKenney" +Date: Wed, 2 Sep 2015 17:14:33 -0700 Subject: [PATCH] security: device_cgroup: fix RCU lockdep splat -while booting AM437x device, the following splat -triggered: +On Wed, Sep 02, 2015 at 12:24:50PM -0400, Tejun Heo wrote: +> cc'ing Paul. +> +> On Wed, Sep 02, 2015 at 08:12:28AM -0500, Felipe Balbi wrote: +> > while booting AM437x device, the following splat +> > triggered: +> > +> > [ 12.005238] =============================== +> > [ 12.009749] [ INFO: suspicious RCU usage. ] +> > [ 12.014116] 4.2.0-next-20150831 #1154 Not tainted +> > [ 12.019050] ------------------------------- +> > [ 12.023408] security/device_cgroup.c:405 device_cgroup:verify_new_ex called without proper synchronization! +> ... +> > [ 12.128326] [] (verify_new_ex) from [] (devcgroup_access_write+0x374/0x658) +> > [ 12.137426] [] (devcgroup_access_write) from [] (cgroup_file_write+0x28/0x1bc) +> > [ 12.146796] [] (cgroup_file_write) from [] (kernfs_fop_write+0xc0/0x1b8) +> > [ 12.155620] [] (kernfs_fop_write) from [] (__vfs_write+0x1c/0xd8) +> > [ 12.163783] [] (__vfs_write) from [] (vfs_write+0x90/0x16c) +> > [ 12.171426] [] (vfs_write) from [] (SyS_write+0x44/0x9c) +> > [ 12.178806] [] (SyS_write) from [] (ret_fast_syscall+0x0/0x1c) +> +> This shouldn't be happening because devcgroup_access_write() always +> grabs devcgroup_mutex. Looking at the log, the culprit seems to be +> f78f5b90c4ff ("rcu: Rename rcu_lockdep_assert() to +> RCU_LOCKDEP_WARN()"). It missed the bang for the second test while +> inverting it, so adding rcu_read_lock() isn't the right fix here. +> +> Paul, can you please fix it? -[ 12.005238] =============================== -[ 12.009749] [ INFO: suspicious RCU usage. ] -[ 12.014116] 4.2.0-next-20150831 #1154 Not tainted -[ 12.019050] ------------------------------- -[ 12.023408] security/device_cgroup.c:405 device_cgroup:verify_new_ex called without proper synchronization! -[ 12.033576] other info that might help us debug this: +Gah! Please see below. -[ 12.041942] rcu_scheduler_active = 1, debug_locks = 0 -[ 12.048796] 4 locks held by systemd/1: -[ 12.052700] #0: (sb_writers#7){.+.+.+}, at: [] __sb_start_write+0x8c/0xb0 -[ 12.060954] #1: (&of->mutex){+.+.+.}, at: [] kernfs_fop_write+0x50/0x1b8 -[ 12.069085] #2: (s_active#30){++++.+}, at: [] kernfs_fop_write+0x58/0x1b8 -[ 12.077310] #3: (devcgroup_mutex){+.+...}, at: [] devcgroup_access_write+0x20/0x658 -[ 12.086575] stack backtrace: -[ 12.091124] CPU: 0 PID: 1 Comm: systemd Not tainted 4.2.0-next-20150831 #1154 -[ 12.098609] Hardware name: Generic AM43 (Flattened Device Tree) -[ 12.104807] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) -[ 12.112924] [] (show_stack) from [] (dump_stack+0x84/0x9c) -[ 12.120491] [] (dump_stack) from [] (verify_new_ex+0xc4/0xdc) -[ 12.128326] [] (verify_new_ex) from [] (devcgroup_access_write+0x374/0x658) -[ 12.137426] [] (devcgroup_access_write) from [] (cgroup_file_write+0x28/0x1bc) -[ 12.146796] [] (cgroup_file_write) from [] (kernfs_fop_write+0xc0/0x1b8) -[ 12.155620] [] (kernfs_fop_write) from [] (__vfs_write+0x1c/0xd8) -[ 12.163783] [] (__vfs_write) from [] (vfs_write+0x90/0x16c) -[ 12.171426] [] (vfs_write) from [] (SyS_write+0x44/0x9c) -[ 12.178806] [] (SyS_write) from [] (ret_fast_syscall+0x0/0x1c) + Thanx, Paul -Fix it by making sure rcu_read_lock() is held -around calls to parent_has_perm(). +------------------------------------------------------------------------ -Signed-off-by: Felipe Balbi +security/device_cgroup: Fix RCU_LOCKDEP_WARN() condition + +f78f5b90c4ff ("rcu: Rename rcu_lockdep_assert() to RCU_LOCKDEP_WARN()") +introduced a bug by incorrectly inverting the condition when moving from +rcu_lockdep_assert() to RCU_LOCKDEP_WARN(). This commit therefore fixes +the inversion. + +Reported-by: Felipe Balbi +Reported-by: Tejun Heo +Signed-off-by: Paul E. McKenney +Cc: Serge Hallyn --- - security/device_cgroup.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) + security/device_cgroup.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/device_cgroup.c b/security/device_cgroup.c -index 73455089feef..dd77ed206fa4 100644 +index 73455089feef..03c1652c9a1f 100644 --- a/security/device_cgroup.c +++ b/security/device_cgroup.c -@@ -608,6 +608,7 @@ static int devcgroup_update_access(struct dev_cgroup *devcgroup, - int count, rc = 0; - struct dev_exception_item ex; - struct dev_cgroup *parent = css_to_devcgroup(devcgroup->css.parent); -+ int ret; +@@ -401,7 +401,7 @@ static bool verify_new_ex(struct dev_cgroup *dev_cgroup, + bool match = false; - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; -@@ -734,7 +735,11 @@ static int devcgroup_update_access(struct dev_cgroup *devcgroup, - break; - } + RCU_LOCKDEP_WARN(!rcu_read_lock_held() && +- lockdep_is_held(&devcgroup_mutex), ++ !lockdep_is_held(&devcgroup_mutex), + "device_cgroup:verify_new_ex called without proper synchronization"); -- if (!parent_has_perm(devcgroup, &ex)) -+ rcu_read_lock(); -+ ret = parent_has_perm(devcgroup, &ex); -+ rcu_read_unlock(); -+ -+ if (!ret) - return -EPERM; - rc = dev_exception_add(devcgroup, &ex); - break; + if (dev_cgroup->behavior == DEVCG_DEFAULT_ALLOW) { -- 2.4.3 diff --git a/sources b/sources index 44a75f318..4bfacb610 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ 3d5ea06d767e2f35c999eeadafc76523 linux-4.2.tar.xz 4c964bfba54d65b5b54cc898baddecad perf-man-4.2.tar.gz -02da0901d12a9743dba00f8ff51828ce patch-4.2-git4.xz +f57bb98aaa33a7a2bb3d9cfe5e636e4b patch-4.2-git5.xz