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


Groups > linux.kernel > #1501693 > unrolled thread

[PATCH 3.12 00/84] 3.12.65-stable review

Started byJiri Slaby <jslaby@suse.cz>
First post2016-10-17 10:10 +0200
Last post2016-10-18 00:20 +0200
Articles 13 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 3.12 00/84] 3.12.65-stable review Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:10 +0200
    [PATCH 3.12 01/84] gcov: disable tree-loop-im to reduce stack usage Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:20 +0200
      [PATCH 3.12 43/84] drm/radeon/si/dpm: add workaround for for Jet parts Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:20 +0200
      [PATCH 3.12 17/84] fix fault_in_multipages_...() on architectures with no-op access_ok() Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
      [PATCH 3.12 11/84] Disable "maybe-uninitialized" warning globally Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
      [PATCH 3.12 13/84] Makefile: Mute warning for __builtin_return_address(>0) for tracing only Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
      [PATCH 3.12 20/84] tracing: Move mutex to protect against resetting of seq data Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
      [PATCH 3.12 18/84] mtd: pmcmsp-flash: Allocating too much in init_msp_flash() Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
      [PATCH 3.12 12/84] Disable "frame-address" warning Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
      [PATCH 3.12 15/84] iwlegacy: avoid warning about missing braces Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
      [PATCH 3.12 14/84] net: caif: fix misleading indentation Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
    Re: [PATCH 3.12 00/84] 3.12.65-stable review Guenter Roeck <linux@roeck-us.net> - 2016-10-17 20:40 +0200
    Re: [PATCH 3.12 00/84] 3.12.65-stable review Shuah Khan <shuah.kh@samsung.com> - 2016-10-18 00:20 +0200

#1501693 — [PATCH 3.12 00/84] 3.12.65-stable review

FromJiri Slaby <jslaby@suse.cz>
Date2016-10-17 10:10 +0200
Subject[PATCH 3.12 00/84] 3.12.65-stable review
Message-ID<stb9D-Tq-25@gated-at.bofh.it>
This is the start of the stable review cycle for the 3.12.65 release.
There are 84 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Wed Oct 19 09:48:13 CEST 2016.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	http://kernel.org/pub/linux/kernel/people/jirislaby/stable-review/patch-3.12.65-rc1.xz
and the diffstat can be found below.

thanks,
js

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


Al Viro (2):
  fix fault_in_multipages_...() on architectures with no-op access_ok()
  fix memory leaks in tracing_buffers_splice_read()

Alex Deucher (1):
  drm/radeon/si/dpm: add workaround for for Jet parts

Alex Vesker (2):
  IB/ipoib: Don't allow MC joins during light MC flush
  IB/mlx4: Fix incorrect MC join state bit-masking on SR-IOV

Alexander Graf (2):
  KVM: PPC: Book3S PR: Ignore PMU SPRs
  KVM: PPC: Book3S PR: Emulate TIR register

Arnd Bergmann (6):
  gcov: disable tree-loop-im to reduce stack usage
  Kbuild: disable 'maybe-uninitialized' warning for
    CONFIG_PROFILE_ALL_BRANCHES
  gcov: disable -Wmaybe-uninitialized warning
  net: caif: fix misleading indentation
  iwlegacy: avoid warning about missing braces
  gspca: avoid unused variable warnings

Ashish Samant (1):
  ocfs2: fix start offset to ocfs2_zero_range_for_truncate()

Balbir Singh (1):
  sched/core: Fix a race between try_to_wake_up() and a woken up task

Bart Van Assche (1):
  IB/srpt: Simplify srpt_handle_tsk_mgmt()

Chuck Lever (2):
  svc: Avoid garbage replies when pc_func() returns rpc_drop_reply
  NFS: Don't drop CB requests with invalid principals

Colin Ian King (1):
  Staging: iio: adc: fix indent on break statement

