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


Groups > linux.kernel > #1669411 > unrolled thread

[PATCH 4.9 00/60] 4.9.34-stable review

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-06-19 18:10 +0200
Last post2017-06-19 18:10 +0200
Articles 8 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 4.9 00/60] 4.9.34-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200
    [PATCH 4.9 06/60] [media] vb2: Fix an off by one error in vb2_plane_vaddr Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200
    [PATCH 4.9 14/60] mac80211: fix IBSS presp allocation size Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200
    [PATCH 4.9 37/60] USB: gadget: dummy_hcd: fix hub-descriptor removable fields Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200
    [PATCH 4.9 09/60] drm/amdgpu: Fix overflow of watermark calcs at > 4k resolutions. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200
    [PATCH 4.9 15/60] mac80211: strictly check mesh address extension mode Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200
    [PATCH 4.9 22/60] x86/mm/32: Set the __vmalloc_start_set flag in initmem_init() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200
    [PATCH 4.9 13/60] mac80211: fix packet statistics for fast-RX Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200

#1669411 — [PATCH 4.9 00/60] 4.9.34-stable review

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-19 18:10 +0200
Subject[PATCH 4.9 00/60] 4.9.34-stable review
Message-ID<tU6MO-4pB-3@gated-at.bofh.it>
This is the start of the stable review cycle for the 4.9.34 release.
There are 60 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 Jun 21 15:16:33 UTC 2017.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.34-rc1.gz
or in the git tree and branch at:
  git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
and the diffstat can be found below.

thanks,

greg k-h

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

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

Hugh Dickins <hughd@google.com>
    mm: larger stack guard gap, between vmas

Thomas Gleixner <tglx@linutronix.de>
    alarmtimer: Rate limit periodic intervals

David Miller <davem@davemloft.net>
    crypto: Work around deallocated stack frame reference gcc bug on sparc.

Hon Ching \(Vicky) Lo <honclo@linux.vnet.ibm.com>
    vTPM: Fix missing NULL check

Paul Burton <paul.burton@imgtec.com>
    MIPS: .its targets depend on vmlinux

Paul Burton <paul.burton@imgtec.com>
    MIPS: Fix bnezc/jialc return address calculation

Shuah Khan <shuah@kernel.org>
    usb: dwc3: exynos fix axius clock error path to do cleanup

Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    usb: gadget: composite: Fix function used to free memory

Thomas Gleixner <tglx@linutronix.de>
    alarmtimer: Prevent overflow of relative timers

Heiner Kallweit <hkallweit1@gmail.com>
    genirq: Release resources in __setup_irq() error path

Andy Lutomirski <luto@kernel.org>
    sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off()

Jean-Baptiste Maneyrol <JManeyrol@invensense.com>
    iio: imu: inv_mpu6050: add accel lpf setting for chip >= MPU6500

Yu Zhao <yuzhao@google.com>
    swap: cond_resched in swap_cgroup_prepare()

James Morse <james.morse@arm.com>
    mm/memory-failure.c: use compound_head() flags for huge pages

Alan Stern <stern@rowland.harvard.edu>
    USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks

Alan Stern <stern@rowland.harvard.edu>
    USB: gadget: fix GPF in gadgetfs

Corentin Labbe <clabbe.montjoie@gmail.com>
    usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk

YD Tseng <yd_tseng@asmedia.com.tw>
    usb: xhci: Fix USB 3.1 supported protocol parsing

Dan Carpenter <dan.carpenter@oracle.com>
    drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR()

Dan Carpenter <dan.carpenter@oracle.com>
    misc: mic: double free on ioctl error path

Kalle Valo <kvalo@qca.qualcomm.com>
    ath10k: fix napi crash during rmmod when probe firmware fails

Chris Brandt <chris.brandt@renesas.com>
    usb: r8a66597-hcd: decrease timeout

Chris Brandt <chris.brandt@renesas.com>
    usb: r8a66597-hcd: select a different endpoint on timeout

Johan Hovold <johan@kernel.org>
    USB: gadget: dummy_hcd: fix hub-descriptor removable fields

Arnd Bergmann <arnd@arndb.de>
    pvrusb2: reduce stack usage pvr2_eeprom_analyze()

