All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration
@ 2016-10-06  6:22 Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] ocfs2: fix start offset to ocfs2_zero_range_for_truncate() Jiri Slaby
                   ` (32 more replies)
  0 siblings, 33 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable
  Cc: Joseph Qi, Jun Piao, Mark Fasheh, Joel Becker, Junxiao Bi,
	Andrew Morton, Linus Torvalds, Jiri Slaby

From: Joseph Qi <joseph.qi@huawei.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit e6f0c6e6170fec175fe676495f29029aecdf486c upstream.

Commit ac7cf246dfdb ("ocfs2/dlm: fix race between convert and recovery")
checks if lockres master has changed to identify whether new master has
finished recovery or not.  This will introduce a race that right after
old master does umount ( means master will change), a new convert
request comes.

In this case, it will reset lockres state to DLM_RECOVERING and then
retry convert, and then fail with lockres->l_action being set to
OCFS2_AST_INVALID, which will cause inconsistent lock level between
ocfs2 and dlm, and then finally BUG.

Since dlm recovery will clear lock->convert_pending in
dlm_move_lockres_to_recovery_list, we can use it to correctly identify
the race case between convert and recovery.  So fix it.

Fixes: ac7cf246dfdb ("ocfs2/dlm: fix race between convert and recovery")
Link: http://lkml.kernel.org/r/57CE1569.8010704@huawei.com
Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Signed-off-by: Jun Piao <piaojun@huawei.com>
Cc: Mark Fasheh <mfasheh@versity.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 fs/ocfs2/dlm/dlmconvert.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/ocfs2/dlm/dlmconvert.c b/fs/ocfs2/dlm/dlmconvert.c
index f90931335c6b..2e11658676eb 100644
--- a/fs/ocfs2/dlm/dlmconvert.c
+++ b/fs/ocfs2/dlm/dlmconvert.c
@@ -262,7 +262,6 @@ enum dlm_status dlmconvert_remote(struct dlm_ctxt *dlm,
 				  struct dlm_lock *lock, int flags, int type)
 {
 	enum dlm_status status;
-	u8 old_owner = res->owner;
 
 	mlog(0, "type=%d, convert_type=%d, busy=%d\n", lock->ml.type,
 	     lock->ml.convert_type, res->state & DLM_LOCK_RES_IN_PROGRESS);
@@ -329,7 +328,6 @@ enum dlm_status dlmconvert_remote(struct dlm_ctxt *dlm,
 
 	spin_lock(&res->spinlock);
 	res->state &= ~DLM_LOCK_RES_IN_PROGRESS;
-	lock->convert_pending = 0;
 	/* if it failed, move it back to granted queue.
 	 * if master returns DLM_NORMAL and then down before sending ast,
 	 * it may have already been moved to granted queue, reset to
@@ -338,12 +336,14 @@ enum dlm_status dlmconvert_remote(struct dlm_ctxt *dlm,
 		if (status != DLM_NOTQUEUED)
 			dlm_error(status);
 		dlm_revert_pending_convert(res, lock);
-	} else if ((res->state & DLM_LOCK_RES_RECOVERING) ||
-			(old_owner != res->owner)) {
-		mlog(0, "res %.*s is in recovering or has been recovered.\n",
-				res->lockname.len, res->lockname.name);
+	} else if (!lock->convert_pending) {
+		mlog(0, "%s: res %.*s, owner died and lock has been moved back "
+				"to granted list, retry convert.\n",
+				dlm->name, res->lockname.len, res->lockname.name);
 		status = DLM_RECOVERING;
 	}
+
+	lock->convert_pending = 0;
 bail:
 	spin_unlock(&res->spinlock);
 
-- 
2.10.1


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

* [patch added to 3.12-stable] ocfs2: fix start offset to ocfs2_zero_range_for_truncate()
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] kbuild: Do not run modules_install and install in paralel Jiri Slaby
                   ` (31 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable
  Cc: Ashish Samant, Mark Fasheh, Joel Becker, Junxiao Bi, Joseph Qi,
	Eric Ren, Andrew Morton, Linus Torvalds, Jiri Slaby

From: Ashish Samant <ashish.samant@oracle.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit d21c353d5e99c56cdd5b5c1183ffbcaf23b8b960 upstream.

If we punch a hole on a reflink such that following conditions are met:

1. start offset is on a cluster boundary
2. end offset is not on a cluster boundary
3. (end offset is somewhere in another extent) or
   (hole range > MAX_CONTIG_BYTES(1MB)),

we dont COW the first cluster starting at the start offset.  But in this
case, we were wrongly passing this cluster to
ocfs2_zero_range_for_truncate() to zero out.  This will modify the
cluster in place and zero it in the source too.

Fix this by skipping this cluster in such a scenario.

To reproduce:

1. Create a random file of say 10 MB
     xfs_io -c 'pwrite -b 4k 0 10M' -f 10MBfile
2. Reflink  it
     reflink -f 10MBfile reflnktest
3. Punch a hole at starting at cluster boundary  with range greater that
1MB. You can also use a range that will put the end offset in another
extent.
     fallocate -p -o 0 -l 1048615 reflnktest
4. sync
5. Check the  first cluster in the source file. (It will be zeroed out).
    dd if=10MBfile iflag=direct bs=<cluster size> count=1 | hexdump -C

Link: http://lkml.kernel.org/r/1470957147-14185-1-git-send-email-ashish.samant@oracle.com
Signed-off-by: Ashish Samant <ashish.samant@oracle.com>
Reported-by: Saar Maoz <saar.maoz@oracle.com>
Reviewed-by: Srinivas Eeda <srinivas.eeda@oracle.com>
Cc: Mark Fasheh <mfasheh@versity.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Joseph Qi <joseph.qi@huawei.com>
Cc: Eric Ren <zren@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 fs/ocfs2/file.c | 34 ++++++++++++++++++++++++----------
 1 file changed, 24 insertions(+), 10 deletions(-)

diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 1c01e723e780..54ba0afacf00 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1495,7 +1495,8 @@ static int ocfs2_zero_partial_clusters(struct inode *inode,
 				       u64 start, u64 len)
 {
 	int ret = 0;
-	u64 tmpend, end = start + len;
+	u64 tmpend = 0;
+	u64 end = start + len;
 	struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
 	unsigned int csize = osb->s_clustersize;
 	handle_t *handle;
@@ -1527,18 +1528,31 @@ static int ocfs2_zero_partial_clusters(struct inode *inode,
 	}
 
 	/*
-	 * We want to get the byte offset of the end of the 1st cluster.
+	 * If start is on a cluster boundary and end is somewhere in another
+	 * cluster, we have not COWed the cluster starting at start, unless
+	 * end is also within the same cluster. So, in this case, we skip this
+	 * first call to ocfs2_zero_range_for_truncate() truncate and move on
+	 * to the next one.
 	 */
-	tmpend = (u64)osb->s_clustersize + (start & ~(osb->s_clustersize - 1));
-	if (tmpend > end)
-		tmpend = end;
+	if ((start & (csize - 1)) != 0) {
+		/*
+		 * We want to get the byte offset of the end of the 1st
+		 * cluster.
+		 */
+		tmpend = (u64)osb->s_clustersize +
+			(start & ~(osb->s_clustersize - 1));
+		if (tmpend > end)
+			tmpend = end;
 
-	trace_ocfs2_zero_partial_clusters_range1((unsigned long long)start,
-						 (unsigned long long)tmpend);
+		trace_ocfs2_zero_partial_clusters_range1(
+			(unsigned long long)start,
+			(unsigned long long)tmpend);
 
-	ret = ocfs2_zero_range_for_truncate(inode, handle, start, tmpend);
-	if (ret)
-		mlog_errno(ret);
+		ret = ocfs2_zero_range_for_truncate(inode, handle, start,
+						    tmpend);
+		if (ret)
+			mlog_errno(ret);
+	}
 
 	if (tmpend < end) {
 		/*
-- 
2.10.1


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

* [patch added to 3.12-stable] kbuild: Do not run modules_install and install in paralel
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] ocfs2: fix start offset to ocfs2_zero_range_for_truncate() Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] Makefile: revert "Makefile: Document ability to make file.lst and file.S" partially Jiri Slaby
                   ` (30 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Michal Marek, Jiri Slaby

From: Michal Marek <mmarek@suse.cz>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit a85a41ed69f27c4c667d8c418df14b4fb220c4ad upstream.

Based on a x86-only patch by Andy Lutomirski <luto@amacapital.net>

With modular kernels, 'make install' is going to need the installed
modules at some point to generate the initramfs.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Makefile b/Makefile
index 4c1baa9b6bae..832dd3d27f39 100644
--- a/Makefile
+++ b/Makefile
@@ -476,6 +476,12 @@ ifeq ($(KBUILD_EXTMOD),)
                 endif
         endif
 endif
+# install and module_install need also be processed one by one
+ifneq ($(filter install,$(MAKECMDGOALS)),)
+        ifneq ($(filter modules_install,$(MAKECMDGOALS)),)
+	        mixed-targets := 1
+        endif
+endif
 
 ifeq ($(mixed-targets),1)
 # ===========================================================================
-- 
2.10.1


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

* [patch added to 3.12-stable] Makefile: revert "Makefile: Document ability to make file.lst and file.S" partially
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] ocfs2: fix start offset to ocfs2_zero_range_for_truncate() Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] kbuild: Do not run modules_install and install in paralel Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] kbuild: forbid kernel directory to contain spaces and colons Jiri Slaby
                   ` (29 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Wang YanQing, Michal Marek, Jiri Slaby

From: Wang YanQing <udknight@gmail.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 40ab87a4003c7952976ce901a2b9ece5ed833168 upstream.

Commit 627189797807 ("Makefile: Document ability to make file.lst
and file.S") document ability to make file.S, but there isn't such
ability in kbuild, so revert it.

Signed-off-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 832dd3d27f39..0b3a710c8a44 100644
--- a/Makefile
+++ b/Makefile
@@ -1119,7 +1119,7 @@ help:
 	@echo  '  firmware_install- Install all firmware to INSTALL_FW_PATH'
 	@echo  '                    (default: $$(INSTALL_MOD_PATH)/lib/firmware)'
 	@echo  '  dir/            - Build all files in dir and below'
-	@echo  '  dir/file.[oisS] - Build specified target only'
+	@echo  '  dir/file.[ois]  - Build specified target only'
 	@echo  '  dir/file.lst    - Build specified mixed source/assembly target only'
 	@echo  '                    (requires a recent binutils and recent build (System.map))'
 	@echo  '  dir/file.ko     - Build module including final link'
-- 
2.10.1


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

* [patch added to 3.12-stable] kbuild: forbid kernel directory to contain spaces and colons
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (2 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] Makefile: revert "Makefile: Document ability to make file.lst and file.S" partially Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES Jiri Slaby
                   ` (28 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Robert Jarzmik, Michal Marek, Jiri Slaby

From: Robert Jarzmik <robert.jarzmik@free.fr>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 51193b76bfff5027cf96ba63effae808ad67cca7 upstream.

When the kernel path contains a space or a colon somewhere in the path
name, the modules_install target doesn't work anymore, as the path names
are not enclosed in double quotes. It is also supposed that and O= build
will suffer from the same weakness as modules_install.

Instead of checking and improving kbuild to resist to directories
including these characters, error out early to prevent any build if the
kernel's main directory contains a space.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 0b3a710c8a44..297c605c25bf 100644
--- a/Makefile
+++ b/Makefile
@@ -113,6 +113,10 @@ _all:
 # Cancel implicit rules on top Makefile
 $(CURDIR)/Makefile Makefile: ;
 
+ifneq ($(words $(subst :, ,$(CURDIR))), 1)
+  $(error main directory cannot contain spaces nor colons)
+endif
+
 ifneq ($(KBUILD_OUTPUT),)
 # Invoke a second make in the output directory, passing relevant variables
 # check that the output directory actually exists
-- 
2.10.1


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

* [patch added to 3.12-stable] Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (3 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] kbuild: forbid kernel directory to contain spaces and colons Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] gcov: disable -Wmaybe-uninitialized warning Jiri Slaby
                   ` (27 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Arnd Bergmann, Michal Marek, Jiri Slaby

From: Arnd Bergmann <arnd@arndb.de>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 815eb71e7149ecce40db9dd0ad09c4dd9d33c60f upstream.

CONFIG_PROFILE_ALL_BRANCHES confuses gcc-5.x to the degree that it prints
incorrect warnings about a lot of variables that it thinks can be used
uninitialized, e.g.:

i2c/busses/i2c-diolan-u2c.c: In function 'diolan_usb_xfer':
i2c/busses/i2c-diolan-u2c.c:391:16: warning: 'byte' may be used uninitialized in this function
iio/gyro/itg3200_core.c: In function 'itg3200_probe':
iio/gyro/itg3200_core.c:213:6: warning: 'val' may be used uninitialized in this function
leds/leds-lp55xx-common.c: In function 'lp55xx_update_bits':
leds/leds-lp55xx-common.c:350:6: warning: 'tmp' may be used uninitialized in this function
misc/bmp085.c: In function 'show_pressure':
misc/bmp085.c:363:10: warning: 'pressure' may be used uninitialized in this function
power/ds2782_battery.c: In function 'ds2786_get_capacity':
power/ds2782_battery.c:214:17: warning: 'raw' may be used uninitialized in this function

These are all false positives that either rob someone's time when trying
to figure out whether they are real, or they get people to send wrong
patches to shut up the warnings.

Nobody normally wants to run a CONFIG_PROFILE_ALL_BRANCHES kernel in
production, so disabling the whole class of warnings for this configuration
has no serious downsides either.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Steven Rostedt <rostedtgoodmis.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 297c605c25bf..c477e24e892c 100644
--- a/Makefile
+++ b/Makefile
@@ -585,7 +585,11 @@ all: vmlinux
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 KBUILD_CFLAGS	+= -Os $(call cc-disable-warning,maybe-uninitialized,)
 else
-KBUILD_CFLAGS	+= -O2
+ifdef CONFIG_PROFILE_ALL_BRANCHES
+KBUILD_CFLAGS	+= -O2 $(call cc-disable-warning,maybe-uninitialized,)
+else
+KBUILD_CFLAGS   += -O2
+endif
 endif
 
 include $(srctree)/arch/$(SRCARCH)/Makefile
-- 
2.10.1


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

* [patch added to 3.12-stable] gcov: disable -Wmaybe-uninitialized warning
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (4 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] Disable "maybe-uninitialized" warning globally Jiri Slaby
                   ` (26 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Arnd Bergmann, Michal Marek, Jiri Slaby

From: Arnd Bergmann <arnd@arndb.de>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit e72e2dfe7c16ffbfbabf9cb24adc6d9f93a4fe37 upstream.

When gcov profiling is enabled, we see a lot of spurious warnings about
possibly uninitialized variables being used:

arch/arm/mm/dma-mapping.c: In function 'arm_coherent_iommu_map_page':
arch/arm/mm/dma-mapping.c:1085:16: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/clk/st/clk-flexgen.c: In function 'st_of_flexgen_setup':
drivers/clk/st/clk-flexgen.c:323:9: warning: 'num_parents' may be used uninitialized in this function [-Wmaybe-uninitialized]
kernel/cgroup.c: In function 'cgroup_mount':
kernel/cgroup.c:2119:11: warning: 'root' may be used uninitialized in this function [-Wmaybe-uninitialized]

All of these are false positives, so it seems better to just disable
the warnings whenever GCOV is enabled. Most users don't enable GCOV,
and based on a prior patch, it is now also disabled for 'allmodconfig'
builds, so there should be no downsides of doing this.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index c477e24e892c..c0e575c2594c 100644
--- a/Makefile
+++ b/Makefile
@@ -351,7 +351,7 @@ AFLAGS_MODULE   =
 LDFLAGS_MODULE  =
 CFLAGS_KERNEL	=
 AFLAGS_KERNEL	=
-CFLAGS_GCOV	= -fprofile-arcs -ftest-coverage -fno-tree-loop-im
+CFLAGS_GCOV	= -fprofile-arcs -ftest-coverage -fno-tree-loop-im -Wno-maybe-uninitialized
 
 
 # Use USERINCLUDE when you must reference the UAPI directories only.
-- 
2.10.1


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

* [patch added to 3.12-stable] Disable "maybe-uninitialized" warning globally
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (5 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] gcov: disable -Wmaybe-uninitialized warning Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] Disable "frame-address" warning Jiri Slaby
                   ` (25 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Linus Torvalds, Jiri Slaby

From: Linus Torvalds <torvalds@linux-foundation.org>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 6e8d666e925333c55378e8d5540a8a9ee0eea9c5 upstream.

Several build configurations had already disabled this warning because
it generates a lot of false positives.  But some had not, and it was
still enabled for "allmodconfig" builds, for example.

Looking at the warnings produced, every single one I looked at was a
false positive, and the warnings are frequent enough (and big enough)
that they can easily hide real problems that you don't notice in the
noise generated by -Wmaybe-uninitialized.

The warning is good in theory, but this is a classic case of a warning
that causes more problems than the warning can solve.

If gcc gets better at avoiding false positives, we may be able to
re-enable this warning.  But as is, we're better off without it, and I
want to be able to see the *real* warnings.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index c0e575c2594c..39bfb82f7106 100644
--- a/Makefile
+++ b/Makefile
@@ -351,7 +351,7 @@ AFLAGS_MODULE   =
 LDFLAGS_MODULE  =
 CFLAGS_KERNEL	=
 AFLAGS_KERNEL	=
-CFLAGS_GCOV	= -fprofile-arcs -ftest-coverage -fno-tree-loop-im -Wno-maybe-uninitialized
+CFLAGS_GCOV	= -fprofile-arcs -ftest-coverage -fno-tree-loop-im
 
 
 # Use USERINCLUDE when you must reference the UAPI directories only.
@@ -582,11 +582,13 @@ endif # $(dot-config)
 # Defaults to vmlinux, but the arch makefile usually adds further targets
 all: vmlinux
 
+KBUILD_CFLAGS	+= $(call cc-disable-warning,maybe-uninitialized,)
+
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
-KBUILD_CFLAGS	+= -Os $(call cc-disable-warning,maybe-uninitialized,)
+KBUILD_CFLAGS	+= -Os
 else
 ifdef CONFIG_PROFILE_ALL_BRANCHES
-KBUILD_CFLAGS	+= -O2 $(call cc-disable-warning,maybe-uninitialized,)
+KBUILD_CFLAGS	+= -O2
 else
 KBUILD_CFLAGS   += -O2
 endif
-- 
2.10.1


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

* [patch added to 3.12-stable] Disable "frame-address" warning
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (6 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] Disable "maybe-uninitialized" warning globally Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] Makefile: Mute warning for __builtin_return_address(>0) for tracing only Jiri Slaby
                   ` (24 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Linus Torvalds, Jiri Slaby

From: Linus Torvalds <torvalds@linux-foundation.org>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 124a3d88fa20e1869fc229d7d8c740cc81944264 upstream.

Newer versions of gcc warn about the use of __builtin_return_address()
with a non-zero argument when "-Wall" is specified:

  kernel/trace/trace_irqsoff.c: In function ‘stop_critical_timings’:
  kernel/trace/trace_irqsoff.c:433:86: warning: calling ‘__builtin_return_address’ with a nonzero argument is unsafe [-Wframe-address]
     stop_critical_timing(CALLER_ADDR0, CALLER_ADDR1);
  [ .. repeats a few times for other similar cases .. ]

It is true that a non-zero argument is somewhat dangerous, and we do not
actually have very many uses of that in the kernel - but the ftrace code
does use it, and as Stephen Rostedt says:

 "We are well aware of the danger of using __builtin_return_address() of
  > 0.  In fact that's part of the reason for having the "thunk" code in
  x86 (See arch/x86/entry/thunk_{64,32}.S).  [..] it adds extra frames
  when tracking irqs off sections, to prevent __builtin_return_address()
  from accessing bad areas.  In fact the thunk_32.S states: 'Trampoline to
  trace irqs off.  (otherwise CALLER_ADDR1 might crash)'."

For now, __builtin_return_address() with a non-zero argument is the best
we can do, and the warning is not helpful and can end up making people
miss other warnings for real problems.

So disable the frame-address warning on compilers that need it.

Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index 39bfb82f7106..56ad5978a4e7 100644
--- a/Makefile
+++ b/Makefile
@@ -583,6 +583,7 @@ endif # $(dot-config)
 all: vmlinux
 
 KBUILD_CFLAGS	+= $(call cc-disable-warning,maybe-uninitialized,)
+KBUILD_CFLAGS	+= $(call cc-disable-warning,frame-address,)
 
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 KBUILD_CFLAGS	+= -Os
-- 
2.10.1


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

* [patch added to 3.12-stable] Makefile: Mute warning for __builtin_return_address(>0) for tracing only
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (7 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] Disable "frame-address" warning Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] net: caif: fix misleading indentation Jiri Slaby
                   ` (23 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Steven Rostedt, Jiri Slaby

From: Steven Rostedt <rostedt@goodmis.org>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 377ccbb483738f84400ddf5840c7dd8825716985 upstream.

With the latest gcc compilers, they give a warning if
__builtin_return_address() parameter is greater than 0. That is because if
it is used by a function called by a top level function (or in the case of
the kernel, by assembly), it can try to access stack frames outside the
stack and crash the system.

The tracing system uses __builtin_return_address() of up to 2! But it is
well aware of the dangers that it may have, and has even added precautions
to protect against it (see the thunk code in arch/x86/entry/thunk*.S)

Linus originally added KBUILD_CFLAGS that would suppress the warning for the
entire kernel, as simply adding KBUILD_CFLAGS to the tracing directory
wouldn't work. The tracing directory plays a bit with the CFLAGS and
requires a little more logic.

This adds that special logic to only suppress the warning for the tracing
directory. If it is used anywhere else outside of tracing, the warning will
still be triggered.

Link: http://lkml.kernel.org/r/20160728223043.51996267@grimm.local.home

Tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 Makefile              | 1 -
 kernel/trace/Makefile | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 56ad5978a4e7..39bfb82f7106 100644
--- a/Makefile
+++ b/Makefile
@@ -583,7 +583,6 @@ endif # $(dot-config)
 all: vmlinux
 
 KBUILD_CFLAGS	+= $(call cc-disable-warning,maybe-uninitialized,)
-KBUILD_CFLAGS	+= $(call cc-disable-warning,frame-address,)
 
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 KBUILD_CFLAGS	+= -Os
diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile
index d7e2068e4b71..67d201b66794 100644
--- a/kernel/trace/Makefile
+++ b/kernel/trace/Makefile
@@ -1,4 +1,8 @@
 
+# We are fully aware of the dangers of __builtin_return_address()
+FRAME_CFLAGS := $(call cc-disable-warning,frame-address)
+KBUILD_CFLAGS += $(FRAME_CFLAGS)
+
 # Do not instrument the tracer itself:
 
 ifdef CONFIG_FUNCTION_TRACER
-- 
2.10.1


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

* [patch added to 3.12-stable] net: caif: fix misleading indentation
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (8 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] Makefile: Mute warning for __builtin_return_address(>0) for tracing only Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] iwlegacy: avoid warning about missing braces Jiri Slaby
                   ` (22 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Arnd Bergmann, David S . Miller, Jiri Slaby

From: Arnd Bergmann <arnd@arndb.de>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 8e0cc8c326d99e41468c96fea9785ab78883a281 upstream.

gcc points out code that is not indented the way it is
interpreted:

net/caif/cfpkt_skbuff.c: In function 'cfpkt_setlen':
net/caif/cfpkt_skbuff.c:289:4: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
    return cfpkt_getlen(pkt);
    ^~~~~~
net/caif/cfpkt_skbuff.c:286:3: note: ...this 'else' clause, but it is not
   else
   ^~~~

It is clear from the context that not returning here would be
a bug, as we'd end up passing a negative length into a function
that takes a u16 length, so it is not missing curly braces
here, and I'm assuming that the indentation is the only part
that's wrong about it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 net/caif/cfpkt_skbuff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/caif/cfpkt_skbuff.c b/net/caif/cfpkt_skbuff.c
index 6493351f39c6..715251b72d7f 100644
--- a/net/caif/cfpkt_skbuff.c
+++ b/net/caif/cfpkt_skbuff.c
@@ -296,7 +296,7 @@ int cfpkt_setlen(struct cfpkt *pkt, u16 len)
 		else
 			skb_trim(skb, len);
 
-			return cfpkt_getlen(pkt);
+		return cfpkt_getlen(pkt);
 	}
 
 	/* Need to expand SKB */
-- 
2.10.1


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

* [patch added to 3.12-stable] iwlegacy: avoid warning about missing braces
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (9 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] net: caif: fix misleading indentation Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] Staging: iio: adc: fix indent on break statement Jiri Slaby
                   ` (21 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Arnd Bergmann, Kalle Valo, Jiri Slaby

From: Arnd Bergmann <arnd@arndb.de>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 2cce76c3fab410520610a7d2f52faebc3cfcf843 upstream.

gcc-6 warns about code in il3945_hw_txq_ctx_free() being
somewhat ambiguous:

drivers/net/wireless/intel/iwlegacy/3945.c:1022:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]

This adds a set of curly braces to avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/net/wireless/iwlegacy/3945.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c
index f09e257759d5..c076edc2c6e7 100644
--- a/drivers/net/wireless/iwlegacy/3945.c
+++ b/drivers/net/wireless/iwlegacy/3945.c
@@ -1020,12 +1020,13 @@ il3945_hw_txq_ctx_free(struct il_priv *il)
 	int txq_id;
 
 	/* Tx queues */
-	if (il->txq)
+	if (il->txq) {
 		for (txq_id = 0; txq_id < il->hw_params.max_txq_num; txq_id++)
 			if (txq_id == IL39_CMD_QUEUE_NUM)
 				il_cmd_queue_free(il);
 			else
 				il_tx_queue_free(il, txq_id);
+	}
 
 	/* free tx queue structure */
 	il_free_txq_mem(il);
-- 
2.10.1


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

* [patch added to 3.12-stable] Staging: iio: adc: fix indent on break statement
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (10 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] iwlegacy: avoid warning about missing braces Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] fix fault_in_multipages_...() on architectures with no-op access_ok() Jiri Slaby
                   ` (20 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Colin Ian King, Jonathan Cameron, Jiri Slaby

From: Colin Ian King <colin.king@canonical.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit b6acb0cfc21293a1bfc283e9217f58f7474ef728 upstream.

Fix indent warning when building with gcc 6:
drivers/staging/iio/adc/ad7192.c:239:4: warning: statement is indented
  as if it were guarded by... [-Wmisleading-indentation]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/staging/iio/adc/ad7192.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
index 3283e2829536..564167c0a725 100644
--- a/drivers/staging/iio/adc/ad7192.c
+++ b/drivers/staging/iio/adc/ad7192.c
@@ -236,7 +236,7 @@ static int ad7192_setup(struct ad7192_state *st,
 			st->mclk = pdata->ext_clk_Hz;
 		else
 			st->mclk = AD7192_INT_FREQ_MHz;
-			break;
+		break;
 	default:
 		ret = -EINVAL;
 		goto out;
-- 
2.10.1


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

* [patch added to 3.12-stable] fix fault_in_multipages_...() on architectures with no-op access_ok()
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (11 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] Staging: iio: adc: fix indent on break statement Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] mtd: pmcmsp-flash: Allocating too much in init_msp_flash() Jiri Slaby
                   ` (19 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Al Viro, Al Viro, Linus Torvalds, Jiri Slaby

From: Al Viro <viro@ZenIV.linux.org.uk>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit e23d4159b109167126e5bcd7f3775c95de7fee47 upstream.

Switching iov_iter fault-in to multipages variants has exposed an old
bug in underlying fault_in_multipages_...(); they break if the range
passed to them wraps around.  Normally access_ok() done by callers will
prevent such (and it's a guaranteed EFAULT - ERR_PTR() values fall into
such a range and they should not point to any valid objects).

However, on architectures where userland and kernel live in different
MMU contexts (e.g. s390) access_ok() is a no-op and on those a range
with a wraparound can reach fault_in_multipages_...().

Since any wraparound means EFAULT there, the fix is trivial - turn
those

    while (uaddr <= end)
	    ...
into

    if (unlikely(uaddr > end))
	    return -EFAULT;
    do
	    ...
    while (uaddr <= end);

Reported-by: Jan Stancek <jstancek@redhat.com>
Tested-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 include/linux/pagemap.h | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index bf944e86895b..db958a33caf1 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -574,56 +574,56 @@ static inline int fault_in_pages_readable(const char __user *uaddr, int size)
  */
 static inline int fault_in_multipages_writeable(char __user *uaddr, int size)
 {
-	int ret = 0;
 	char __user *end = uaddr + size - 1;
 
 	if (unlikely(size == 0))
-		return ret;
+		return 0;
 
+	if (unlikely(uaddr > end))
+		return -EFAULT;
 	/*
 	 * Writing zeroes into userspace here is OK, because we know that if
 	 * the zero gets there, we'll be overwriting it.
 	 */
-	while (uaddr <= end) {
-		ret = __put_user(0, uaddr);
-		if (ret != 0)
-			return ret;
+	do {
+		if (unlikely(__put_user(0, uaddr) != 0))
+			return -EFAULT;
 		uaddr += PAGE_SIZE;
-	}
+	} while (uaddr <= end);
 
 	/* Check whether the range spilled into the next page. */
 	if (((unsigned long)uaddr & PAGE_MASK) ==
 			((unsigned long)end & PAGE_MASK))
-		ret = __put_user(0, end);
+		return __put_user(0, end);
 
-	return ret;
+	return 0;
 }
 
 static inline int fault_in_multipages_readable(const char __user *uaddr,
 					       int size)
 {
 	volatile char c;
-	int ret = 0;
 	const char __user *end = uaddr + size - 1;
 
 	if (unlikely(size == 0))
-		return ret;
+		return 0;
 
-	while (uaddr <= end) {
-		ret = __get_user(c, uaddr);
-		if (ret != 0)
-			return ret;
+	if (unlikely(uaddr > end))
+		return -EFAULT;
+
+	do {
+		if (unlikely(__get_user(c, uaddr) != 0))
+			return -EFAULT;
 		uaddr += PAGE_SIZE;
-	}
+	} while (uaddr <= end);
 
 	/* Check whether the range spilled into the next page. */
 	if (((unsigned long)uaddr & PAGE_MASK) ==
 			((unsigned long)end & PAGE_MASK)) {
-		ret = __get_user(c, end);
-		(void)c;
+		return __get_user(c, end);
 	}
 
-	return ret;
+	return 0;
 }
 
 int add_to_page_cache_locked(struct page *page, struct address_space *mapping,
-- 
2.10.1


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

* [patch added to 3.12-stable] mtd: pmcmsp-flash: Allocating too much in init_msp_flash()
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (12 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] fix fault_in_multipages_...() on architectures with no-op access_ok() Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] fix memory leaks in tracing_buffers_splice_read() Jiri Slaby
                   ` (18 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Dan Carpenter, Brian Norris, Jiri Slaby

From: Dan Carpenter <dan.carpenter@oracle.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 79ad07d45743721010e766e65dc004ad249bd429 upstream.

There is a cut and paste issue here.  The bug is that we are allocating
more memory than necessary for msp_maps.  We should be allocating enough
space for a map_info struct (144 bytes) but we instead allocate enough
for an mtd_info struct (1840 bytes).  It's a small waste.

The other part of this is not harmful but when we allocated msp_flash
then we allocated enough space fro a map_info pointer instead of an
mtd_info pointer.  But since pointers are the same size it works out
fine.

Anyway, I decided to clean up all three allocations a bit to make them
a bit more consistent and clear.

Fixes: 68aa0fa87f6d ('[MTD] PMC MSP71xx flash/rootfs mappings')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/mtd/maps/pmcmsp-flash.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/maps/pmcmsp-flash.c b/drivers/mtd/maps/pmcmsp-flash.c
index 744ca5cacc9b..f9fa3fad728e 100644
--- a/drivers/mtd/maps/pmcmsp-flash.c
+++ b/drivers/mtd/maps/pmcmsp-flash.c
@@ -75,15 +75,15 @@ static int __init init_msp_flash(void)
 
 	printk(KERN_NOTICE "Found %d PMC flash devices\n", fcnt);
 
-	msp_flash = kmalloc(fcnt * sizeof(struct map_info *), GFP_KERNEL);
+	msp_flash = kcalloc(fcnt, sizeof(*msp_flash), GFP_KERNEL);
 	if (!msp_flash)
 		return -ENOMEM;
 
-	msp_parts = kmalloc(fcnt * sizeof(struct mtd_partition *), GFP_KERNEL);
+	msp_parts = kcalloc(fcnt, sizeof(*msp_parts), GFP_KERNEL);
 	if (!msp_parts)
 		goto free_msp_flash;
 
-	msp_maps = kcalloc(fcnt, sizeof(struct mtd_info), GFP_KERNEL);
+	msp_maps = kcalloc(fcnt, sizeof(*msp_maps), GFP_KERNEL);
 	if (!msp_maps)
 		goto free_msp_parts;
 
-- 
2.10.1


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

* [patch added to 3.12-stable] fix memory leaks in tracing_buffers_splice_read()
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (13 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] mtd: pmcmsp-flash: Allocating too much in init_msp_flash() Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] tracing: Move mutex to protect against resetting of seq data Jiri Slaby
                   ` (17 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Al Viro, Jiri Slaby

From: Al Viro <viro@zeniv.linux.org.uk>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 1ae2293dd6d2f5c823cf97e60b70d03631cd622f upstream.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 kernel/trace/trace.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 12cff54899ee..140f4d6e6caa 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -5179,11 +5179,6 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
 	}
 #endif
 
-	if (splice_grow_spd(pipe, &spd)) {
-		ret = -ENOMEM;
-		goto out;
-	}
-
 	if (*ppos & (PAGE_SIZE - 1)) {
 		ret = -EINVAL;
 		goto out;
@@ -5197,6 +5192,11 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
 		len &= PAGE_MASK;
 	}
 
+	if (splice_grow_spd(pipe, &spd)) {
+		ret = -ENOMEM;
+		goto out;
+	}
+
  again:
 	trace_access_lock(iter->cpu_file);
 	entries = ring_buffer_entries_cpu(iter->trace_buffer->buffer, iter->cpu_file);
@@ -5252,21 +5252,22 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
 	if (!spd.nr_pages) {
 		if ((file->f_flags & O_NONBLOCK) || (flags & SPLICE_F_NONBLOCK)) {
 			ret = -EAGAIN;
-			goto out;
+			goto out_shrink;
 		}
 		mutex_unlock(&trace_types_lock);
 		ret = iter->trace->wait_pipe(iter);
 		mutex_lock(&trace_types_lock);
 		if (ret)
-			goto out;
+			goto out_shrink;
 		if (signal_pending(current)) {
 			ret = -EINTR;
-			goto out;
+			goto out_shrink;
 		}
 		goto again;
 	}
 
 	ret = splice_to_pipe(pipe, &spd);
+out_shrink:
 	splice_shrink_spd(&spd);
 out:
 	mutex_unlock(&trace_types_lock);
-- 
2.10.1


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

* [patch added to 3.12-stable] tracing: Move mutex to protect against resetting of seq data
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (14 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] fix memory leaks in tracing_buffers_splice_read() Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] can: flexcan: fix resume function Jiri Slaby
                   ` (16 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Steven Rostedt (Red Hat), Jiri Slaby

From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 1245800c0f96eb6ebb368593e251d66c01e61022 upstream.

The iter->seq can be reset outside the protection of the mutex. So can
reading of user data. Move the mutex up to the beginning of the function.

Fixes: d7350c3f45694 ("tracing/core: make the read callbacks reentrants")
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 kernel/trace/trace.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 140f4d6e6caa..174b9a6feea3 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4132,13 +4132,6 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
 	struct trace_array *tr = iter->tr;
 	ssize_t sret;
 
-	/* return any leftover data */
-	sret = trace_seq_to_user(&iter->seq, ubuf, cnt);
-	if (sret != -EBUSY)
-		return sret;
-
-	trace_seq_init(&iter->seq);
-
 	/* copy the tracer to avoid using a global lock all around */
 	mutex_lock(&trace_types_lock);
 	if (unlikely(iter->trace->name != tr->current_trace->name))
@@ -4151,6 +4144,14 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
 	 * is protected.
 	 */
 	mutex_lock(&iter->mutex);
+
+	/* return any leftover data */
+	sret = trace_seq_to_user(&iter->seq, ubuf, cnt);
+	if (sret != -EBUSY)
+		goto out;
+
+	trace_seq_init(&iter->seq);
+
 	if (iter->trace->read) {
 		sret = iter->trace->read(iter, filp, ubuf, cnt, ppos);
 		if (sret)
-- 
2.10.1


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

* [patch added to 3.12-stable] can: flexcan: fix resume function
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (15 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] tracing: Move mutex to protect against resetting of seq data Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] btrfs: ensure that file descriptor used with subvol ioctls is a dir Jiri Slaby
                   ` (15 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Fabio Estevam, Marc Kleine-Budde, Jiri Slaby

From: Fabio Estevam <fabio.estevam@nxp.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 4de349e786a3a2d51bd02d56f3de151bbc3c3df9 upstream.

On a imx6ul-pico board the following error is seen during system suspend:

dpm_run_callback(): platform_pm_resume+0x0/0x54 returns -110
PM: Device 2090000.flexcan failed to resume: error -110

The reason for this suspend error is because when the CAN interface is not
active the clocks are disabled and then flexcan_chip_enable() will
always fail due to a timeout error.

In order to fix this issue, only call flexcan_chip_enable/disable()
when the CAN interface is active.

Based on a patch from Dong Aisheng in the NXP kernel.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/net/can/flexcan.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index ef57e1561229..57536e935fb9 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -1164,11 +1164,10 @@ static int flexcan_suspend(struct device *device)
 	struct flexcan_priv *priv = netdev_priv(dev);
 	int err;
 
-	err = flexcan_chip_disable(priv);
-	if (err)
-		return err;
-
 	if (netif_running(dev)) {
+		err = flexcan_chip_disable(priv);
+		if (err)
+			return err;
 		netif_stop_queue(dev);
 		netif_device_detach(dev);
 	}
@@ -1181,13 +1180,17 @@ static int flexcan_resume(struct device *device)
 {
 	struct net_device *dev = dev_get_drvdata(device);
 	struct flexcan_priv *priv = netdev_priv(dev);
+	int err;
 
 	priv->can.state = CAN_STATE_ERROR_ACTIVE;
 	if (netif_running(dev)) {
 		netif_device_attach(dev);
 		netif_start_queue(dev);
+		err = flexcan_chip_enable(priv);
+		if (err)
+			return err;
 	}
-	return flexcan_chip_enable(priv);
+	return 0;
 }
 #endif /* CONFIG_PM_SLEEP */
 
-- 
2.10.1


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

* [patch added to 3.12-stable] btrfs: ensure that file descriptor used with subvol ioctls is a dir
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (16 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] can: flexcan: fix resume function Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] i2c-eg20t: fix race between i2c init and interrupt enable Jiri Slaby
                   ` (14 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Jeff Mahoney, Chris Mason, Jiri Slaby

From: Jeff Mahoney <jeffm@suse.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 325c50e3cebb9208009083e841550f98a863bfa0 upstream.

If the subvol/snapshot create/destroy ioctls are passed a regular file
with execute permissions set, we'll eventually Oops while trying to do
inode->i_op->lookup via lookup_one_len.

This patch ensures that the file descriptor refers to a directory.

Fixes: cb8e70901d (Btrfs: Fix subvolume creation locking rules)
Fixes: 76dda93c6a (Btrfs: add snapshot/subvolume destroy ioctl)
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 fs/btrfs/ioctl.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 5f597cf570be..0dd3a574ab10 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1516,6 +1516,9 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file,
 	int namelen;
 	int ret = 0;
 
+	if (!S_ISDIR(file_inode(file)->i_mode))
+		return -ENOTDIR;
+
 	ret = mnt_want_write_file(file);
 	if (ret)
 		goto out;
@@ -1573,6 +1576,9 @@ static noinline int btrfs_ioctl_snap_create(struct file *file,
 	struct btrfs_ioctl_vol_args *vol_args;
 	int ret;
 
+	if (!S_ISDIR(file_inode(file)->i_mode))
+		return -ENOTDIR;
+
 	vol_args = memdup_user(arg, sizeof(*vol_args));
 	if (IS_ERR(vol_args))
 		return PTR_ERR(vol_args);
@@ -1596,6 +1602,9 @@ static noinline int btrfs_ioctl_snap_create_v2(struct file *file,
 	bool readonly = false;
 	struct btrfs_qgroup_inherit *inherit = NULL;
 
+	if (!S_ISDIR(file_inode(file)->i_mode))
+		return -ENOTDIR;
+
 	vol_args = memdup_user(arg, sizeof(*vol_args));
 	if (IS_ERR(vol_args))
 		return PTR_ERR(vol_args);
@@ -2118,6 +2127,9 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
 	int ret;
 	int err = 0;
 
+	if (!S_ISDIR(dir->i_mode))
+		return -ENOTDIR;
+
 	vol_args = memdup_user(arg, sizeof(*vol_args));
 	if (IS_ERR(vol_args))
 		return PTR_ERR(vol_args);
-- 
2.10.1


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

* [patch added to 3.12-stable] i2c-eg20t: fix race between i2c init and interrupt enable
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (17 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] btrfs: ensure that file descriptor used with subvol ioctls is a dir Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] qxl: check for kmap failures Jiri Slaby
                   ` (13 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Yadi.hu, Wolfram Sang, Jiri Slaby

From: "Yadi.hu" <yadi.hu@windriver.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 371a015344b6e270e7e3632107d9554ec6d27a6b upstream.

the eg20t driver call request_irq() function before the pch_base_address,
base address of i2c controller's register, is assigned an effective value.

there is one possible scenario that an interrupt which isn't inside eg20t
arrives immediately after request_irq() is executed when i2c controller
shares an interrupt number with others. since the interrupt handler
pch_i2c_handler() has already active as shared action, it will be called
and read its own register to determine if this interrupt is from itself.

At that moment, since base address of i2c registers is not remapped
in kernel space yet,so the INT handler will access an illegal address
and then a error occurs.

Signed-off-by: Yadi.hu <yadi.hu@windriver.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/i2c/busses/i2c-eg20t.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c
index 0f3752967c4b..773a6f5a509f 100644
--- a/drivers/i2c/busses/i2c-eg20t.c
+++ b/drivers/i2c/busses/i2c-eg20t.c
@@ -798,13 +798,6 @@ static int pch_i2c_probe(struct pci_dev *pdev,
 	/* Set the number of I2C channel instance */
 	adap_info->ch_num = id->driver_data;
 
-	ret = request_irq(pdev->irq, pch_i2c_handler, IRQF_SHARED,
-		  KBUILD_MODNAME, adap_info);
-	if (ret) {
-		pch_pci_err(pdev, "request_irq FAILED\n");
-		goto err_request_irq;
-	}
-
 	for (i = 0; i < adap_info->ch_num; i++) {
 		pch_adap = &adap_info->pch_data[i].pch_adapter;
 		adap_info->pch_i2c_suspended = false;
@@ -821,6 +814,17 @@ static int pch_i2c_probe(struct pci_dev *pdev,
 		adap_info->pch_data[i].pch_base_address = base_addr + 0x100 * i;
 
 		pch_adap->dev.parent = &pdev->dev;
+	}
+
+	ret = request_irq(pdev->irq, pch_i2c_handler, IRQF_SHARED,
+		  KBUILD_MODNAME, adap_info);
+	if (ret) {
+		pch_pci_err(pdev, "request_irq FAILED\n");
+		goto err_request_irq;
+	}
+
+	for (i = 0; i < adap_info->ch_num; i++) {
+		pch_adap = &adap_info->pch_data[i].pch_adapter;
 
 		pch_i2c_init(&adap_info->pch_data[i]);
 
-- 
2.10.1


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

* [patch added to 3.12-stable] qxl: check for kmap failures
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (18 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] i2c-eg20t: fix race between i2c init and interrupt enable Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common() Jiri Slaby
                   ` (12 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Dan Carpenter, Daniel Vetter, Jiri Slaby

From: Dan Carpenter <dan.carpenter@oracle.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit f4cceb2affcd1285d4ce498089e8a79f4cd2fa66 upstream.

If kmap fails, it leads to memory corruption.

Fixes: f64122c1f6ad ('drm: add new QXL driver. (v1.4)')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20160711084633.GA31411@mwanda
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/gpu/drm/qxl/qxl_draw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/qxl/qxl_draw.c b/drivers/gpu/drm/qxl/qxl_draw.c
index 56e1d633875e..6e6c76080d6a 100644
--- a/drivers/gpu/drm/qxl/qxl_draw.c
+++ b/drivers/gpu/drm/qxl/qxl_draw.c
@@ -136,6 +136,8 @@ static int qxl_palette_create_1bit(struct qxl_bo *palette_bo,
 				 * correctly globaly, since that would require
 				 * tracking all of our palettes. */
 	ret = qxl_bo_kmap(palette_bo, (void **)&pal);
+	if (ret)
+		return ret;
 	pal->num_ents = 2;
 	pal->unique = unique++;
 	if (visual == FB_VISUAL_TRUECOLOR || visual == FB_VISUAL_DIRECTCOLOR) {
-- 
2.10.1


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

* [patch added to 3.12-stable] hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common()
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (19 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] qxl: check for kmap failures Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] sched/core: Fix a race between try_to_wake_up() and a woken up task Jiri Slaby
                   ` (11 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Dan Carpenter, Richard Weinberger, Jiri Slaby

From: Dan Carpenter <dan.carpenter@oracle.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 8a545f185145e3c09348cd74326268ecfc6715a3 upstream.

We can't pass error pointers to kfree() or it causes an oops.

Fixes: 52b209f7b848 ('get rid of hostfs_read_inode()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 fs/hostfs/hostfs_kern.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 04091cd05095..6a5ed1b7c116 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -948,10 +948,11 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)
 
 	if (S_ISLNK(root_inode->i_mode)) {
 		char *name = follow_link(host_root_path);
-		if (IS_ERR(name))
+		if (IS_ERR(name)) {
 			err = PTR_ERR(name);
-		else
-			err = read_name(root_inode, name);
+			goto out_put;
+		}
+		err = read_name(root_inode, name);
 		kfree(name);
 		if (err)
 			goto out_put;
-- 
2.10.1


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

* [patch added to 3.12-stable] sched/core: Fix a race between try_to_wake_up() and a woken up task
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (20 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common() Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] CRIS: Fix headers_install Jiri Slaby
                   ` (10 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable
  Cc: Balbir Singh, Peter Zijlstra, Alexey Kardashevskiy,
	Linus Torvalds, Nicholas Piggin, Nicholas Piggin, Oleg Nesterov,
	Thomas Gleixner, Ingo Molnar, Greg Kroah-Hartman, Jiri Slaby

From: Balbir Singh <bsingharora@gmail.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 135e8c9250dd5c8c9aae5984fde6f230d0cbfeaf upstream.

The origin of the issue I've seen is related to
a missing memory barrier between check for task->state and
the check for task->on_rq.

The task being woken up is already awake from a schedule()
and is doing the following:

	do {
		schedule()
		set_current_state(TASK_(UN)INTERRUPTIBLE);
	} while (!cond);

The waker, actually gets stuck doing the following in
try_to_wake_up():

	while (p->on_cpu)
		cpu_relax();

Analysis:

The instance I've seen involves the following race:

 CPU1					CPU2

 while () {
   if (cond)
     break;
   do {
     schedule();
     set_current_state(TASK_UN..)
   } while (!cond);
					wakeup_routine()
					  spin_lock_irqsave(wait_lock)
   raw_spin_lock_irqsave(wait_lock)	  wake_up_process()
 }					  try_to_wake_up()
 set_current_state(TASK_RUNNING);	  ..
 list_del(&waiter.list);

CPU2 wakes up CPU1, but before it can get the wait_lock and set
current state to TASK_RUNNING the following occurs:

 CPU3
 wakeup_routine()
 raw_spin_lock_irqsave(wait_lock)
 if (!list_empty)
   wake_up_process()
   try_to_wake_up()
   raw_spin_lock_irqsave(p->pi_lock)
   ..
   if (p->on_rq && ttwu_wakeup())
   ..
   while (p->on_cpu)
     cpu_relax()
   ..

CPU3 tries to wake up the task on CPU1 again since it finds
it on the wait_queue, CPU1 is spinning on wait_lock, but immediately
after CPU2, CPU3 got it.

CPU3 checks the state of p on CPU1, it is TASK_UNINTERRUPTIBLE and
the task is spinning on the wait_lock. Interestingly since p->on_rq
is checked under pi_lock, I've noticed that try_to_wake_up() finds
p->on_rq to be 0. This was the most confusing bit of the analysis,
but p->on_rq is changed under runqueue lock, rq_lock, the p->on_rq
check is not reliable without this fix IMHO. The race is visible
(based on the analysis) only when ttwu_queue() does a remote wakeup
via ttwu_queue_remote. In which case the p->on_rq change is not
done uder the pi_lock.

The result is that after a while the entire system locks up on
the raw_spin_irqlock_save(wait_lock) and the holder spins infintely

Reproduction of the issue:

The issue can be reproduced after a long run on my system with 80
threads and having to tweak available memory to very low and running
memory stress-ng mmapfork test. It usually takes a long time to
reproduce. I am trying to work on a test case that can reproduce
the issue faster, but thats work in progress. I am still testing the
changes on my still in a loop and the tests seem OK thus far.

Big thanks to Benjamin and Nick for helping debug this as well.
Ben helped catch the missing barrier, Nick caught every missing
bit in my theory.

Signed-off-by: Balbir Singh <bsingharora@gmail.com>
[ Updated comment to clarify matching barriers. Many
  architectures do not have a full barrier in switch_to()
  so that cannot be relied upon. ]
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nicholas Piggin <nicholas.piggin@gmail.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/e02cce7b-d9ca-1ad0-7a61-ea97c7582b37@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 kernel/sched/core.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index e382c14652d0..d756a687dc11 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1503,6 +1503,28 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)
 	success = 1; /* we're going to change ->state */
 	cpu = task_cpu(p);
 
+	/*
+	 * Ensure we load p->on_rq _after_ p->state, otherwise it would
+	 * be possible to, falsely, observe p->on_rq == 0 and get stuck
+	 * in smp_cond_load_acquire() below.
+	 *
+	 * sched_ttwu_pending()                 try_to_wake_up()
+	 *   [S] p->on_rq = 1;                  [L] P->state
+	 *       UNLOCK rq->lock  -----.
+	 *                              \
+	 *				 +---   RMB
+	 * schedule()                   /
+	 *       LOCK rq->lock    -----'
+	 *       UNLOCK rq->lock
+	 *
+	 * [task p]
+	 *   [S] p->state = UNINTERRUPTIBLE     [L] p->on_rq
+	 *
+	 * Pairs with the UNLOCK+LOCK on rq->lock from the
+	 * last wakeup of our task and the schedule that got our task
+	 * current.
+	 */
+	smp_rmb();
 	if (p->on_rq && ttwu_remote(p, wake_flags))
 		goto stat;
 
-- 
2.10.1


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

* [patch added to 3.12-stable] CRIS: Fix headers_install
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (21 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] sched/core: Fix a race between try_to_wake_up() and a woken up task Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] powerpc/ps3: Remove unused os_area_db_id_video_mode Jiri Slaby
                   ` (9 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable
  Cc: Sam Ravnborg, Mikael Starvik, David Howells, Jesper Nilsson, Jiri Slaby

From: Sam Ravnborg <sam@ravnborg.org>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 6eb64b8c64f7177b160b4bdbabd317d523bf4bfc upstream.

Fix headers_install by adjusting the path to arch files.
And delete unused Kbuild file.
Drop special handling of cris in the headers.sh script
as a nice side-effect.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Mikael Starvik <starvik@axis.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 arch/cris/include/asm/Kbuild      | 4 ----
 arch/cris/include/uapi/asm/Kbuild | 4 ++--
 scripts/headers.sh                | 2 --
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/cris/include/asm/Kbuild b/arch/cris/include/asm/Kbuild
index 497776e4777d..874f77c4dd7b 100644
--- a/arch/cris/include/asm/Kbuild
+++ b/arch/cris/include/asm/Kbuild
@@ -1,8 +1,4 @@
 
-header-y += arch-v10/
-header-y += arch-v32/
-
-
 generic-y += clkdev.h
 generic-y += exec.h
 generic-y += kvm_para.h
diff --git a/arch/cris/include/uapi/asm/Kbuild b/arch/cris/include/uapi/asm/Kbuild
index 7d47b366ad82..01f66b8f15e5 100644
--- a/arch/cris/include/uapi/asm/Kbuild
+++ b/arch/cris/include/uapi/asm/Kbuild
@@ -1,8 +1,8 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += arch-v10/
-header-y += arch-v32/
+header-y += ../arch-v10/arch/
+header-y += ../arch-v32/arch/
 header-y += auxvec.h
 header-y += bitsperlong.h
 header-y += byteorder.h
diff --git a/scripts/headers.sh b/scripts/headers.sh
index 978b42b3acd7..9c0836faf46d 100755
--- a/scripts/headers.sh
+++ b/scripts/headers.sh
@@ -19,8 +19,6 @@ for arch in ${archs}; do
 	case ${arch} in
 	um)        # no userspace export
 		;;
-	cris)      # headers export are known broken
-		;;
 	*)
 		if [ -d ${srctree}/arch/${arch} ]; then
 			do_command $1 ${arch}
-- 
2.10.1


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

* [patch added to 3.12-stable] powerpc/ps3: Remove unused os_area_db_id_video_mode
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (22 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] CRIS: Fix headers_install Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] powerpc/ptrace: Fix out of bounds array access warning Jiri Slaby
                   ` (8 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Michael Ellerman, Jiri Slaby

From: Michael Ellerman <mpe@ellerman.id.au>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 4fa9a3f6b616fd9f2555d9d0c04513a942750986 upstream.

This struct is unused, which is now a build error with gcc 6:

  error: 'os_area_db_id_video_mode' defined but not used

There doesn't seem to be any good reason to keep it around so remove it,
it's in the history if anyone needs it.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 arch/powerpc/platforms/ps3/os-area.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c
index 09787139834d..3db53e8aff92 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -194,11 +194,6 @@ static const struct os_area_db_id os_area_db_id_rtc_diff = {
 	.key = OS_AREA_DB_KEY_RTC_DIFF
 };
 
-static const struct os_area_db_id os_area_db_id_video_mode = {
-	.owner = OS_AREA_DB_OWNER_LINUX,
-	.key = OS_AREA_DB_KEY_VIDEO_MODE
-};
-
 #define SECONDS_FROM_1970_TO_2000 946684800LL
 
 /**
-- 
2.10.1


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

* [patch added to 3.12-stable] powerpc/ptrace: Fix out of bounds array access warning
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (23 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] powerpc/ps3: Remove unused os_area_db_id_video_mode Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:22   ` Jiri Slaby
                   ` (7 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable
  Cc: Khem Raj, Kees Cook, Michael Ellerman, Segher Boessenkool, Jiri Slaby

From: Khem Raj <raj.khem@gmail.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 1e407ee3b21f981140491d5b8a36422979ca246f upstream.

gcc-6 correctly warns about a out of bounds access

arch/powerpc/kernel/ptrace.c:407:24: warning: index 32 denotes an offset greater than size of 'u64[32][1] {aka long long unsigned int[32][1]}' [-Warray-bounds]
        offsetof(struct thread_fp_state, fpr[32][0]));
                        ^

check the end of array instead of beginning of next element to fix this

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 arch/powerpc/kernel/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 9a0d24c390a3..929cdc0f34f5 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -376,7 +376,7 @@ static int fpr_get(struct task_struct *target, const struct user_regset *regset,
 
 #else
 	BUILD_BUG_ON(offsetof(struct thread_struct, fpscr) !=
-		     offsetof(struct thread_struct, TS_FPR(32)));
+		     offsetof(struct thread_struct, fpr[32]));
 
 	return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
 				   &target->thread.fpr, 0, -1);
@@ -404,7 +404,7 @@ static int fpr_set(struct task_struct *target, const struct user_regset *regset,
 	return 0;
 #else
 	BUILD_BUG_ON(offsetof(struct thread_struct, fpscr) !=
-		     offsetof(struct thread_struct, TS_FPR(32)));
+		     offsetof(struct thread_struct, fpr[32]));
 
 	return user_regset_copyin(&pos, &count, &kbuf, &ubuf,
 				  &target->thread.fpr, 0, -1);
-- 
2.10.1


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

* [patch added to 3.12-stable] ppp: defer netns reference release for ppp channel
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
@ 2016-10-06  6:22   ` Jiri Slaby
  2016-10-06  6:22 ` [patch added to 3.12-stable] kbuild: Do not run modules_install and install in paralel Jiri Slaby
                     ` (31 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable
  Cc: WANG Cong, Paul Mackerras, linux-ppp, Guillaume Nault,
	Cyrill Gorcunov, David S . Miller, Jiri Slaby

From: WANG Cong <xiyou.wangcong@gmail.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 205e1e255c479f3fd77446415706463b282f94e4 upstream.

Matt reported that we have a NULL pointer dereference
in ppp_pernet() from ppp_connect_channel(),
i.e. pch->chan_net is NULL.

This is due to that a parallel ppp_unregister_channel()
could happen while we are in ppp_connect_channel(), during
which pch->chan_net set to NULL. Since we need a reference
to net per channel, it makes sense to sync the refcnt
with the life time of the channel, therefore we should
release this reference when we destroy it.

Fixes: 1f461dcdd296 ("ppp: take reference on channels netns")
Reported-by: Matt Bennett <Matt.Bennett@alliedtelesis.co.nz>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linux-ppp@vger.kernel.org
Cc: Guillaume Nault <g.nault@alphalink.fr>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/net/ppp/ppp_generic.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 14a8d2958698..ab79c0f13d0a 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -2317,8 +2317,6 @@ ppp_unregister_channel(struct ppp_channel *chan)
 	spin_lock_bh(&pn->all_channels_lock);
 	list_del(&pch->list);
 	spin_unlock_bh(&pn->all_channels_lock);
-	put_net(pch->chan_net);
-	pch->chan_net = NULL;
 
 	pch->file.dead = 1;
 	wake_up_interruptible(&pch->file.rwait);
@@ -2925,6 +2923,9 @@ ppp_disconnect_channel(struct channel *pch)
  */
 static void ppp_destroy_channel(struct channel *pch)
 {
+	put_net(pch->chan_net);
+	pch->chan_net = NULL;
+
 	atomic_dec(&channel_count);
 
 	if (!pch->file.dead) {
-- 
2.10.1


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

* [patch added to 3.12-stable] ppp: defer netns reference release for ppp channel
@ 2016-10-06  6:22   ` Jiri Slaby
  0 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable
  Cc: WANG Cong, Paul Mackerras, linux-ppp, Guillaume Nault,
	Cyrill Gorcunov, David S . Miller, Jiri Slaby

From: WANG Cong <xiyou.wangcong@gmail.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

=======
commit 205e1e255c479f3fd77446415706463b282f94e4 upstream.

Matt reported that we have a NULL pointer dereference
in ppp_pernet() from ppp_connect_channel(),
i.e. pch->chan_net is NULL.

This is due to that a parallel ppp_unregister_channel()
could happen while we are in ppp_connect_channel(), during
which pch->chan_net set to NULL. Since we need a reference
to net per channel, it makes sense to sync the refcnt
with the life time of the channel, therefore we should
release this reference when we destroy it.

Fixes: 1f461dcdd296 ("ppp: take reference on channels netns")
Reported-by: Matt Bennett <Matt.Bennett@alliedtelesis.co.nz>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linux-ppp@vger.kernel.org
Cc: Guillaume Nault <g.nault@alphalink.fr>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/net/ppp/ppp_generic.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 14a8d2958698..ab79c0f13d0a 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -2317,8 +2317,6 @@ ppp_unregister_channel(struct ppp_channel *chan)
 	spin_lock_bh(&pn->all_channels_lock);
 	list_del(&pch->list);
 	spin_unlock_bh(&pn->all_channels_lock);
-	put_net(pch->chan_net);
-	pch->chan_net = NULL;
 
 	pch->file.dead = 1;
 	wake_up_interruptible(&pch->file.rwait);
@@ -2925,6 +2923,9 @@ ppp_disconnect_channel(struct channel *pch)
  */
 static void ppp_destroy_channel(struct channel *pch)
 {
+	put_net(pch->chan_net);
+	pch->chan_net = NULL;
+
 	atomic_dec(&channel_count);
 
 	if (!pch->file.dead) {
-- 
2.10.1


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

* [patch added to 3.12-stable] iommu/amd: Update Alias-DTE in update_device_table()
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (25 preceding siblings ...)
  2016-10-06  6:22   ` Jiri Slaby
@ 2016-10-06  6:22 ` Jiri Slaby
  2016-10-06  6:23 ` [patch added to 3.12-stable] clockevents: export clockevents_unbind_device instead of clockevents_unbind Jiri Slaby
                   ` (5 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:22 UTC (permalink / raw)
  To: stable; +Cc: Joerg Roedel, Jiri Slaby

From: Joerg Roedel <jroedel@suse.de>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 3254de6bf74fe94c197c9f819fe62a3a3c36f073 upstream.

Not doing so might cause IO-Page-Faults when a device uses
an alias request-id and the alias-dte is left in a lower
page-mode which does not cover the address allocated from
the iova-allocator.

Fixes: 492667dacc0a ('x86/amd-iommu: Remove amd_iommu_pd_table')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/iommu/amd_iommu.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 382c9ee08a25..73353a97aafb 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -2592,8 +2592,16 @@ static void update_device_table(struct protection_domain *domain)
 {
 	struct iommu_dev_data *dev_data;
 
-	list_for_each_entry(dev_data, &domain->dev_list, list)
+	list_for_each_entry(dev_data, &domain->dev_list, list) {
 		set_dte_entry(dev_data->devid, domain, dev_data->ats.enabled);
+
+		if (dev_data->alias_data == NULL)
+			continue;
+
+		/* There is an alias, update device table entry for it */
+		set_dte_entry(dev_data->alias_data->devid, domain,
+			      dev_data->alias_data->ats.enabled);
+	}
 }
 
 static void update_domain(struct protection_domain *domain)
-- 
2.10.1


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

* [patch added to 3.12-stable] clockevents: export clockevents_unbind_device instead of clockevents_unbind
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (26 preceding siblings ...)
  2016-10-06  6:22 ` [patch added to 3.12-stable] iommu/amd: Update Alias-DTE in update_device_table() Jiri Slaby
@ 2016-10-06  6:23 ` Jiri Slaby
  2016-10-06  6:23 ` [patch added to 3.12-stable] kernel/fork: fix CLONE_CHILD_CLEARTID regression in nscd Jiri Slaby
                   ` (4 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:23 UTC (permalink / raw)
  To: stable
  Cc: Vitaly Kuznetsov, K . Y . Srinivasan, Greg Kroah-Hartman, Jiri Slaby

From: Vitaly Kuznetsov <vkuznets@redhat.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 32a158325acf12842764b1681f53903673f2f22e upstream.

It looks like clockevents_unbind is being exported by mistake as:
- it is static;
- it is not listed in include/linux/clockchips.h;
- EXPORT_SYMBOL_GPL(clockevents_unbind) follows clockevents_unbind_device()
  implementation.

I think clockevents_unbind_device should be exported instead. This is going to
be used to teardown Hyper-V clockevent devices on module unload.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 kernel/time/clockevents.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index c2eb27b6017b..054c40b3fe77 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -371,7 +371,7 @@ int clockevents_unbind_device(struct clock_event_device *ced, int cpu)
 	mutex_unlock(&clockevents_mutex);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(clockevents_unbind);
+EXPORT_SYMBOL_GPL(clockevents_unbind_device);
 
 /**
  * clockevents_register_device - register a clock event device
-- 
2.10.1


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

* [patch added to 3.12-stable] kernel/fork: fix CLONE_CHILD_CLEARTID regression in nscd
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (27 preceding siblings ...)
  2016-10-06  6:23 ` [patch added to 3.12-stable] clockevents: export clockevents_unbind_device instead of clockevents_unbind Jiri Slaby
@ 2016-10-06  6:23 ` Jiri Slaby
  2016-10-06  6:23 ` [patch added to 3.12-stable] NFSD: Using free_conn free connection Jiri Slaby
                   ` (3 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:23 UTC (permalink / raw)
  To: stable
  Cc: Michal Hocko, Roland McGrath, Andreas Schwab, Andrew Morton,
	Linus Torvalds, Jiri Slaby

From: Michal Hocko <mhocko@suse.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 735f2770a770156100f534646158cb58cb8b2939 upstream.

Commit fec1d0115240 ("[PATCH] Disable CLONE_CHILD_CLEARTID for abnormal
exit") has caused a subtle regression in nscd which uses
CLONE_CHILD_CLEARTID to clear the nscd_certainly_running flag in the
shared databases, so that the clients are notified when nscd is
restarted.  Now, when nscd uses a non-persistent database, clients that
have it mapped keep thinking the database is being updated by nscd, when
in fact nscd has created a new (anonymous) one (for non-persistent
databases it uses an unlinked file as backend).

The original proposal for the CLONE_CHILD_CLEARTID change claimed
(https://lkml.org/lkml/2006/10/25/233):

: The NPTL library uses the CLONE_CHILD_CLEARTID flag on clone() syscalls
: on behalf of pthread_create() library calls.  This feature is used to
: request that the kernel clear the thread-id in user space (at an address
: provided in the syscall) when the thread disassociates itself from the
: address space, which is done in mm_release().
:
: Unfortunately, when a multi-threaded process incurs a core dump (such as
: from a SIGSEGV), the core-dumping thread sends SIGKILL signals to all of
: the other threads, which then proceed to clear their user-space tids
: before synchronizing in exit_mm() with the start of core dumping.  This
: misrepresents the state of process's address space at the time of the
: SIGSEGV and makes it more difficult for someone to debug NPTL and glibc
: problems (misleading him/her to conclude that the threads had gone away
: before the fault).
:
: The fix below is to simply avoid the CLONE_CHILD_CLEARTID action if a
: core dump has been initiated.

The resulting patch from Roland (https://lkml.org/lkml/2006/10/26/269)
seems to have a larger scope than the original patch asked for.  It
seems that limitting the scope of the check to core dumping should work
for SIGSEGV issue describe above.

[Changelog partly based on Andreas' description]
Fixes: fec1d0115240 ("[PATCH] Disable CLONE_CHILD_CLEARTID for abnormal exit")
Link: http://lkml.kernel.org/r/1471968749-26173-1-git-send-email-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Tested-by: William Preston <wpreston@suse.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Roland McGrath <roland@hack.frob.com>
Cc: Andreas Schwab <schwab@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 kernel/fork.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index 60403f7efdad..360c1d46e842 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -770,14 +770,12 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
 	deactivate_mm(tsk, mm);
 
 	/*
-	 * If we're exiting normally, clear a user-space tid field if
-	 * requested.  We leave this alone when dying by signal, to leave
-	 * the value intact in a core dump, and to save the unnecessary
-	 * trouble, say, a killed vfork parent shouldn't touch this mm.
-	 * Userland only wants this done for a sys_exit.
+	 * Signal userspace if we're not exiting with a core dump
+	 * because we want to leave the value intact for debugging
+	 * purposes.
 	 */
 	if (tsk->clear_child_tid) {
-		if (!(tsk->flags & PF_SIGNALED) &&
+		if (!(tsk->signal->flags & SIGNAL_GROUP_COREDUMP) &&
 		    atomic_read(&mm->mm_users) > 1) {
 			/*
 			 * We don't check the error code - if userspace has
-- 
2.10.1


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

* [patch added to 3.12-stable] NFSD: Using free_conn free connection
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (28 preceding siblings ...)
  2016-10-06  6:23 ` [patch added to 3.12-stable] kernel/fork: fix CLONE_CHILD_CLEARTID regression in nscd Jiri Slaby
@ 2016-10-06  6:23 ` Jiri Slaby
  2016-10-06  6:23 ` [patch added to 3.12-stable] kaweth: fix firmware download Jiri Slaby
                   ` (2 subsequent siblings)
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:23 UTC (permalink / raw)
  To: stable; +Cc: Kinglong Mee, J . Bruce Fields, Jiri Slaby

From: Kinglong Mee <kinglongmee@gmail.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 3f42d2c428c724212c5f4249daea97e254eb0546 upstream.

Connection from alloc_conn must be freed through free_conn,
otherwise, the reference of svc_xprt will never be put.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 fs/nfsd/nfs4state.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 0a138e4fc2e0..689595b03659 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2270,7 +2270,8 @@ out:
 	if (!list_empty(&clp->cl_revoked))
 		seq->status_flags |= SEQ4_STATUS_RECALLABLE_STATE_REVOKED;
 out_no_session:
-	kfree(conn);
+	if (conn)
+		free_conn(conn);
 	spin_unlock(&nn->client_lock);
 	return status;
 out_put_session:
-- 
2.10.1


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

* [patch added to 3.12-stable] kaweth: fix firmware download
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (29 preceding siblings ...)
  2016-10-06  6:23 ` [patch added to 3.12-stable] NFSD: Using free_conn free connection Jiri Slaby
@ 2016-10-06  6:23 ` Jiri Slaby
  2016-10-06  6:23 ` [patch added to 3.12-stable] IB/srpt: Simplify srpt_handle_tsk_mgmt() Jiri Slaby
  2016-10-06  6:23 ` [patch added to 3.12-stable] xfs: fixed signedness of error code in xfs_inode_buf_verify Jiri Slaby
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:23 UTC (permalink / raw)
  To: stable; +Cc: Oliver Neukum, David S . Miller, Jiri Slaby

From: Oliver Neukum <oneukum@suse.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 60bcabd080f53561efa9288be45c128feda1a8bb upstream.

This fixes the oops discovered by the Umap2 project and Alan Stern.
The intf member needs to be set before the firmware is downloaded.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/net/usb/kaweth.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c
index afb117c16d2d..8ba774de3474 100644
--- a/drivers/net/usb/kaweth.c
+++ b/drivers/net/usb/kaweth.c
@@ -1031,6 +1031,7 @@ static int kaweth_probe(
 	kaweth = netdev_priv(netdev);
 	kaweth->dev = udev;
 	kaweth->net = netdev;
+	kaweth->intf = intf;
 
 	spin_lock_init(&kaweth->device_lock);
 	init_waitqueue_head(&kaweth->term_wait);
@@ -1141,8 +1142,6 @@ err_fw:
 
 	dev_dbg(dev, "Initializing net device.\n");
 
-	kaweth->intf = intf;
-
 	kaweth->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
 	if (!kaweth->tx_urb)
 		goto err_free_netdev;
-- 
2.10.1


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

* [patch added to 3.12-stable] IB/srpt: Simplify srpt_handle_tsk_mgmt()
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (30 preceding siblings ...)
  2016-10-06  6:23 ` [patch added to 3.12-stable] kaweth: fix firmware download Jiri Slaby
@ 2016-10-06  6:23 ` Jiri Slaby
  2016-10-06  6:23 ` [patch added to 3.12-stable] xfs: fixed signedness of error code in xfs_inode_buf_verify Jiri Slaby
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:23 UTC (permalink / raw)
  To: stable
  Cc: Bart Van Assche, Nicholas Bellinger, Sagi Grimberg, Doug Ledford,
	Jiri Slaby

From: Bart Van Assche <bart.vanassche@sandisk.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 51093254bf879bc9ce96590400a87897c7498463 upstream.

Let the target core check task existence instead of the SRP target
driver. Additionally, let the target core check the validity of the
task management request instead of the ib_srpt driver.

This patch fixes the following kernel crash:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000001
IP: [<ffffffffa0565f37>] srpt_handle_new_iu+0x6d7/0x790 [ib_srpt]
Oops: 0002 [#1] SMP
Call Trace:
 [<ffffffffa05660ce>] srpt_process_completion+0xde/0x570 [ib_srpt]
 [<ffffffffa056669f>] srpt_compl_thread+0x13f/0x160 [ib_srpt]
 [<ffffffff8109726f>] kthread+0xcf/0xe0
 [<ffffffff81613cfc>] ret_from_fork+0x7c/0xb0

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Fixes: 3e4f574857ee ("ib_srpt: Convert TMR path to target_submit_tmr")
Tested-by: Alex Estrin <alex.estrin@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Acked-by: Benjamin Poirier <bpoirier@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/infiniband/ulp/srpt/ib_srpt.c | 59 +----------------------------------
 1 file changed, 1 insertion(+), 58 deletions(-)

diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 1ed08cc2e190..201b604f6371 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -1754,47 +1754,6 @@ send_sense:
 	return -1;
 }
 
-/**
- * srpt_rx_mgmt_fn_tag() - Process a task management function by tag.
- * @ch: RDMA channel of the task management request.
- * @fn: Task management function to perform.
- * @req_tag: Tag of the SRP task management request.
- * @mgmt_ioctx: I/O context of the task management request.
- *
- * Returns zero if the target core will process the task management
- * request asynchronously.
- *
- * Note: It is assumed that the initiator serializes tag-based task management
- * requests.
- */
-static int srpt_rx_mgmt_fn_tag(struct srpt_send_ioctx *ioctx, u64 tag)
-{
-	struct srpt_device *sdev;
-	struct srpt_rdma_ch *ch;
-	struct srpt_send_ioctx *target;
-	int ret, i;
-
-	ret = -EINVAL;
-	ch = ioctx->ch;
-	BUG_ON(!ch);
-	BUG_ON(!ch->sport);
-	sdev = ch->sport->sdev;
-	BUG_ON(!sdev);
-	spin_lock_irq(&sdev->spinlock);
-	for (i = 0; i < ch->rq_size; ++i) {
-		target = ch->ioctx_ring[i];
-		if (target->cmd.se_lun == ioctx->cmd.se_lun &&
-		    target->tag == tag &&
-		    srpt_get_cmd_state(target) != SRPT_STATE_DONE) {
-			ret = 0;
-			/* now let the target core abort &target->cmd; */
-			break;
-		}
-	}
-	spin_unlock_irq(&sdev->spinlock);
-	return ret;
-}
-
 static int srp_tmr_to_tcm(int fn)
 {
 	switch (fn) {
@@ -1829,7 +1788,6 @@ static void srpt_handle_tsk_mgmt(struct srpt_rdma_ch *ch,
 	struct se_cmd *cmd;
 	struct se_session *sess = ch->sess;
 	uint64_t unpacked_lun;
-	uint32_t tag = 0;
 	int tcm_tmr;
 	int rc;
 
@@ -1845,25 +1803,10 @@ static void srpt_handle_tsk_mgmt(struct srpt_rdma_ch *ch,
 	srpt_set_cmd_state(send_ioctx, SRPT_STATE_MGMT);
 	send_ioctx->tag = srp_tsk->tag;
 	tcm_tmr = srp_tmr_to_tcm(srp_tsk->tsk_mgmt_func);
-	if (tcm_tmr < 0) {
-		send_ioctx->cmd.se_tmr_req->response =
-			TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED;
-		goto fail;
-	}
 	unpacked_lun = srpt_unpack_lun((uint8_t *)&srp_tsk->lun,
 				       sizeof(srp_tsk->lun));
-
-	if (srp_tsk->tsk_mgmt_func == SRP_TSK_ABORT_TASK) {
-		rc = srpt_rx_mgmt_fn_tag(send_ioctx, srp_tsk->task_tag);
-		if (rc < 0) {
-			send_ioctx->cmd.se_tmr_req->response =
-					TMR_TASK_DOES_NOT_EXIST;
-			goto fail;
-		}
-		tag = srp_tsk->task_tag;
-	}
 	rc = target_submit_tmr(&send_ioctx->cmd, sess, NULL, unpacked_lun,
-				srp_tsk, tcm_tmr, GFP_KERNEL, tag,
+				srp_tsk, tcm_tmr, GFP_KERNEL, srp_tsk->task_tag,
 				TARGET_SCF_ACK_KREF);
 	if (rc != 0) {
 		send_ioctx->cmd.se_tmr_req->response = TMR_FUNCTION_REJECTED;
-- 
2.10.1


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

* [patch added to 3.12-stable] xfs: fixed signedness of error code in xfs_inode_buf_verify
  2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
                   ` (31 preceding siblings ...)
  2016-10-06  6:23 ` [patch added to 3.12-stable] IB/srpt: Simplify srpt_handle_tsk_mgmt() Jiri Slaby
@ 2016-10-06  6:23 ` Jiri Slaby
  32 siblings, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2016-10-06  6:23 UTC (permalink / raw)
  To: stable; +Cc: Jeff Mahoney, Dave Chinner, Brian Foster, Jiri Slaby

From: Jeff Mahoney <jeffm@suse.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

Prior to v3.17, XFS used positive error codes internally.  Commit
af8d971602b9583e5e8400e637e2a48c7480bc64 (xfs: inode recovery
readahead can race with inode buffer creation), upstream commit
b79f4a1c68bb99152d0785ee4ea3ab4396cdacc6 backported from later
releases need the error code signs reversed.  Negative error codes
will cause assertion failures (BUG_ON on kernels with assertions
enabled.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Cc: Dave Chinner <dchinner@redhat.com>
Cc: Brian Foster <bfoster@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 fs/xfs/xfs_inode_buf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_inode_buf.c b/fs/xfs/xfs_inode_buf.c
index 4b1447b3a9e4..03d237a0f58b 100644
--- a/fs/xfs/xfs_inode_buf.c
+++ b/fs/xfs/xfs_inode_buf.c
@@ -99,7 +99,7 @@ xfs_inode_buf_verify(
 						XFS_RANDOM_ITOBP_INOTOBP))) {
 			if (readahead) {
 				bp->b_flags &= ~XBF_DONE;
-				xfs_buf_ioerror(bp, -EIO);
+				xfs_buf_ioerror(bp, EIO);
 				return;
 			}
 
-- 
2.10.1


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

end of thread, other threads:[~2016-10-06  6:23 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-06  6:22 [patch added to 3.12-stable] ocfs2/dlm: fix race between convert and migration Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] ocfs2: fix start offset to ocfs2_zero_range_for_truncate() Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] kbuild: Do not run modules_install and install in paralel Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] Makefile: revert "Makefile: Document ability to make file.lst and file.S" partially Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] kbuild: forbid kernel directory to contain spaces and colons Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] gcov: disable -Wmaybe-uninitialized warning Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] Disable "maybe-uninitialized" warning globally Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] Disable "frame-address" warning Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] Makefile: Mute warning for __builtin_return_address(>0) for tracing only Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] net: caif: fix misleading indentation Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] iwlegacy: avoid warning about missing braces Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] Staging: iio: adc: fix indent on break statement Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] fix fault_in_multipages_...() on architectures with no-op access_ok() Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] mtd: pmcmsp-flash: Allocating too much in init_msp_flash() Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] fix memory leaks in tracing_buffers_splice_read() Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] tracing: Move mutex to protect against resetting of seq data Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] can: flexcan: fix resume function Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] btrfs: ensure that file descriptor used with subvol ioctls is a dir Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] i2c-eg20t: fix race between i2c init and interrupt enable Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] qxl: check for kmap failures Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common() Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] sched/core: Fix a race between try_to_wake_up() and a woken up task Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] CRIS: Fix headers_install Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] powerpc/ps3: Remove unused os_area_db_id_video_mode Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] powerpc/ptrace: Fix out of bounds array access warning Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] ppp: defer netns reference release for ppp channel Jiri Slaby
2016-10-06  6:22   ` Jiri Slaby
2016-10-06  6:22 ` [patch added to 3.12-stable] iommu/amd: Update Alias-DTE in update_device_table() Jiri Slaby
2016-10-06  6:23 ` [patch added to 3.12-stable] clockevents: export clockevents_unbind_device instead of clockevents_unbind Jiri Slaby
2016-10-06  6:23 ` [patch added to 3.12-stable] kernel/fork: fix CLONE_CHILD_CLEARTID regression in nscd Jiri Slaby
2016-10-06  6:23 ` [patch added to 3.12-stable] NFSD: Using free_conn free connection Jiri Slaby
2016-10-06  6:23 ` [patch added to 3.12-stable] kaweth: fix firmware download Jiri Slaby
2016-10-06  6:23 ` [patch added to 3.12-stable] IB/srpt: Simplify srpt_handle_tsk_mgmt() Jiri Slaby
2016-10-06  6:23 ` [patch added to 3.12-stable] xfs: fixed signedness of error code in xfs_inode_buf_verify Jiri Slaby

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.