Dan Carpenter (8):
  mtd: pmcmsp-flash: Allocating too much in init_msp_flash()
  qxl: check for kmap failures
  hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common()
  tools/vm/slabinfo: fix an unintentional printf
  usb: gadget: fsl_qe_udc: signedness bug in qe_get_frame()
  em28xx-i2c: rt_mutex_trylock() returns zero on failure
  avr32: off by one in at32_init_pio()
  mfd: 88pm80x: Double shifting bug in suspend/resume

Erez Shitrit (2):
  IB/ipoib: Fix memory corruption in ipoib cm mode connect flow
  IB/core: Fix use after free in send_leave function

Fabio Estevam (1):
  can: flexcan: fix resume function

Florian Fainelli (2):
  brcmsmac: Free packet if dma_mapping_error() fails in dma_rxfill
  brcmsmac: Initialize power in brcms_c_stf_ss_algo_channel_get()

Greg Kroah-Hartman (2):
  usb: misc: legousbtower: Fix NULL pointer deference
  Revert "usbtmc: convert to devm_kzalloc"

Herbert Xu (1):
  crypto: skcipher - Fix blkcipher walk OOM crash

James Hogan (2):
  tile: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO
  KVM: MIPS: Drop other CPU ASIDs on guest MMU changes

Jann Horn (1):
  security: let security modules use PTRACE_MODE_* with bitmasks

Jeff Mahoney (3):
  reiserfs: fix "new_insert_key may be used uninitialized ..."
  btrfs: ensure that file descriptor used with subvol ioctls is a dir
  xfs: fixed signedness of error code in xfs_inode_buf_verify

Joerg Roedel (1):
  iommu/amd: Update Alias-DTE in update_device_table()

Joseph Qi (1):
  ocfs2/dlm: fix race between convert and migration

Karl Beldan (1):
  mtd: nand: davinci: Reinitialize the HW ECC engine in 4bit hwctl

Khem Raj (1):
  powerpc/ptrace: Fix out of bounds array access warning

Kinglong Mee (1):
  NFSD: Using free_conn free connection

Konstantin Shkolnyy (1):
  USB: serial: cp210x: fix hardware flow-control disable

Kyle Jones (1):
  USB: serial: cp210x: Add ID for a Juniper console

Linus Torvalds (2):
  Disable "maybe-uninitialized" warning globally
  Disable "frame-address" warning

Michael Ellerman (3):
  powerpc/ps3: Remove unused os_area_db_id_video_mode
  powerpc: Add macros for the ibm_architecture_vec[] lengths
  powerpc/prom: Fix sub-processor option passed to ibm,
    client-architecture-support

Michael Walle (1):
  hwmon: (adt7411) set bit 3 in CFG1 register

Michal Hocko (1):
  kernel/fork: fix CLONE_CHILD_CLEARTID regression in nscd

Michal Marek (1):
  kbuild: Do not run modules_install and install in paralel

Nicolas Iooss (1):
  printk: fix parsing of "brl=" option

Nishanth Menon (1):
  hwrng: omap - Fix assumption that runtime_get_sync will always succeed

Oliver Neukum (1):
  kaweth: fix firmware download

Paul Burton (1):
  MIPS: Malta: Fix IOCU disable switch read for MIPS64

Peter Ujfalusi (1):
  ASoC: omap-mcpdm: Fix irq resource handling

Peter Zijlstra (1):
  sched/core: Fix an SMP ordering race in try_to_wake_up() vs.
    schedule()

Prarit Bhargava (1):
  ACPICA: acpi_get_sleep_type_data: Reduce warnings

Radim Krčmář (1):
  KVM: nVMX: postpone VMCS changes on MSR_IA32_APICBASE write

Robert Jarzmik (1):
  kbuild: forbid kernel directory to contain spaces and colons

Robin Murphy (1):
  ARM: 8616/1: dt: Respect property size when parsing CPUs

Russell King (2):
  ARM: sa1100: clear reset status prior to reboot
  ARM: sa1111: fix pcmcia suspend/resume

Sam Ravnborg (1):
  CRIS: Fix headers_install

Sara Sharon (1):
  iwlwifi: pcie: fix access to scratch buffer

Sergei Miroshnichenko (1):
  can: dev: fix deadlock reported after bus-off