Johan Hovold <johan@kernel.org>
    USB: usbip: fix nonconforming hub descriptor

Anton Bondarenko <anton.bondarenko.sama@gmail.com>
    usb: core: fix potential memory leak in error path during hcd creation

Johan Hovold <johan@kernel.org>
    USB: hub: fix SS max number of ports

Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    usb: gadget: udc: renesas_usb3: lock for PN_ registers access

Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    usb: gadget: udc: renesas_usb3: fix deadlock by spinlock

Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    usb: gadget: udc: renesas_usb3: fix pm_runtime functions calling

Eli Cohen <eli@mellanox.com>
    IB/mlx5: Fix kernel to user leak prevention logic

Dan Carpenter <dan.carpenter@oracle.com>
    iio: adc: ti_am335x_adc: allocating too much in probe

Matt Ranostay <matt.ranostay@konsulko.com>
    iio: proximity: as3935: recalibrate RCO after resume

Marcin Niestroj <m.niestroj@grinn-global.com>
    iio: st_pressure: Fix data sign

Eva Rachel Retuya <eraretuya@gmail.com>
    staging: iio: tsl2x7x_core: Fix standard deviation calculation

Dan Carpenter <dan.carpenter@oracle.com>
    staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()

Tony Lindgren <tony@atomide.com>
    mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode

Laura Abbott <labbott@redhat.com>
    x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init()

Geert Uytterhoeven <geert+renesas@glider.be>
    serial: sh-sci: Fix late enablement of AUTORTS

Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    serial: efm32: Fix parity management in 'efm32_uart_console_get_options()'

Eric Anholt <eric@anholt.net>
    drm/vc4: Fix OOPSes from trying to cache a partially constructed BO.

YYS <nickey.yang@rock-chips.com>
    drm/mediatek: fix mtk_hdmi_setup_vendor_specific_infoframe mistake

Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    mac80211: don't send SMPS action frame in AP mode when not needed

Johannes Berg <johannes.berg@intel.com>
    mac80211: fix dropped counter in multiqueue RX

Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
    mac80211: strictly check mesh address extension mode

Johannes Berg <johannes.berg@intel.com>
    mac80211: fix IBSS presp allocation size

Johannes Berg <johannes.berg@intel.com>
    mac80211: fix packet statistics for fast-RX

Koen Vandeputte <koen.vandeputte@ncentric.com>
    mac80211: fix CSA in IBSS mode

Bin Liu <b-liu@ti.com>
    usb: musb: dsps: keep VBUS on for host-only mode

Zhenyu Wang <zhenyuw@linux.intel.com>
    drm/i915: Fix GVT-g PVINFO version compatibility check

Mario Kleiner <mario.kleiner.de@gmail.com>
    drm/amdgpu: Fix overflow of watermark calcs at > 4k resolutions.

Jason A. Donenfeld <Jason@zx2c4.com>
    mac80211/wpa: use constant time memory comparison for MACs

Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    mac80211: don't look at the PM bit of BAR frames

Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    vb2: Fix an off by one error in 'vb2_plane_vaddr'

Tomasz WilczyƄski <twilczynski@naver.com>
    cpufreq: conservative: Allow down_threshold to take values from 1 to 10

Arnd Bergmann <arnd@arndb.de>
    ila_xlat: add missing hash secret initialization

Marc Kleine-Budde <mkl@pengutronix.de>
    can: gs_usb: fix memory leak in gs_cmd_reset()

Nicholas Bellinger <nab@linux-iscsi.org>
    configfs: Fix race between create_link and configfs_rmdir

Christoph Hellwig <hch@lst.de>
    fs: pass on flags in compat_writev


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