Srinivas Ramana (1):
  ARM: 8618/1: decompressor: reset ttbcr fields to use TTBR0 on ARMv7

Steven Rostedt (1):
  Makefile: Mute warning for __builtin_return_address(>0) for tracing
    only

Steven Rostedt (Red Hat) (1):
  tracing: Move mutex to protect against resetting of seq data

Takashi Iwai (1):
  ALSA: ali5451: Fix out-of-bound position reporting

Takashi Sakamoto (1):
  ALSA: usb-line6: use the same declaration as definition in header for
    MIDI manufacturer ID

Thomas Huth (1):
  KVM: PPC: Book3s PR: Allow access to unprivileged MMCR2 register

Uwe Kleine-König (1):
  mfd: wm8350-i2c: Make sure the i2c regmap functions are compiled

Vitaly Kuznetsov (1):
  clockevents: export clockevents_unbind_device instead of
    clockevents_unbind

WANG Cong (1):
  ppp: defer netns reference release for ppp channel

Wang YanQing (1):
  Makefile: revert "Makefile: Document ability to make file.lst and
    file.S" partially

Will Deacon (1):
  arm64: debug: avoid resetting stepping state machine when
    TIF_SINGLESTEP

Yadi.hu (1):
  i2c-eg20t: fix race between i2c init and interrupt enable