Diffstat:

 Documentation/kernel-parameters.txt        |   7 ++
 Makefile                                   |   4 +-
 arch/arc/mm/mmap.c                         |   2 +-
 arch/arm/mm/mmap.c                         |   4 +-
 arch/frv/mm/elf-fdpic.c                    |   2 +-
 arch/mips/boot/Makefile                    |  10 +-
 arch/mips/kernel/branch.c                  |   4 +-
 arch/mips/mm/mmap.c                        |   2 +-
 arch/parisc/kernel/sys_parisc.c            |  15 +--
 arch/powerpc/mm/hugetlbpage-radix.c        |   2 +-
 arch/powerpc/mm/mmap.c                     |   4 +-
 arch/powerpc/mm/slice.c                    |   2 +-
 arch/s390/mm/mmap.c                        |   4 +-
 arch/sh/mm/mmap.c                          |   4 +-
 arch/sparc/kernel/sys_sparc_64.c           |   4 +-
 arch/sparc/mm/hugetlbpage.c                |   2 +-
 arch/tile/mm/hugetlbpage.c                 |   2 +-
 arch/x86/kernel/sys_x86_64.c               |   4 +-
 arch/x86/mm/hugetlbpage.c                  |   2 +-
 arch/x86/mm/numa_32.c                      |   1 +
 arch/xtensa/kernel/syscall.c               |   2 +-
 drivers/char/tpm/tpm_ibmvtpm.c             |  17 ++--
 drivers/cpufreq/cpufreq_conservative.c     |   4 +-
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c     |   7 +-
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c     |   7 +-
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c      |   7 +-
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c      |   7 +-
 drivers/gpu/drm/i915/i915_pvinfo.h         |   8 +-
 drivers/gpu/drm/i915/i915_vgpu.c           |  10 +-
 drivers/gpu/drm/mediatek/mtk_hdmi.c        |   2 +-
 drivers/gpu/drm/vc4/vc4_bo.c               |   8 ++
 drivers/iio/adc/ti_am335x_adc.c            |   2 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c |  39 +++++++-
 drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h  |   3 +
 drivers/iio/pressure/st_pressure_core.c    |  10 +-
 drivers/iio/proximity/as3935.c             |   6 +-
 drivers/infiniband/hw/mlx5/main.c          |  14 +--
 drivers/media/usb/pvrusb2/pvrusb2-eeprom.c |  13 +--
 drivers/media/v4l2-core/videobuf2-core.c   |   2 +-
 drivers/mfd/omap-usb-tll.c                 |   2 +-
 drivers/misc/c2port/c2port-duramar2150.c   |   4 +-
 drivers/misc/mic/vop/vop_vringh.c          |   1 -
 drivers/net/can/usb/gs_usb.c               |   2 +
 drivers/net/wireless/ath/ath10k/pci.c      |   3 +-
 drivers/staging/iio/light/tsl2x7x_core.c   |   2 +-
 drivers/staging/rtl8188eu/core/rtw_ap.c    |   2 +-
 drivers/tty/serial/efm32-uart.c            |  11 ++-
 drivers/tty/serial/sh-sci.c                |   4 +
 drivers/usb/core/hcd.c                     |   1 +
 drivers/usb/core/hub.c                     |   8 +-
 drivers/usb/dwc3/dwc3-exynos.c             |   4 +-
 drivers/usb/gadget/composite.c             |   2 +-
 drivers/usb/gadget/legacy/inode.c          |   9 +-
 drivers/usb/gadget/udc/dummy_hcd.c         |  19 ++--
 drivers/usb/gadget/udc/net2280.c           |   9 +-
 drivers/usb/gadget/udc/renesas_usb3.c      |  43 ++++++---
 drivers/usb/host/r8a66597-hcd.c            |   6 +-
 drivers/usb/host/xhci-mem.c                |   7 +-
 drivers/usb/host/xhci-pci.c                |   3 +
 drivers/usb/musb/musb_dsps.c               |   6 ++
 drivers/usb/usbip/vhci_hcd.c               |  11 ++-
 fs/btrfs/hash.c                            |   5 +-
 fs/configfs/symlink.c                      |   3 +-
 fs/f2fs/f2fs.h                             |   5 +-
 fs/hugetlbfs/inode.c                       |   2 +-
 fs/proc/task_mmu.c                         |   4 -
 fs/read_write.c                            |   2 +-
 include/linux/mm.h                         |  53 +++++-----
 include/uapi/linux/usb/ch11.h              |   3 +
 kernel/irq/manage.c                        |   4 +-
 kernel/sched/core.c                        |   2 +-
 kernel/time/alarmtimer.c                   |  14 ++-
 lib/libcrc32c.c                            |   6 +-
 mm/gup.c                                   |   5 -
 mm/memory-failure.c                        |   5 +-
 mm/memory.c                                |  38 --------
 mm/mmap.c                                  | 149 +++++++++++++++++------------
 mm/swap_cgroup.c                           |   3 +
 net/ipv6/ila/ila_xlat.c                    |   1 +
 net/mac80211/cfg.c                         |   2 +
 net/mac80211/ibss.c                        |   6 +-
 net/mac80211/rx.c                          |  10 +-
 net/mac80211/sta_info.c                    |   2 +-
 net/mac80211/wpa.c                         |   9 +-
 net/wireless/util.c                        |  10 +-
 85 files changed, 440 insertions(+), 311 deletions(-)