zhong jiang (1):
  mm,ksm: fix endless looping in allocating memory when ksm enable

 Makefile                                      | 22 ++++++++--
 arch/arm/boot/compressed/head.S               |  2 +-
 arch/arm/common/sa1111.c                      | 22 ++++++----
 arch/arm/kernel/devtree.c                     | 14 +++++--
 arch/arm/mach-sa1100/generic.c                |  3 ++
 arch/arm64/kernel/debug-monitors.c            |  6 ++-
 arch/avr32/mach-at32ap/pio.c                  |  2 +-
 arch/cris/include/asm/Kbuild                  |  4 --
 arch/cris/include/uapi/asm/Kbuild             |  4 +-
 arch/mips/kvm/kvm_mips_emul.c                 | 57 ++++++++++++++++++++++++--
 arch/mips/mti-malta/malta-setup.c             |  8 +++-
 arch/powerpc/include/asm/reg.h                |  1 +
 arch/powerpc/kernel/prom_init.c               | 32 ++++++++++-----
 arch/powerpc/kernel/ptrace.c                  |  4 +-
 arch/powerpc/kvm/book3s_emulate.c             | 17 ++++++++
 arch/powerpc/platforms/ps3/os-area.c          |  5 ---
 arch/tile/include/asm/elf.h                   |  1 +
 arch/tile/include/uapi/asm/auxvec.h           |  2 +
 arch/x86/kvm/vmx.c                            | 13 ++++++
 crypto/blkcipher.c                            |  3 +-
 drivers/acpi/acpica/hwxface.c                 | 24 +++++++----
 drivers/char/hw_random/omap-rng.c             | 16 +++++++-
 drivers/gpu/drm/qxl/qxl_draw.c                |  2 +
 drivers/gpu/drm/radeon/si_dpm.c               |  6 +++
 drivers/hwmon/adt7411.c                       |  5 ++-
 drivers/i2c/busses/i2c-eg20t.c                | 18 ++++----
 drivers/infiniband/core/multicast.c           | 13 +-----
 drivers/infiniband/hw/mlx4/mcg.c              | 14 +++----
 drivers/infiniband/ulp/ipoib/ipoib.h          |  1 +
 drivers/infiniband/ulp/ipoib/ipoib_cm.c       | 16 ++++++++
 drivers/infiniband/ulp/ipoib/ipoib_ib.c       |  9 ++++
 drivers/infiniband/ulp/ipoib/ipoib_main.c     |  2 +-
 drivers/infiniband/ulp/srpt/ib_srpt.c         | 59 +--------------------------
 drivers/iommu/amd_iommu.c                     | 10 ++++-
 drivers/media/usb/em28xx/em28xx-i2c.c         |  5 +--
 drivers/media/usb/gspca/cpia1.c               |  2 +-
 drivers/media/usb/gspca/konica.c              |  2 +-
 drivers/media/usb/gspca/t613.c                |  2 +-
 drivers/mfd/Kconfig                           |  1 +
 drivers/mtd/maps/pmcmsp-flash.c               |  6 +--
 drivers/mtd/nand/davinci_nand.c               |  3 ++
 drivers/net/can/dev.c                         | 27 +++++++-----
 drivers/net/can/flexcan.c                     | 13 +++---
 drivers/net/ppp/ppp_generic.c                 |  5 ++-
 drivers/net/usb/kaweth.c                      |  3 +-
 drivers/net/wireless/brcm80211/brcmsmac/dma.c |  4 +-
 drivers/net/wireless/brcm80211/brcmsmac/stf.c |  2 +-
 drivers/net/wireless/iwlegacy/3945.c          |  3 +-
 drivers/net/wireless/iwlwifi/pcie/tx.c        |  4 +-
 drivers/staging/iio/adc/ad7192.c              |  2 +-
 drivers/staging/line6/driver.c                |  2 +-
 drivers/usb/class/usbtmc.c                    |  3 +-
 drivers/usb/gadget/fsl_qe_udc.c               |  7 +---
 drivers/usb/misc/legousbtower.c               | 35 ++++++++--------
 drivers/usb/serial/cp210x.c                   |  3 +-
 fs/btrfs/ioctl.c                              | 12 ++++++
 fs/hostfs/hostfs_kern.c                       |  7 ++--
 fs/nfs/callback_xdr.c                         |  6 ++-
 fs/nfsd/nfs4state.c                           |  3 +-
 fs/ocfs2/dlm/dlmconvert.c                     | 12 +++---
 fs/ocfs2/file.c                               | 34 ++++++++++-----
 fs/reiserfs/ibalance.c                        |  3 +-
 fs/xfs/xfs_inode_buf.c                        |  2 +-
 include/linux/can/dev.h                       |  3 +-
 include/linux/mfd/88pm80x.h                   |  4 +-
 include/linux/pagemap.h                       | 38 ++++++++---------
 kernel/fork.c                                 | 10 ++---
 kernel/printk/braille.c                       |  4 +-
 kernel/sched/core.c                           | 41 +++++++++++++++++++
 kernel/time/clockevents.c                     |  2 +-
 kernel/trace/Makefile                         |  4 ++
 kernel/trace/trace.c                          | 32 ++++++++-------
 mm/ksm.c                                      |  3 +-
 net/caif/cfpkt_skbuff.c                       |  2 +-
 net/sunrpc/svc.c                              |  8 +++-
 scripts/headers.sh                            |  2 -
 security/yama/yama_lsm.c                      |  4 +-
 sound/pci/ali5451/ali5451.c                   |  2 +
 sound/soc/omap/omap-mcpdm.c                   |  5 ++-
 tools/vm/slabinfo.c                           |  3 +-
 80 files changed, 515 insertions(+), 282 deletions(-)

-- 
2.10.1

[toc] | [next] | [standalone]


#1501755 — [PATCH 3.12 01/84] gcov: disable tree-loop-im to reduce stack usage

FromJiri Slaby <jslaby@suse.cz>
Date2016-10-17 10:20 +0200
Subject[PATCH 3.12 01/84] gcov: disable tree-loop-im to reduce stack usage
Message-ID<staZY-A3-7@gated-at.bofh.it>
In reply to#1501693
From: Arnd Bergmann <arnd@arndb.de>

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

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

commit c87bf431448b404a6ef5fbabd74c0e3e42157a7f upstream.

Enabling CONFIG_GCOV_PROFILE_ALL produces us a lot of warnings like

lib/lz4/lz4hc_compress.c: In function 'lz4_compresshcctx':
lib/lz4/lz4hc_compress.c:514:1: warning: the frame size of 1504 bytes is larger than 1024 bytes [-Wframe-larger-than=]

After some investigation, I found that this behavior started with gcc-4.9,
and opened https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69702.
A suggested workaround for it is to use the -fno-tree-loop-im
flag that turns off one of the optimization stages in gcc, so the
code runs a little slower but does not use excessive amounts
of stack.

We could make this conditional on the gcc version, but I could not
find an easy way to do this in Kbuild and the benefit would be
fairly small, given that most of the gcc version in production are
affected now.

I'm marking this for 'stable' backports because it addresses a bug
with code generation in gcc that exists in all kernel versions
with the affected gcc releases.

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 a90b363b3493..4c1baa9b6bae 100644
--- a/Makefile
+++ b/Makefile
@@ -347,7 +347,7 @@ AFLAGS_MODULE   =
 LDFLAGS_MODULE  =
 CFLAGS_KERNEL	=
 AFLAGS_KERNEL	=
-CFLAGS_GCOV	= -fprofile-arcs -ftest-coverage
+CFLAGS_GCOV	= -fprofile-arcs -ftest-coverage -fno-tree-loop-im
 
 
 # Use USERINCLUDE when you must reference the UAPI directories only.
-- 
2.10.1

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


#1501756 — [PATCH 3.12 43/84] drm/radeon/si/dpm: add workaround for for Jet parts

FromJiri Slaby <jslaby@suse.cz>
Date2016-10-17 10:20 +0200
Subject[PATCH 3.12 43/84] drm/radeon/si/dpm: add workaround for for Jet parts
Message-ID<stbjm-YS-93@gated-at.bofh.it>
In reply to#1501755
From: Alex Deucher <alexander.deucher@amd.com>

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

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

commit 670bb4fd21c966d0d2a59ad4a99bb4889f9a2987 upstream.

Add clock quirks for Jet parts.