[toc] | [next] | [standalone]


#1669415 — [PATCH 4.9 06/60] [media] vb2: Fix an off by one error in vb2_plane_vaddr

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-19 18:10 +0200
Subject[PATCH 4.9 06/60] [media] vb2: Fix an off by one error in vb2_plane_vaddr
Message-ID<tU7py-4Ul-55@gated-at.bofh.it>
In reply to#1669411
4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

commit 5ebb6dd36c9f5fb37b1077b393c254d70a14cb46 upstream.

We should ensure that 'plane_no' is '< vb->num_planes' as done in
'vb2_plane_cookie' just a few lines below.

Fixes: e23ccc0ad925 ("[media] v4l: add videobuf2 Video for Linux 2 driver framework")

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/media/v4l2-core/videobuf2-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -868,7 +868,7 @@ EXPORT_SYMBOL_GPL(vb2_core_create_bufs);
 
 void *vb2_plane_vaddr(struct vb2_buffer *vb, unsigned int plane_no)
 {
-	if (plane_no > vb->num_planes || !vb->planes[plane_no].mem_priv)
+	if (plane_no >= vb->num_planes || !vb->planes[plane_no].mem_priv)
 		return NULL;
 
 	return call_ptr_memop(vb, vaddr, vb->planes[plane_no].mem_priv);

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


#1669417 — [PATCH 4.9 14/60] mac80211: fix IBSS presp allocation size

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-19 18:10 +0200
Subject[PATCH 4.9 14/60] mac80211: fix IBSS presp allocation size
Message-ID<tU7py-4Ul-57@gated-at.bofh.it>
In reply to#1669411
4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Johannes Berg <johannes.berg@intel.com>

commit f1f3e9e2a50a70de908f9dfe0d870e9cdc67e042 upstream.

When VHT IBSS support was added, the size of the extra elements
wasn't considered in ieee80211_ibss_build_presp(), which makes
it possible that it would overrun the allocated buffer. Fix it
by allocating the necessary space.

Fixes: abcff6ef01f9 ("mac80211: add VHT support for IBSS")
Reported-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/mac80211/ibss.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -66,6 +66,8 @@ ieee80211_ibss_build_presp(struct ieee80
 		    2 + (IEEE80211_MAX_SUPP_RATES - 8) +
 		    2 + sizeof(struct ieee80211_ht_cap) +
 		    2 + sizeof(struct ieee80211_ht_operation) +
+		    2 + sizeof(struct ieee80211_vht_cap) +
+		    2 + sizeof(struct ieee80211_vht_operation) +
 		    ifibss->ie_len;
 	presp = kzalloc(sizeof(*presp) + frame_len, GFP_KERNEL);
 	if (!presp)

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


#1669419 — [PATCH 4.9 37/60] USB: gadget: dummy_hcd: fix hub-descriptor removable fields

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-19 18:10 +0200
Subject[PATCH 4.9 37/60] USB: gadget: dummy_hcd: fix hub-descriptor removable fields
Message-ID<tU7py-4Ul-69@gated-at.bofh.it>
In reply to#1669411
4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Johan Hovold <johan@kernel.org>

commit d81182ce30dbd497a1e7047d7fda2af040347790 upstream.

Flag the first and only port as removable while also leaving the
remaining bits (including the reserved bit zero) unset in accordance
with the specifications:

	"Within a byte, if no port exists for a given location, the bit
	field representing the port characteristics shall be 0."

Also add a comment marking the legacy PortPwrCtrlMask field.

Fixes: 1cd8fd2887e1 ("usb: gadget: dummy_hcd: add SuperSpeed support")
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: Tatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/gadget/udc/dummy_hcd.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/usb/gadget/udc/dummy_hcd.c
+++ b/drivers/usb/gadget/udc/dummy_hcd.c
@@ -2009,7 +2009,7 @@ ss_hub_descriptor(struct usb_hub_descrip
 			HUB_CHAR_COMMON_OCPM);
 	desc->bNbrPorts = 1;
 	desc->u.ss.bHubHdrDecLat = 0x04; /* Worst case: 0.4 micro sec*/
-	desc->u.ss.DeviceRemovable = 0xffff;
+	desc->u.ss.DeviceRemovable = 0;
 }
 
 static inline void hub_descriptor(struct usb_hub_descriptor *desc)
@@ -2021,8 +2021,8 @@ static inline void hub_descriptor(struct
 			HUB_CHAR_INDV_PORT_LPSM |
 			HUB_CHAR_COMMON_OCPM);
 	desc->bNbrPorts = 1;
-	desc->u.hs.DeviceRemovable[0] = 0xff;
-	desc->u.hs.DeviceRemovable[1] = 0xff;
+	desc->u.hs.DeviceRemovable[0] = 0;
+	desc->u.hs.DeviceRemovable[1] = 0xff;	/* PortPwrCtrlMask */
 }
 
 static int dummy_hub_control(

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


#1669420 — [PATCH 4.9 09/60] drm/amdgpu: Fix overflow of watermark calcs at > 4k resolutions.

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-19 18:10 +0200
Subject[PATCH 4.9 09/60] drm/amdgpu: Fix overflow of watermark calcs at > 4k resolutions.
Message-ID<tU7py-4Ul-71@gated-at.bofh.it>
In reply to#1669411
4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Mario Kleiner <mario.kleiner.de@gmail.com>

commit bea10413934dcf98cb9b2dfcdc56e1d28f192897 upstream.

Commit d63c277dc672e0
("drm/amdgpu: Make display watermark calculations more accurate")
made watermark calculations more accurate, but not for > 4k
resolutions on 32-Bit architectures, as it introduced an integer
overflow for those setups and resolutions.

Fix this by proper u64 casting and division.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Fixes: d63c277dc672 ("drm/amdgpu: Make display watermark calculations more accurate")
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c |    7 +++++--
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c |    7 +++++--
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c  |    7 +++++--
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c  |    7 +++++--
 4 files changed, 20 insertions(+), 8 deletions(-)

--- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
@@ -1290,8 +1290,11 @@ static void dce_v10_0_program_watermarks
 	u32 tmp, wm_mask, lb_vblank_lead_lines = 0;
 
 	if (amdgpu_crtc->base.enabled && num_heads && mode) {
-		active_time = 1000000UL * (u32)mode->crtc_hdisplay / (u32)mode->clock;
-		line_time = min((u32) (1000000UL * (u32)mode->crtc_htotal / (u32)mode->clock), (u32)65535);
+		active_time = (u32) div_u64((u64)mode->crtc_hdisplay * 1000000,
+					    (u32)mode->clock);
+		line_time = (u32) div_u64((u64)mode->crtc_htotal * 1000000,
+					  (u32)mode->clock);
+		line_time = min(line_time, (u32)65535);
 
 		/* watermark for high clocks */
 		if (adev->pm.dpm_enabled) {
--- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
@@ -1257,8 +1257,11 @@ static void dce_v11_0_program_watermarks
 	u32 tmp, wm_mask, lb_vblank_lead_lines = 0;
 
 	if (amdgpu_crtc->base.enabled && num_heads && mode) {
-		active_time = 1000000UL * (u32)mode->crtc_hdisplay / (u32)mode->clock;
-		line_time = min((u32) (1000000UL * (u32)mode->crtc_htotal / (u32)mode->clock), (u32)65535);
+		active_time = (u32) div_u64((u64)mode->crtc_hdisplay * 1000000,
+					    (u32)mode->clock);
+		line_time = (u32) div_u64((u64)mode->crtc_htotal * 1000000,
+					  (u32)mode->clock);
+		line_time = min(line_time, (u32)65535);
 
 		/* watermark for high clocks */
 		if (adev->pm.dpm_enabled) {
--- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
@@ -1054,8 +1054,11 @@ static void dce_v6_0_program_watermarks(
 	fixed20_12 a, b, c;
 
 	if (amdgpu_crtc->base.enabled && num_heads && mode) {
-		active_time = 1000000UL * (u32)mode->crtc_hdisplay / (u32)mode->clock;
-		line_time = min((u32) (1000000UL * (u32)mode->crtc_htotal / (u32)mode->clock), (u32)65535);
+		active_time = (u32) div_u64((u64)mode->crtc_hdisplay * 1000000,
+					    (u32)mode->clock);
+		line_time = (u32) div_u64((u64)mode->crtc_htotal * 1000000,
+					  (u32)mode->clock);
+		line_time = min(line_time, (u32)65535);
 		priority_a_cnt = 0;
 		priority_b_cnt = 0;
 
--- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
@@ -1211,8 +1211,11 @@ static void dce_v8_0_program_watermarks(
 	u32 tmp, wm_mask, lb_vblank_lead_lines = 0;
 
 	if (amdgpu_crtc->base.enabled && num_heads && mode) {
-		active_time = 1000000UL * (u32)mode->crtc_hdisplay / (u32)mode->clock;
-		line_time = min((u32) (1000000UL * (u32)mode->crtc_htotal / (u32)mode->clock), (u32)65535);
+		active_time = (u32) div_u64((u64)mode->crtc_hdisplay * 1000000,
+					    (u32)mode->clock);
+		line_time = (u32) div_u64((u64)mode->crtc_htotal * 1000000,
+					  (u32)mode->clock);
+		line_time = min(line_time, (u32)65535);
 
 		/* watermark for high clocks */
 		if (adev->pm.dpm_enabled) {

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


#1669421 — [PATCH 4.9 15/60] mac80211: strictly check mesh address extension mode

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-19 18:10 +0200
Subject[PATCH 4.9 15/60] mac80211: strictly check mesh address extension mode
Message-ID<tU7py-4Ul-73@gated-at.bofh.it>
In reply to#1669411
4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>

commit 5667c86acf021e6dcf02584408b4484a273ac68f upstream.

Mesh forwarding path checks for address extension mode to fetch
appropriate proxied address and MPP address. Existing condition
that looks for 6 address format is not strict enough so that
frames with improper values are processed and invalid entries
are added into MPP table. Fix that by adding a stricter check before
processing the packet.

Per IEEE Std 802.11s-2011 spec. Table 7-6g1 lists address extension
mode 0x3 as reserved one. And also Table Table 9-13 does not specify
0x3 as valid address field.

Fixes: 9b395bc3be1c ("mac80211: verify that skb data is present")
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/mac80211/rx.c   |    3 ++-
 net/wireless/util.c |   10 ++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2471,7 +2471,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
 		if (is_multicast_ether_addr(hdr->addr1)) {
 			mpp_addr = hdr->addr3;
 			proxied_addr = mesh_hdr->eaddr1;
-		} else if (mesh_hdr->flags & MESH_FLAGS_AE_A5_A6) {
+		} else if ((mesh_hdr->flags & MESH_FLAGS_AE) ==
+			    MESH_FLAGS_AE_A5_A6) {
 			/* has_a4 already checked in ieee80211_rx_mesh_check */
 			mpp_addr = hdr->addr4;
 			proxied_addr = mesh_hdr->eaddr2;
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -454,6 +454,8 @@ int ieee80211_data_to_8023_exthdr(struct
 	if (iftype == NL80211_IFTYPE_MESH_POINT)
 		skb_copy_bits(skb, hdrlen, &mesh_flags, 1);
 
+	mesh_flags &= MESH_FLAGS_AE;
+
 	switch (hdr->frame_control &
 		cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) {
 	case cpu_to_le16(IEEE80211_FCTL_TODS):
@@ -469,9 +471,9 @@ int ieee80211_data_to_8023_exthdr(struct
 			     iftype != NL80211_IFTYPE_STATION))
 			return -1;
 		if (iftype == NL80211_IFTYPE_MESH_POINT) {
-			if (mesh_flags & MESH_FLAGS_AE_A4)
+			if (mesh_flags == MESH_FLAGS_AE_A4)
 				return -1;
-			if (mesh_flags & MESH_FLAGS_AE_A5_A6) {
+			if (mesh_flags == MESH_FLAGS_AE_A5_A6) {
 				skb_copy_bits(skb, hdrlen +
 					offsetof(struct ieee80211s_hdr, eaddr1),
 					tmp.h_dest, 2 * ETH_ALEN);
@@ -487,9 +489,9 @@ int ieee80211_data_to_8023_exthdr(struct
 		     ether_addr_equal(tmp.h_source, addr)))
 			return -1;
 		if (iftype == NL80211_IFTYPE_MESH_POINT) {
-			if (mesh_flags & MESH_FLAGS_AE_A5_A6)
+			if (mesh_flags == MESH_FLAGS_AE_A5_A6)
 				return -1;
-			if (mesh_flags & MESH_FLAGS_AE_A4)
+			if (mesh_flags == MESH_FLAGS_AE_A4)
 				skb_copy_bits(skb, hdrlen +
 					offsetof(struct ieee80211s_hdr, eaddr1),
 					tmp.h_source, ETH_ALEN);

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


#1669422 — [PATCH 4.9 22/60] x86/mm/32: Set the __vmalloc_start_set flag in initmem_init()

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-19 18:10 +0200
Subject[PATCH 4.9 22/60] x86/mm/32: Set the __vmalloc_start_set flag in initmem_init()
Message-ID<tU7py-4Ul-75@gated-at.bofh.it>
In reply to#1669411
4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Laura Abbott <labbott@redhat.com>

commit 861ce4a3244c21b0af64f880d5bfe5e6e2fb9e4a upstream.

'__vmalloc_start_set' currently only gets set in initmem_init() when
!CONFIG_NEED_MULTIPLE_NODES. This breaks detection of vmalloc address
with virt_addr_valid() with CONFIG_NEED_MULTIPLE_NODES=y, causing
a kernel crash:

  [mm/usercopy] 517e1fbeb6: kernel BUG at arch/x86/mm/physaddr.c:78!

Set '__vmalloc_start_set' appropriately for that case as well.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: dc16ecf7fd1f ("x86-32: use specific __vmalloc_start_set flag in __virt_addr_valid")
Link: http://lkml.kernel.org/r/1494278596-30373-1-git-send-email-labbott@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/mm/numa_32.c |    1 +
 1 file changed, 1 insertion(+)

--- a/arch/x86/mm/numa_32.c
+++ b/arch/x86/mm/numa_32.c
@@ -100,5 +100,6 @@ void __init initmem_init(void)
 	printk(KERN_DEBUG "High memory starts at vaddr %08lx\n",
 			(ulong) pfn_to_kaddr(highstart_pfn));
 
+	__vmalloc_start_set = true;
 	setup_bootmem_allocator();
 }

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


#1669425 — [PATCH 4.9 13/60] mac80211: fix packet statistics for fast-RX

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-19 18:10 +0200
Subject[PATCH 4.9 13/60] mac80211: fix packet statistics for fast-RX
Message-ID<tU7py-4Ul-79@gated-at.bofh.it>
In reply to#1669411
4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Johannes Berg <johannes.berg@intel.com>

commit 0328edc77d4f35014b35f32b46be0a7e16aae74f upstream.

When adding per-CPU statistics, which added statistics back
to mac80211 for the fast-RX path, I evidently forgot to add
the "stats->packets++" line. The reason for that is likely
that I didn't see it since it's done in defragmentation for
the regular RX path.

Add the missing line to properly count received packets in
the fast-RX case.

Fixes: c9c5962b56c1 ("mac80211: enable collecting station statistics per-CPU")
Reported-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/mac80211/rx.c |    1 +
 1 file changed, 1 insertion(+)

--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3953,6 +3953,7 @@ static bool ieee80211_invoke_fast_rx(str
 	stats->last_rate = sta_stats_encode_rate(status);
 
 	stats->fragments++;
+	stats->packets++;
 
 	if (!(status->flag & RX_FLAG_NO_SIGNAL_VAL)) {
 		stats->last_signal = status->signal;

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web