Reviewed-by: Sonny Jiang <sonny.jiang@amd.com>
Tested-by: Sonny Jiang <sonny.jiang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/gpu/drm/radeon/si_dpm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index 393217886d98..db9c7d26ed16 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -3012,6 +3012,12 @@ static void si_apply_state_adjust_rules(struct radeon_device *rdev,
 	if (rdev->pdev->device == 0x6811 &&
 	    rdev->pdev->revision == 0x81)
 		max_mclk = 120000;
+	/* limit sclk/mclk on Jet parts for stability */
+	if (rdev->pdev->device == 0x6665 &&
+	    rdev->pdev->revision == 0xc3) {
+		max_sclk = 75000;
+		max_mclk = 80000;
+	}
 
 	/* XXX validate the min clocks required for display */
 
-- 
2.10.1

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


#1501757 — [PATCH 3.12 17/84] fix fault_in_multipages_...() on architectures with no-op access_ok()

FromJiri Slaby <jslaby@suse.cz>
Date2016-10-17 10:30 +0200
Subject[PATCH 3.12 17/84] fix fault_in_multipages_...() on architectures with no-op access_ok()
Message-ID<stbsZ-12r-1@gated-at.bofh.it>
In reply to#1501755
From: Al Viro <viro@ZenIV.linux.org.uk>

3.12-stable review patch.  If anyone has any objections, please let me 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

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


#1501761 — [PATCH 3.12 11/84] Disable "maybe-uninitialized" warning globally

FromJiri Slaby <jslaby@suse.cz>
Date2016-10-17 10:30 +0200
Subject[PATCH 3.12 11/84] Disable "maybe-uninitialized" warning globally
Message-ID<stbt0-12r-27@gated-at.bofh.it>
In reply to#1501755
From: Linus Torvalds <torvalds@linux-foundation.org>

3.12-stable review patch.  If anyone has any objections, please let me 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

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


#1501762 — [PATCH 3.12 13/84] Makefile: Mute warning for __builtin_return_address(>0) for tracing only

FromJiri Slaby <jslaby@suse.cz>
Date2016-10-17 10:30 +0200
Subject[PATCH 3.12 13/84] Makefile: Mute warning for __builtin_return_address(>0) for tracing only
Message-ID<stbt0-12r-17@gated-at.bofh.it>
In reply to#1501755
From: Steven Rostedt <rostedt@goodmis.org>

3.12-stable review patch.  If anyone has any objections, please let me 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

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


#1501764 — [PATCH 3.12 20/84] tracing: Move mutex to protect against resetting of seq data

FromJiri Slaby <jslaby@suse.cz>
Date2016-10-17 10:30 +0200
Subject[PATCH 3.12 20/84] tracing: Move mutex to protect against resetting of seq data
Message-ID<stbt0-12r-33@gated-at.bofh.it>
In reply to#1501755
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>

3.12-stable review patch.  If anyone has any objections, please let me 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

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


#1501766 — [PATCH 3.12 18/84] mtd: pmcmsp-flash: Allocating too much in init_msp_flash()

FromJiri Slaby <jslaby@suse.cz>
Date2016-10-17 10:30 +0200
Subject[PATCH 3.12 18/84] mtd: pmcmsp-flash: Allocating too much in init_msp_flash()
Message-ID<stbt0-12r-35@gated-at.bofh.it>
In reply to#1501755
From: Dan Carpenter <dan.carpenter@oracle.com>

3.12-stable review patch.  If anyone has any objections, please let me 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

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


#1501767 — [PATCH 3.12 12/84] Disable "frame-address" warning

FromJiri Slaby <jslaby@suse.cz>
Date2016-10-17 10:30 +0200
Subject[PATCH 3.12 12/84] Disable "frame-address" warning
Message-ID<stbt0-12r-29@gated-at.bofh.it>
In reply to#1501755
From: Linus Torvalds <torvalds@linux-foundation.org>

3.12-stable review patch.  If anyone has any objections, please let me 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

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


#1501768 — [PATCH 3.12 15/84] iwlegacy: avoid warning about missing braces

FromJiri Slaby <jslaby@suse.cz>
Date2016-10-17 10:30 +0200
Subject[PATCH 3.12 15/84] iwlegacy: avoid warning about missing braces
Message-ID<stbt1-12r-41@gated-at.bofh.it>
In reply to#1501755
From: Arnd Bergmann <arnd@arndb.de>

3.12-stable review patch.  If anyone has any objections, please let me 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

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


#1501770 — [PATCH 3.12 14/84] net: caif: fix misleading indentation

FromJiri Slaby <jslaby@suse.cz>
Date2016-10-17 10:30 +0200
Subject[PATCH 3.12 14/84] net: caif: fix misleading indentation
Message-ID<stbt0-12r-37@gated-at.bofh.it>
In reply to#1501755
From: Arnd Bergmann <arnd@arndb.de>

3.12-stable review patch.  If anyone has any objections, please let me 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

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


#1502333

FromGuenter Roeck <linux@roeck-us.net>
Date2016-10-17 20:40 +0200
Message-ID<stkZj-7hj-7@gated-at.bofh.it>
In reply to#1501693
On Mon, Oct 17, 2016 at 09:51:48AM +0200, Jiri Slaby wrote:
> This is the start of the stable review cycle for the 3.12.65 release.
> There are 84 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Wed Oct 19 09:48:13 CEST 2016.
> Anything received after that time might be too late.
> 

Build results:
	total: 128 pass: 128 fail: 0
Qemu test results:
	total: 85 pass: 85 fail: 0

Details are available at http://kerneltests.org/builders.

Guenter

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


#1502533

FromShuah Khan <shuah.kh@samsung.com>
Date2016-10-18 00:20 +0200
Message-ID<stoqe-1pY-35@gated-at.bofh.it>
In reply to#1501693
On 10/17/2016 01:51 AM, Jiri Slaby wrote:
> This is the start of the stable review cycle for the 3.12.65 release.
> There are 84 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Wed Oct 19 09:48:13 CEST 2016.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	http://kernel.org/pub/linux/kernel/people/jirislaby/stable-review/patch-3.12.65-rc1.xz
> and the diffstat can be found below.
> 
> thanks,
> js
> 
> ===============

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

thanks,
-- Shuah

-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America(Silicon Valley)
shuah.kh@samsung.com

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web