4.4.203-stable review
Subsystems (5)
Greg Kroah-Hartman
maintainercover 4.4.203-stable review
This is the start of the stable review cycle for the 4.4.203 release. There are 159 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 24 Nov 2019 09:59:19 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-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.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.4.203-rc1
Pavel Tatashin <[email protected]>
arm64: uaccess: Ensure PAN is re-enabled after unhandled uaccess fault
Roger Quadros <[email protected]>
ARM: dts: omap5: Fix dual-role mode on Super-Speed port
Huibin Hong <[email protected]>
spi: rockchip: initialize dma_slave_config properly
Felix Fietkau <[email protected]>
mac80211: minstrel: fix CCK rate group streams value
Thierry Reding <[email protected]>
hwmon: (pwm-fan) Silence error on probe deferral
Timothy E Baldwin <[email protected]>
ARM: 8802/1: Call syscall_trace_exit even when system call skipped
Trent Piepho <[email protected]>
spi: spidev: Fix OF tree warning logic
Marek Vasut <[email protected]>
gpio: syscon: Fix possible NULL ptr usage
Bjorn Helgaas <[email protected]>
x86/kexec: Correct KEXEC_BACKUP_SRC_END off-by-one error
Colin Ian King <[email protected]>
media: cx231xx: fix potential sign-extension overflow on large shift
Tim Smith <[email protected]>
GFS2: Flush the GFS2 delete workqueue before stopping the kernel threads
Wenwen Wang <[email protected]>
media: isif: fix a NULL pointer dereference bug
He Zhe <[email protected]>
printk: Give error on attempt to set log buffer length to over 2G
Nathan Chancellor <[email protected]>
backlight: lm3639: Unconditionally call led_classdev_unregister
Borislav Petkov <[email protected]>
proc/vmcore: Fix i386 build error of missing copy_oldmem_page_encrypted()
Shenghui Wang <[email protected]>
bcache: recal cached_dev_sectors on detach
Dan Carpenter <[email protected]>
fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper()
Dan Carpenter <[email protected]>
fbdev: sbuslib: use checked version of put_user()
Ronald Tschalär <[email protected]>
ACPI / SBS: Fix rare oops when removing modules
Radu Solea <[email protected]>
crypto: mxs-dcp - Fix AES issues
Radu Solea <[email protected]>
crypto: mxs-dcp - Fix SHA null hashes and output length
Borislav Petkov <[email protected]>
x86/olpc: Fix build error with CONFIG_MFD_CS5535=m
Martin Kepplinger <[email protected]>
Input: st1232 - set INPUT_PROP_DIRECT property
Rami Rosen <[email protected]>
dmaengine: ioat: fix prototype of ioat_enumerate_channels
Olga Kornievskaia <[email protected]>
NFSv4.x: fix lock recovery during delegation recall
Chung-Hsien Hsu <[email protected]>
brcmfmac: fix full timeout waiting for action frame on-channel tx
Ricardo Ribalda Delgado <[email protected]>
mtd: physmap_of: Release resources on error
Johan Hovold <[email protected]>
USB: serial: cypress_m8: fix interrupt-out transfer length
Cameron Kaiser <[email protected]>
KVM: PPC: Book3S PR: Exiting split hack mode needs to fixup both PC and LR
Michael Pobega <[email protected]>
ALSA: hda/sigmatel - Disable automute for Elo VuPoint
Nathan Chancellor <[email protected]>
ata: ep93xx: Use proper enums for directions
Wei Yongjun <[email protected]>
IB/mthca: Fix error return code in __mthca_init_one()
Radoslaw Tyl <[email protected]>
ixgbe: Fix crash with VFs and flow director on interface flap
Nathan Chancellor <[email protected]>
mtd: rawnand: sh_flctl: Use proper enum for flctl_dma_fifo0_transfer
Naveen N. Rao <[email protected]>
powerpc/pseries: Fix how we iterate over the DTL entries
Naveen N. Rao <[email protected]>
powerpc/pseries: Fix DTL buffer registration
Nathan Chancellor <[email protected]>
cxgb4: Use proper enum in IEEE_FAUX_SYNC
Nathan Chancellor <[email protected]>
cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update
Dan Carpenter <[email protected]>
mei: samples: fix a signedness bug in amt_host_if_call()
Nathan Chancellor <[email protected]>
dmaengine: timb_dma: Use proper enum in td_prep_slave_sg
Nathan Chancellor <[email protected]>
dmaengine: ep93xx: Return proper enum in ep93xx_dma_chan_direction
Andrew Zaborowski <[email protected]>
nl80211: Fix a GET_KEY reply attribute
Jia-Ju Bai <[email protected]>
usb: gadget: udc: fotg210-udc: Fix a sleep-in-atomic-context bug in fotg210_get_status()
Simon Wunderlich <[email protected]>
ath9k: fix reporting calculated new FFT upper max
Ben Greear <[email protected]>
ath10k: fix vdev-start timeout on error
Trond Myklebust <[email protected]>
SUNRPC: Fix priority queue fairness
Jaegeuk Kim <[email protected]>
f2fs: return correct errno in f2fs_gc
H. Nikolaus Schaller <[email protected]>
ARM: dts: omap5: enable OTG role for DWC3 controller
YueHaibing <[email protected]>
net: ovs: fix return type of ndo_start_xmit function
Jens Axboe <[email protected]>
libata: have ata_scsi_rw_xlat() fail invalid passthrough requests
Christoph Hellwig <[email protected]>
block: introduce blk_rq_is_passthrough
Daniel Vetter <[email protected]>
fbdev: Ditch fb_edid_add_monspecs
Geert Uytterhoeven <[email protected]>
fbdev: Remove unused SH-Mobile HDMI driver
Masami Hiramatsu <[email protected]>
uprobes/x86: Prohibit probing on MOV SS instruction
Masami Hiramatsu <[email protected]>
kprobes/x86: Prohibit probing on exception masking instructions
John Johansen <[email protected]>
apparmor: fix module parameters can be changed after policy is locked
John Johansen <[email protected]>
apparmor: fix update the mtime of the profile file on replacement
John Johansen <[email protected]>
apparmor: fix uninitialized lsm_audit member
Peter Zijlstra <[email protected]>
x86/atomic: Fix smp_mb__{before,after}_atomic()Dan Carpenter <[email protected]>
net: cdc_ncm: Signedness bug in cdc_ncm_set_dgram_size()
Jouni Hogander <[email protected]>
slcan: Fix memory leak in error path
zhong jiang <[email protected]>
memfd: Use radix_tree_deref_slot_protected to avoid the warning.
Kefeng Wang <[email protected]>
Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto()
Loic Poulain <[email protected]>
Bluetooth: hci_ldisc: Fix null pointer derefence in case of early data
Kirill Tkhai <[email protected]>
fuse: use READ_ONCE on congestion_threshold and max_background
Rob Herring <[email protected]>
arm64: dts: amd: Fix SPI bus warnings
Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS
Justin Ernst <[email protected]>
EDAC: Raise the maximum number of memory controllers
YueHaibing <[email protected]>
net: smsc: fix return type of ndo_start_xmit function
Marcel Ziswiler <[email protected]>
ARM: tegra: apalis_t30: fix mmc1 cmd pull-up
Marcel Ziswiler <[email protected]>
ARM: dts: tegra30: fix xcvr-setup-use-fuses
Jason Yan <[email protected]>
scsi: libsas: always unregister the old device if going to discover new
Li Qiang <[email protected]>
vfio/pci: Fix potential memory leak in vfio_msi_cap_len
zhong jiang <[email protected]>
misc: genwqe: should return proper error value.
Laura Abbott <[email protected]>
misc: kgdbts: Fix restrict error
Laurent Pinchart <[email protected]>
usb: gadget: uvc: Only halt video streaming endpoint in bulk mode
Laurent Pinchart <[email protected]>
usb: gadget: uvc: Factor out video USB request queueing
Joel Pepper <[email protected]>
usb: gadget: uvc: configfs: Prevent format changes after linking header
Laurent Pinchart <[email protected]>
usb: gadget: uvc: configfs: Drop leaked references to config items
Nathan Chancellor <[email protected]>
media: davinci: Fix implicit enum conversion warning
Jia-Ju Bai <[email protected]>
media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init()
Dengcheng Zhu <[email protected]>
MIPS: kexec: Relax memory restriction
Matthew Whitehead <[email protected]>
x86/CPU: Use correct macros for Cyrix calls
YueHaibing <[email protected]>
net: micrel: fix return type of ndo_start_xmit function
Shahed Shaikh <[email protected]>
bnx2x: Ignore bandwidth attention in single function mode
Stefan Agner <[email protected]>
cpufeature: avoid warning when compiling with clang
Rob Herring <[email protected]>
ARM: dts: ste: Fix SPI controller node names
Linus Walleij <[email protected]>
ARM: dts: ux500: Fix LCDA clock line muxing
Geert Uytterhoeven <[email protected]>
ARM: dts: ux500: Correct SCU unit address
Grygorii Strashko <[email protected]>
ARM: dts: am335x-evm: fix number of cpsw
Loic Poulain <[email protected]>
usb: chipidea: Fix otg event handler
YueHaibing <[email protected]>
net: amd: fix return type of ndo_start_xmit function
YueHaibing <[email protected]>
net: broadcom: fix return type of ndo_start_xmit function
YueHaibing <[email protected]>
net: xilinx: fix return type of ndo_start_xmit function
YueHaibing <[email protected]>
net: toshiba: fix return type of ndo_start_xmit function
Andreas Kemnade <[email protected]>
power: supply: twl4030_charger: disable eoc interrupt on linear charge
Andreas Kemnade <[email protected]>
power: supply: twl4030_charger: fix charging current out-of-bounds
Rob Herring <[email protected]>
libfdt: Ensure INT_MAX is defined in libfdt_env.h
Nathan Fontenot <[email protected]>
powerpc/pseries: Disable CPU hotplug across migrations
Nicholas Piggin <[email protected]>
powerpc/64s/hash: Fix stab_rr off by one initialization
Breno Leitao <[email protected]>
powerpc/iommu: Avoid derefence before pointer check
Anton Vasilyev <[email protected]>
serial: mxs-auart: Fix potential infinite loop
Sinan Kaya <[email protected]>
PCI/ACPI: Correct error message for ASPM disabling
Julian Wiedmann <[email protected]>
s390/qeth: invoke softirqs after napi_schedule()
Bernd Edlinger <[email protected]>
kernfs: Fix range checks in kernfs_get_target_path
Tomasz Figa <[email protected]>
power: supply: max8998-charger: Fix platform data retrieval
Dan Carpenter <[email protected]>
power: supply: ab8500_fg: silence uninitialized variable warnings
Ganesh Goudar <[email protected]>
cxgb4: Fix endianness issue in t4_fwcache()
Ludovic Desroches <[email protected]>
pinctrl: at91: don't use the same irqchip with multiple gpiochips
Dinh Nguyen <[email protected]>
ARM: dts: socfpga: Fix I2C bus unit-address error
Alan Modra <[email protected]>
powerpc/vdso: Correct call frame information
Cong Wang <[email protected]>
llc: avoid blocking in llc_sap_close()
Dan Carpenter <[email protected]>
pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map()
Takashi Iwai <[email protected]>
ALSA: intel8x0m: Register irq handler after register initializations
Lao Wei <[email protected]>
media: fix: media: pci: meye: validate offset to avoid arbitrary access
Srinivas Kandagatla <[email protected]>
nvmem: core: return error code instead of NULL from nvmem_device_get
Masami Hiramatsu <[email protected]>
kprobes: Don't call BUG_ON() if there is a kprobe in use on free list
Deepak Ukey <[email protected]>
scsi: pm80xx: Fixed system hang issue during kexec boot
Deepak Ukey <[email protected]>
scsi: pm80xx: Corrected dma_unmap_sg() parameter
Oleksij Rempel <[email protected]>
ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set
George Kennedy <[email protected]>
scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir()
Eric W. Biederman <[email protected]>
signal: Properly deliver SIGSEGV from x86 uprobes
Eric W. Biederman <[email protected]>
signal: Properly deliver SIGILL from uprobes
Eric W. Biederman <[email protected]>
signal: Always ignore SIGKILL and SIGSTOP sent to the global init
Daniel Silsby <[email protected]>
dmaengine: dma-jz4780: Further residue status fix
H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: keep vpll2 always on
H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot
H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: tvout: enable as display1 alias
H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files
Rob Herring <[email protected]>
of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC
Ding Xiang <[email protected]>
mips: txx9: fix iounmap related issue
Erik Stromdahl <[email protected]>
ath10k: wmi: disable softirq's while calling ieee80211_rx
Marek Szyprowski <[email protected]>
ARM: dts: exynos: Disable pull control for S5M8767 PMIC
Colin Ian King <[email protected]>
ASoC: sgtl5000: avoid division by zero if lo_vag is zero
Stefan Wahren <[email protected]>
net: lan78xx: Bail out if lan78xx_get_endpoints fails
Larry Finger <[email protected]>
rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument
Marcel Ziswiler <[email protected]>
ARM: dts: pxa: fix power i2c base address
Patryk Małek <[email protected]>
i40e: Prevent deleting MAC address from VF when set by PF
Patryk Małek <[email protected]>
i40e: hold the rtnl lock on clearing interrupt scheme
Mitch Williams <[email protected]>
i40e: use correct length for strncpy
Marek Szyprowski <[email protected]>
ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook
Tuomas Tynkkynen <[email protected]>
MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3
Charles Keepax <[email protected]>
ASoC: dpcm: Properly initialise hw->rate_max
Bob Peterson <[email protected]>
gfs2: Don't set GFS2_RDF_UPTODATE when the lvb is updated
Takashi Iwai <[email protected]>
ALSA: seq: Do error checks at creating system ports
Jay Foster <[email protected]>
ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45
Dan Carpenter <[email protected]>
ALSA: pcm: signedness bug in snd_pcm_plug_alloc()
Marcus Folkesson <[email protected]>
iio: dac: mcp4922: fix error handling in mcp4922_write_raw
Eugen Hristev <[email protected]>
mmc: sdhci-of-at91: fix quirk2 overwrite
Roman Gushchin <[email protected]>
mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()
Roman Gushchin <[email protected]>
mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm()
Eric Auger <[email protected]>
iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros
Al Viro <[email protected]>
ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either
Al Viro <[email protected]>
ecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable
Oliver Neukum <[email protected]>
Input: ff-memless - kill timer in destroy()
Henry Lin <[email protected]>
ALSA: usb-audio: not submit urb for stopped endpoint
Takashi Iwai <[email protected]>
ALSA: usb-audio: Fix missing error check at mixer resolution test
Oliver Neukum <[email protected]>
ax88172a: fix information leak on short answers
Jouni Hogander <[email protected]>
slip: Fix memory leak in slip_open error path
-------------
Diffstat:
Documentation/misc-devices/mei/mei-amt-version.c | 2 +- Makefile | 4 +- arch/arm/boot/compressed/libfdt_env.h | 2 + arch/arm/boot/dts/am335x-evm.dts | 12 +- arch/arm/boot/dts/at91sam9g45.dtsi | 2 +- arch/arm/boot/dts/exynos5250-arndale.dts | 9 + arch/arm/boot/dts/exynos5250-snow-rev5.dts | 11 + arch/arm/boot/dts/omap3-gta04.dtsi | 21 +- arch/arm/boot/dts/omap5-board-common.dtsi | 5 + arch/arm/boot/dts/pxa27x.dtsi | 2 +- arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts | 2 +- arch/arm/boot/dts/ste-dbx5x0.dtsi | 6 +- arch/arm/boot/dts/ste-href-family-pinctrl.dtsi | 8 +- arch/arm/boot/dts/ste-hrefprev60.dtsi | 2 +- arch/arm/boot/dts/ste-snowball.dts | 2 +- arch/arm/boot/dts/ste-u300.dts | 2 +- arch/arm/boot/dts/tegra30-apalis.dtsi | 6 +- arch/arm/boot/dts/tegra30.dtsi | 6 +- arch/arm/kernel/entry-common.S | 9 +- arch/arm/mach-imx/pm-imx6.c | 25 + arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 4 +- arch/arm64/lib/clear_user.S | 2 + arch/arm64/lib/copy_from_user.S | 2 + arch/arm64/lib/copy_in_user.S | 2 + arch/arm64/lib/copy_to_user.S | 2 + arch/mips/bcm47xx/workarounds.c | 8 +- arch/mips/include/asm/kexec.h | 6 +- arch/mips/txx9/generic/setup.c | 5 +- arch/powerpc/boot/libfdt_env.h | 2 + arch/powerpc/kernel/iommu.c | 2 +- arch/powerpc/kernel/rtas.c | 2 + arch/powerpc/kernel/vdso32/datapage.S | 1 + arch/powerpc/kernel/vdso32/gettimeofday.S | 1 + arch/powerpc/kernel/vdso64/datapage.S | 1 + arch/powerpc/kernel/vdso64/gettimeofday.S | 1 + arch/powerpc/kvm/book3s.c | 3 + arch/powerpc/mm/slb.c | 2 +- arch/powerpc/platforms/pseries/dtl.c | 4 +- arch/x86/Kconfig | 3 +- arch/x86/include/asm/atomic.h | 8 +- arch/x86/include/asm/atomic64_64.h | 8 +- arch/x86/include/asm/barrier.h | 4 +- arch/x86/include/asm/insn.h | 18 + arch/x86/include/asm/kexec.h | 2 +- arch/x86/kernel/cpu/cyrix.c | 2 +- arch/x86/kernel/kprobes/core.c | 4 + arch/x86/kernel/uprobes.c | 6 +- drivers/acpi/osl.c | 1 + drivers/acpi/pci_root.c | 5 +- drivers/acpi/sbshc.c | 2 + drivers/ata/libata-scsi.c | 21 + drivers/ata/pata_ep93xx.c | 8 +- drivers/bluetooth/hci_ldisc.c | 10 +- drivers/bluetooth/hci_uart.h | 1 + drivers/crypto/mxs-dcp.c | 80 +- drivers/dma/dma-jz4780.c | 2 +- drivers/dma/ioat/init.c | 7 +- drivers/dma/timb_dma.c | 2 +- drivers/gpio/gpio-syscon.c | 2 +- drivers/hwmon/pwm-fan.c | 8 +- drivers/iio/dac/mcp4922.c | 11 +- drivers/infiniband/hw/mthca/mthca_main.c | 3 +- drivers/input/ff-memless.c | 9 + drivers/input/touchscreen/st1232.c | 1 + drivers/md/bcache/super.c | 1 + drivers/media/pci/ivtv/ivtv-yuv.c | 2 +- drivers/media/pci/meye/meye.c | 2 +- drivers/media/platform/davinci/isif.c | 3 +- drivers/media/platform/davinci/vpbe_display.c | 2 +- drivers/media/usb/cx231xx/cx231xx-video.c | 2 +- drivers/misc/genwqe/card_utils.c | 13 +- drivers/misc/kgdbts.c | 16 +- drivers/mmc/host/sdhci-of-at91.c | 2 +- drivers/mtd/maps/physmap_of.c | 27 +- drivers/mtd/nand/sh_flctl.c | 4 +- drivers/net/can/slcan.c | 1 + drivers/net/ethernet/amd/am79c961a.c | 2 +- drivers/net/ethernet/amd/atarilance.c | 6 +- drivers/net/ethernet/amd/declance.c | 2 +- drivers/net/ethernet/amd/sun3lance.c | 6 +- drivers/net/ethernet/amd/sunlance.c | 2 +- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 4 +- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 5 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 10 + drivers/net/ethernet/broadcom/sb1250-mac.c | 4 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | 4 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h | 2 +- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 8 + drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 10 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 10 +- drivers/net/ethernet/micrel/ks8695net.c | 2 +- drivers/net/ethernet/micrel/ks8851_mll.c | 4 +- drivers/net/ethernet/smsc/smc911x.c | 3 +- drivers/net/ethernet/smsc/smc91x.c | 3 +- drivers/net/ethernet/smsc/smsc911x.c | 3 +- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 4 +- drivers/net/ethernet/toshiba/ps3_gelic_net.h | 2 +- drivers/net/ethernet/toshiba/spider_net.c | 4 +- drivers/net/ethernet/toshiba/tc35815.c | 6 +- drivers/net/ethernet/xilinx/ll_temac_main.c | 3 +- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 +- drivers/net/ethernet/xilinx/xilinx_emaclite.c | 9 +- drivers/net/slip/slip.c | 1 + drivers/net/usb/ax88172a.c | 2 +- drivers/net/usb/cdc_ncm.c | 2 +- drivers/net/usb/lan78xx.c | 5 + drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/mac.c | 2 +- drivers/net/wireless/ath/ath10k/wmi.c | 22 +- drivers/net/wireless/ath/ath10k/wmi.h | 8 +- drivers/net/wireless/ath/ath9k/common-spectral.c | 2 +- drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 17 +- drivers/net/wireless/brcm80211/brcmfmac/p2p.h | 2 + .../net/wireless/realtek/rtl818x/rtl8187/leds.c | 2 +- drivers/nvmem/core.c | 2 +- drivers/of/base.c | 2 +- drivers/pinctrl/pinctrl-at91-pio4.c | 8 +- drivers/pinctrl/pinctrl-at91.c | 28 +- drivers/power/ab8500_fg.c | 31 +- drivers/power/max8998_charger.c | 2 +- drivers/power/twl4030_charger.c | 30 +- drivers/s390/net/qeth_l2_main.c | 3 + drivers/s390/net/qeth_l3_main.c | 3 + drivers/scsi/libsas/sas_expander.c | 13 +- drivers/scsi/pm8001/pm8001_hwi.c | 6 + drivers/scsi/pm8001/pm8001_sas.c | 9 +- drivers/scsi/pm8001/pm8001_sas.h | 1 + drivers/scsi/pm8001/pm80xx_hwi.c | 80 +- drivers/scsi/pm8001/pm80xx_hwi.h | 3 + drivers/scsi/sym53c8xx_2/sym_hipd.c | 15 +- drivers/spi/spi-rockchip.c | 3 + drivers/spi/spidev.c | 8 +- drivers/tty/serial/mxs-auart.c | 3 +- drivers/usb/chipidea/otg.c | 9 +- drivers/usb/gadget/function/uvc_configfs.c | 7 + drivers/usb/gadget/function/uvc_video.c | 32 +- drivers/usb/gadget/udc/fotg210-udc.c | 2 +- drivers/usb/serial/cypress_m8.c | 2 +- drivers/vfio/pci/vfio_pci_config.c | 4 +- drivers/video/backlight/lm3639_bl.c | 6 +- drivers/video/fbdev/Kconfig | 10 - drivers/video/fbdev/Makefile | 1 - drivers/video/fbdev/core/fbmon.c | 95 -- drivers/video/fbdev/core/modedb.c | 57 - drivers/video/fbdev/sbuslib.c | 28 +- drivers/video/fbdev/sh_mobile_hdmi.c | 1489 -------------------- fs/ecryptfs/inode.c | 19 +- fs/f2fs/gc.c | 2 +- fs/fuse/control.c | 4 +- fs/gfs2/rgrp.c | 2 +- fs/gfs2/super.c | 2 +- fs/kernfs/symlink.c | 5 +- fs/nfs/delegation.c | 6 +- fs/proc/vmcore.c | 10 + include/linux/blkdev.h | 16 +- include/linux/cpufeature.h | 2 +- include/linux/edac.h | 3 +- include/linux/fb.h | 3 - include/linux/intel-iommu.h | 6 +- include/linux/libfdt_env.h | 1 + include/linux/platform_data/dma-ep93xx.h | 2 +- include/linux/sunrpc/sched.h | 2 - include/net/llc.h | 1 + include/video/sh_mobile_hdmi.h | 49 - kernel/events/uprobes.c | 4 +- kernel/kprobes.c | 8 +- kernel/printk/printk.c | 18 +- kernel/signal.c | 4 + mm/hugetlb_cgroup.c | 2 +- mm/memcontrol.c | 2 +- mm/shmem.c | 2 +- net/bluetooth/l2cap_core.c | 10 + net/llc/llc_core.c | 4 +- net/mac80211/rc80211_minstrel_ht.c | 2 +- net/openvswitch/vport-internal_dev.c | 5 +- net/sunrpc/sched.c | 109 +- net/wireless/nl80211.c | 2 +- security/apparmor/apparmorfs.c | 2 + security/apparmor/audit.c | 3 +- security/apparmor/file.c | 3 +- security/apparmor/include/policy.h | 2 + security/apparmor/lsm.c | 22 +- security/apparmor/policy.c | 18 +- sound/core/oss/pcm_plugin.c | 4 +- sound/core/seq/seq_system.c | 18 +- sound/pci/hda/patch_sigmatel.c | 20 + sound/pci/intel8x0m.c | 20 +- sound/soc/codecs/sgtl5000.c | 2 +- sound/soc/soc-pcm.c | 2 +- sound/usb/endpoint.c | 3 + sound/usb/mixer.c | 4 +- 193 files changed, 964 insertions(+), 2141 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/159 slip: Fix memory leak in slip_open error path
From: Jouni Hogander <[email protected]>
[ Upstream commit 3b5a39979dafea9d0cd69c7ae06088f7a84cdafa ]
Driver/net/can/slcan.c is derived from slip.c. Memory leak was detected by Syzkaller in slcan. Same issue exists in slip.c and this patch is addressing the leak in slip.c.
Here is the slcan memory leak trace reported by Syzkaller:
BUG: memory leak unreferenced object 0xffff888067f65500 (size 4096):
comm "syz-executor043", pid 454, jiffies 4294759719 (age 11.930s)
hex dump (first 32 bytes):
73 6c 63 61 6e 30 00 00 00 00 00 00 00 00 00 00 slcan0..........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<00000000a06eec0d>] __kmalloc+0x18b/0x2c0
[<0000000083306e66>] kvmalloc_node+0x3a/0xc0
[<000000006ac27f87>] alloc_netdev_mqs+0x17a/0x1080
[<0000000061a996c9>] slcan_open+0x3ae/0x9a0
[<000000001226f0f9>] tty_ldisc_open.isra.1+0x76/0xc0
[<0000000019289631>] tty_set_ldisc+0x28c/0x5f0
[<000000004de5a617>] tty_ioctl+0x48d/0x1590
[<00000000daef496f>] do_vfs_ioctl+0x1c7/0x1510
[<0000000059068dbc>] ksys_ioctl+0x99/0xb0
[<000000009a6eb334>] __x64_sys_ioctl+0x78/0xb0
[<0000000053d0332e>] do_syscall_64+0x16f/0x580
[<0000000021b83b99>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[<000000008ea75434>] 0xfffffffffffffff--- drivers/net/slip/slip.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/slip/slip.c +1 -0
@@ -860,6 +860,7 @@ err_free_chan: sl->tty =NULL ; tty->disc_data =NULL ;clear_bit (SLF_INUSE , &sl->flags); +free_netdev (sl->dev); err_exit:rtnl_unlock ();
Greg Kroah-Hartman
maintainerPATCH 2/159 ax88172a: fix information leak on short answers
In reply to Greg Kroah-HartmanFrom: Oliver Neukum <[email protected]>
[ Upstream commit a9a51bd727d141a67b589f375fe69d0e54c4fe22 ]
If a malicious device gives a short MAC it can elicit up to 5 bytes of leaked memory out of the driver. We need to check for ETH_ALEN instead.
--- drivers/net/usb/ax88172a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/ax88172a.c +1 -1
@@ -243,7 +243,7 @@ static int ax88172a_bind(struct usbnet */* Get the MAC address */ ret =asix_read_cmd (dev,AX_CMD_READ_NODE_ID ,0 ,0 ,ETH_ALEN , buf); -if (ret <0 ) { +if (ret <ETH_ALEN ) {netdev_err (dev->net,"Failed to read MAC address: %d\n" , ret); goto free; }
Greg Kroah-Hartman
maintainerPATCH 3/159 ALSA: usb-audio: Fix missing error check at mixer resolution test
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 167beb1756791e0806365a3f86a0da10d7a327ee upstream.
A check of the return value from get_cur_mix_raw() is missing at the resolution test code in get_min_max_with_quirks(), which may leave the variable untouched, leading to a random uninitialized value, as detected by syzkaller fuzzer.
Add the missing return error check for fixing that.
--- sound/usb/mixer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/usb/mixer.c +3 -1
@@ -1045,7 +1045,8 @@ static int get_min_max_with_quirks(strucif (cval->min + cval->res < cval->max) {int last_valid_res = cval->res;int saved, test, check; -get_cur_mix_raw (cval, minchn, &saved); +if (get_cur_mix_raw (cval, minchn, &saved) <0 ) + goto no_res_check;for (;;) { test = saved;if (test < cval->max)
@@ -1065,6 +1066,7 @@ static int get_min_max_with_quirks(strucsnd_usb_set_cur_mix_value (cval, minchn,0 , saved); } +no_res_check: cval->initialized =1 ; }
Greg Kroah-Hartman
maintainerPATCH 4/159 ALSA: usb-audio: not submit urb for stopped endpoint
In reply to Greg Kroah-HartmanFrom: Henry Lin <[email protected]>
commit 528699317dd6dc722dccc11b68800cf945109390 upstream.
While output urb's snd_complete_urb() is executing, calling prepare_outbound_urb() may cause endpoint stopped before prepare_outbound_urb() returns and result in next urb submitted to stopped endpoint. usb-audio driver cannot re-use it afterwards as the urb is still hold by usb stack.
This change checks EP_FLAG_RUNNING flag after prepare_outbound_urb() again to let snd_complete_urb() know the endpoint already stopped and does not submit next urb. Below kind of error will be fixed:
[ 213.153103] usb 1-2: timeout: still 1 active urbs on EP #1 [ 213.164121] usb 1-2: cannot submit urb 0, error -16: unknown error
--- sound/usb/endpoint.c | 3 +++ 1 file changed, 3 insertions(+)
sound/usb/endpoint.c +3 -0
@@ -403,6 +403,9 @@ static void snd_complete_urb(struct urb }prepare_outbound_urb (ep, ctx); +/* can be stopped during prepare callback */ +if (unlikely (!test_bit (EP_FLAG_RUNNING , &ep->flags))) + goto exit_clear; }else {retire_inbound_urb (ep, ctx);/* can be stopped during retire callback */
Greg Kroah-Hartman
maintainerPATCH 5/159 Input: ff-memless - kill timer in destroy()
In reply to Greg Kroah-HartmanFrom: Oliver Neukum <[email protected]>
commit fa3a5a1880c91bb92594ad42dfe9eedad7996b86 upstream.
No timer must be left running when the device goes away.
--- drivers/input/ff-memless.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/input/ff-memless.c +9 -0
@@ -501,6 +501,15 @@ static void ml_ff_destroy(struct ff_devi {struct ml_device *ml = ff->private; +/* +* Even though we stop all playing effects when tearing down +* an input device (via input_device_flush() that calls into +* input_ff_flush() that stops and erases all effects), we +* do not actually stop the timer, and therefore we should +* do it here. +*/ +del_timer_sync (&ml->timer); +kfree (ml->private); }
Greg Kroah-Hartman
maintainerPATCH 6/159 ecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable
In reply to Greg Kroah-HartmanFrom: Al Viro <[email protected]>
commit e72b9dd6a5f17d0fb51f16f8685f3004361e83d0 upstream.
lower_dentry can't go from positive to negative (we have it pinned), but it *can* go from negative to positive. So fetching ->d_inode into a local variable, doing a blocking allocation, checking that now ->d_inode is non-NULL and feeding the value we'd fetched earlier to a function that won't accept NULL is not a good idea.
--- fs/ecryptfs/inode.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
fs/ecryptfs/inode.c +10 -2
@@ -330,7 +330,7 @@ static int ecryptfs_lookup_interpose(strstruct dentry *lower_dentry, struct inode *dir_inode) { - struct inode *inode, *lower_inode = d_inode(lower_dentry); + struct inode *inode, *lower_inode;struct ecryptfs_dentry_info *dentry_info;struct vfsmount *lower_mnt;int rc =0 ;
@@ -352,7 +352,15 @@ static int ecryptfs_lookup_interpose(str dentry_info->lower_path.mnt = lower_mnt; dentry_info->lower_path.dentry = lower_dentry; -if (d_really_is_negative (lower_dentry)) { +/* +* negative dentry can go positive under us here - its parent is not +* locked. That's OK and that could happen just as we return from +* ecryptfs_lookup() anyway. Just need to be careful and fetch +* ->d_inode only once - it's not stable here. +*/ + lower_inode =READ_ONCE (lower_dentry->d_inode); + +if (!lower_inode) {/* We want to add because we couldn't find in lower */ d_add (dentry,NULL );return 0 ;
Greg Kroah-Hartman
maintainerPATCH 7/159 ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either
In reply to Greg Kroah-HartmanFrom: Al Viro <[email protected]>
commit 762c69685ff7ad5ad7fee0656671e20a0c9c864d upstream.
We need to get the underlying dentry of parent; sure, absent the races it is the parent of underlying dentry, but there's nothing to prevent losing a timeslice to preemtion in the middle of evaluation of lower_dentry->d_parent->d_inode, having another process move lower_dentry around and have its (ex)parent not pinned anymore and freed on memory pressure. Then we regain CPU and try to fetch ->d_inode from memory that is freed by that point.
dentry->d_parent *is* stable here - it's an argument of ->lookup() and we are guaranteed that it won't be moved anywhere until we feed it to d_add/d_splice_alias. So we safely go that way to get to its underlying dentry.
--- fs/ecryptfs/inode.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
fs/ecryptfs/inode.c +3 -4
@@ -330,9 +330,9 @@ static int ecryptfs_lookup_interpose(strstruct dentry *lower_dentry, struct inode *dir_inode) { + struct path *path = ecryptfs_dentry_to_lower_path(dentry->d_parent);struct inode *inode, *lower_inode;struct ecryptfs_dentry_info *dentry_info; -struct vfsmount *lower_mnt;int rc =0 ; dentry_info =kmem_cache_alloc (ecryptfs_dentry_info_cache,GFP_KERNEL );
@@ -344,12 +344,11 @@ static int ecryptfs_lookup_interpose(strreturn -ENOMEM ; } - lower_mnt =mntget (ecryptfs_dentry_to_lower_mnt (dentry->d_parent)); -fsstack_copy_attr_atime (dir_inode,d_inode (lower_dentry->d_parent)); +fsstack_copy_attr_atime (dir_inode,d_inode (path->dentry));BUG_ON (!d_count (lower_dentry));ecryptfs_set_dentry_private (dentry, dentry_info); - dentry_info->lower_path.mnt = lower_mnt; + dentry_info->lower_path.mnt =mntget (path->mnt); dentry_info->lower_path.dentry = lower_dentry;/*
Greg Kroah-Hartman
maintainerPATCH 8/159 iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros
In reply to Greg Kroah-HartmanFrom: Eric Auger <[email protected]>
commit 4e7120d79edb31e4ee68e6f8421448e4603be1e9 upstream.
For both PASID-based-Device-TLB Invalidate Descriptor and Device-TLB Invalidate Descriptor, the Physical Function Source-ID value is split according to this layout:
PFSID[3:0] is set at offset 12 and PFSID[15:4] is put at offset 52. Fix the part laid out at offset 52.
--- include/linux/intel-iommu.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
include/linux/intel-iommu.h +4 -2
@@ -295,7 +295,8 @@ enum {#define QI_DEV_IOTLB_SID (sid) ((u64)((sid) & 0xffff) << 32)#define QI_DEV_IOTLB_QDEP (qdep) (((qdep) & 0x1f) << 16)#define QI_DEV_IOTLB_ADDR (addr) ((u64)(addr) & VTD_PAGE_MASK) -#define QI_DEV_IOTLB_PFSID (pfsid) (((u64)(pfsid & 0xf) << 12) | ((u64)(pfsid & 0xfff) << 52)) +#define QI_DEV_IOTLB_PFSID (pfsid) (((u64)(pfsid & 0xf) << 12) | \ + ((u64)((pfsid >> 4) & 0xfff) << 52))#define QI_DEV_IOTLB_SIZE 1#define QI_DEV_IOTLB_MAX_INVS 32
@@ -320,7 +321,8 @@ enum {#define QI_DEV_EIOTLB_PASID (p) (((u64)p) << 32)#define QI_DEV_EIOTLB_SID (sid) ((u64)((sid) & 0xffff) << 16)#define QI_DEV_EIOTLB_QDEP (qd) ((u64)((qd) & 0x1f) << 4) -#define QI_DEV_EIOTLB_PFSID (pfsid) (((u64)(pfsid & 0xf) << 12) | ((u64)(pfsid & 0xfff) << 52)) +#define QI_DEV_EIOTLB_PFSID (pfsid) (((u64)(pfsid & 0xf) << 12) | \ + ((u64)((pfsid >> 4) & 0xfff) << 52))#define QI_DEV_EIOTLB_MAX_INVS 32#define QI_PGRP_IDX (idx) (((u64)(idx)) << 55)
Greg Kroah-Hartman
maintainerPATCH 9/159 mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm()
In reply to Greg Kroah-HartmanFrom: Roman Gushchin <[email protected]>
commit 00d484f354d85845991b40141d40ba9e5eb60faf upstream.
We've encountered a rcu stall in get_mem_cgroup_from_mm():
rcu: INFO: rcu_sched self-detected stall on CPU rcu: 33-....: (21000 ticks this GP) idle=6c6/1/0x4000000000000002 softirq=35441/35441 fqs=5017 (t=21031 jiffies g=324821 q=95837) NMI backtrace for cpu 33 <...> RIP: 0010:get_mem_cgroup_from_mm+0x2f/0x90 <...> __memcg_kmem_charge+0x55/0x140 __alloc_pages_nodemask+0x267/0x320 pipe_write+0x1ad/0x400 new_sync_write+0x127/0x1c0 __kernel_write+0x4f/0xf0 dump_emit+0x91/0xc0 writenote+0xa0/0xc0 elf_core_dump+0x11af/0x1430 do_coredump+0xc65/0xee0 get_signal+0x132/0x7c0 do_signal+0x36/0x640 exit_to_usermode_loop+0x61/0xd0 do_syscall_64+0xd4/0x100 entry_SYSCALL_64_after_hwframe+0x44/0xa9
The problem is caused by an exiting task which is associated with an offline memcg. We're iterating over and over in the do {} while (!css_tryget_online()) loop, but obviously the memcg won't become online and the exiting task won't be migrated to a live memcg.
Let's fix it by switching from css_tryget_online() to css_tryget().
As css_tryget_online() cannot guarantee that the memcg won't go offline, the check is usually useless, except some rare cases when for example it determines if something should be presented to a user.
A similar problem is described by commit 18fa84a2db0e ("cgroup: Use css_tryget() instead of css_tryget_online() in task_get_css()").
Johannes:
: The bug aside, it doesn't matter whether the cgroup is online for the : callers. It used to matter when offlining needed to evacuate all charges : from the memcg, and so needed to prevent new ones from showing up, but we : don't care now.
--- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memcontrol.c +1 -1
@@ -833,7 +833,7 @@ static struct mem_cgroup *get_mem_cgroupif (unlikely (!memcg)) memcg = root_mem_cgroup; } - }while (!css_tryget_online (&memcg->css)); + }while (!css_tryget (&memcg->css));rcu_read_unlock ();return memcg; }
Greg Kroah-Hartman
maintainerPATCH 10/159 mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()
In reply to Greg Kroah-HartmanFrom: Roman Gushchin <[email protected]>
commit 0362f326d86c645b5e96b7dbc3ee515986ed019d upstream.
An exiting task might belong to an offline cgroup. In this case an attempt to grab a cgroup reference from the task can end up with an infinite loop in hugetlb_cgroup_charge_cgroup(), because neither the cgroup will become online, neither the task will be migrated to a live cgroup.
Fix this by switching over to css_tryget(). As css_tryget_online() can't guarantee that the cgroup won't go offline, in most cases the check doesn't make sense. In this particular case users of hugetlb_cgroup_charge_cgroup() are not affected by this change.
A similar problem is described by commit 18fa84a2db0e ("cgroup: Use css_tryget() instead of css_tryget_online() in task_get_css()").
--- mm/hugetlb_cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/hugetlb_cgroup.c +1 -1
@@ -180,7 +180,7 @@ int hugetlb_cgroup_charge_cgroup(int idx again:rcu_read_lock (); h_cg =hugetlb_cgroup_from_task (current); -if (!css_tryget_online (&h_cg->css)) { +if (!css_tryget (&h_cg->css)) {rcu_read_unlock (); goto again; }
Greg Kroah-Hartman
maintainerPATCH 11/159 mmc: sdhci-of-at91: fix quirk2 overwrite
In reply to Greg Kroah-HartmanFrom: Eugen Hristev <[email protected]>
commit fed23c5829ecab4ddc712d7b0046e59610ca3ba4 upstream.
The quirks2 are parsed and set (e.g. from DT) before the quirk for broken HS200 is set in the driver.
The driver needs to enable just this flag, not rewrite the whole quirk set.
--- drivers/mmc/host/sdhci-of-at91.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-of-at91.c +1 -1
@@ -145,7 +145,7 @@ static int sdhci_at91_probe(struct platfsdhci_get_of_property (pdev);/* HS200 is broken at this moment */ - host->quirks2 =SDHCI_QUIRK2_BROKEN_HS200 ; + host->quirks2 |=SDHCI_QUIRK2_BROKEN_HS200 ; ret =sdhci_add_host (host);if (ret)
Greg Kroah-Hartman
maintainerPATCH 12/159 iio: dac: mcp4922: fix error handling in mcp4922_write_raw
In reply to Greg Kroah-HartmanFrom: Marcus Folkesson <[email protected]>
[ Upstream commit 0833627fc3f757a0dca11e2a9c46c96335a900ee ]
Do not try to write negative values and make sure that the write goes well.
--- drivers/iio/dac/mcp4922.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/iio/dac/mcp4922.c +8 -3
@@ -94,17 +94,22 @@ static int mcp4922_write_raw(struct iio_dev *indio_dev, long mask) {struct mcp4922_state *state =iio_priv (indio_dev); +int ret;if (val2 !=0 )return -EINVAL ;switch (mask) {case IIO_CHAN_INFO_RAW : -if (val >GENMASK (chan->scan_type.realbits-1 ,0 )) +if (val <0 || val >GENMASK (chan->scan_type.realbits -1 ,0 ))return -EINVAL ; val <<= chan->scan_type.shift; - state->value[chan->channel] = val; -return mcp4922_spi_write (state, chan->channel, val); + + ret =mcp4922_spi_write (state, chan->channel, val); +if (!ret) + state->value[chan->channel] = val; +return ret; +default :return -EINVAL ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 13/159 ALSA: pcm: signedness bug in snd_pcm_plug_alloc()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 6f128fa41f310e1f39ebcea9621d2905549ecf52 ]
The "frames" variable is unsigned so the error handling doesn't work properly.
--- sound/core/oss/pcm_plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/core/oss/pcm_plugin.c +2 -2
@@ -111,7 +111,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)while (plugin->next) {if (plugin->dst_frames) frames = plugin->dst_frames (plugin, frames); -if (snd_BUG_ON (frames <=0 )) +if (snd_BUG_ON ((snd_pcm_sframes_t )frames <=0 ))return -ENXIO ; plugin = plugin->next; err =snd_pcm_plugin_alloc (plugin, frames);
@@ -123,7 +123,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)while (plugin->prev) {if (plugin->src_frames) frames = plugin->src_frames (plugin, frames); -if (snd_BUG_ON (frames <=0 )) +if (snd_BUG_ON ((snd_pcm_sframes_t )frames <=0 ))return -ENXIO ; plugin = plugin->prev; err =snd_pcm_plugin_alloc (plugin, frames);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 14/159 ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45
In reply to Greg Kroah-HartmanFrom: Jay Foster <[email protected]>
[ Upstream commit 10af10db8c76fa5b9bf1f52a895c1cb2c0ac24da ]
Fix a typo. No functional change made by this patch.
--- arch/arm/boot/dts/at91sam9g45.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/at91sam9g45.dtsi +1 -1
@@ -546,7 +546,7 @@ }; }; - uart1 { + usart1 { pinctrl_usart1: usart1-0 { atmel,pins = <AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB4 periph A with pullup */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 15/159 ALSA: seq: Do error checks at creating system ports
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
[ Upstream commit b8e131542b47b81236ecf6768c923128e1f5db6e ]
snd_seq_system_client_init() doesn't check the errors returned from its port creations. Let's do it properly and handle the error paths.
--- sound/core/seq/seq_system.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
sound/core/seq/seq_system.c +15 -3
@@ -123,6 +123,7 @@ int __init snd_seq_system_client_init(void) {struct snd_seq_port_callback pcallbacks;struct snd_seq_port_info *port; +int err; port =kzalloc (sizeof (*port),GFP_KERNEL );if (!port)
@@ -144,7 +145,10 @@ int __init snd_seq_system_client_init(void) port->flags =SNDRV_SEQ_PORT_FLG_GIVEN_PORT ; port->addr.client = sysclient; port->addr.port =SNDRV_SEQ_PORT_SYSTEM_TIMER ; -snd_seq_kernel_client_ctl (sysclient,SNDRV_SEQ_IOCTL_CREATE_PORT , port); + err =snd_seq_kernel_client_ctl (sysclient,SNDRV_SEQ_IOCTL_CREATE_PORT , + port); +if (err <0 ) + goto error_port;/* register announcement port */ strcpy (port->name,"Announce" );
@@ -154,16 +158,24 @@ int __init snd_seq_system_client_init(void) port->flags =SNDRV_SEQ_PORT_FLG_GIVEN_PORT ; port->addr.client = sysclient; port->addr.port =SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE ; -snd_seq_kernel_client_ctl (sysclient,SNDRV_SEQ_IOCTL_CREATE_PORT , port); + err =snd_seq_kernel_client_ctl (sysclient,SNDRV_SEQ_IOCTL_CREATE_PORT , + port); +if (err <0 ) + goto error_port; announce_port = port->addr.port;kfree (port);return 0 ; + + error_port: +snd_seq_system_client_done (); +kfree (port); +return err; }/* unregister our internal client */ -void __exit snd_seq_system_client_done(void) +void snd_seq_system_client_done (void ) {int oldsysclient = sysclient;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 16/159 gfs2: Dont set GFS2_RDF_UPTODATE when the lvb is updated
In reply to Greg Kroah-HartmanFrom: Bob Peterson <[email protected]>
[ Upstream commit 4f36cb36c9d14340bb200d2ad9117b03ce992cfe ]
The GFS2_RDF_UPTODATE flag in the rgrp is used to determine when a rgrp buffer is valid. It's cleared when the glock is invalidated, signifying that the buffer data is now invalid. But before this patch, function update_rgrp_lvb was setting the flag when it determined it had a valid lvb. But that's an invalid assumption:
just because you have a valid lvb doesn't mean you have valid buffers. After all, another node may have made the lvb valid, and this node just fetched it from the glock via dlm.
Consider this scenario:
1. The file system is mounted with RGRPLVB option.
2. In gfs2_inplace_reserve it locks the rgrp glock EX, but thanks to GL_SKIP, it skips the gfs2_rgrp_bh_get.
3. Since loops == 0 and the allocation target (ap->target) is bigger than the largest known chunk of blocks in the rgrp (rs->rs_rbm.rgd->rd_extfail_pt) it skips that rgrp and bypasses the call to gfs2_rgrp_bh_get there as well.
4. update_rgrp_lvb sees the lvb MAGIC number is valid, so bypasses gfs2_rgrp_bh_get, but it still sets sets GFS2_RDF_UPTODATE due to this invalid assumption.
5. The next time update_rgrp_lvb is called, it sees the bit is set and just returns 0, assuming both the lvb and rgrp are both uptodate. But since this is a smaller allocation, or space has been freed by another node, thus adjusting the lvb values, it decides to use the rgrp for allocations, with invalid rd_free due to the fact it was never updated.
This patch changes update_rgrp_lvb so it doesn't set the UPTODATE flag anymore. That way, it has no choice but to fetch the latest values.
--- fs/gfs2/rgrp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/rgrp.c +1 -1
@@ -1228,7 +1228,7 @@ static int update_rgrp_lvb(struct gfs2_rgrpd *rgd) rl_flags =be32_to_cpu (rgd->rd_rgl->rl_flags); rl_flags &= ~GFS2_RDF_MASK ; rgd->rd_flags &=GFS2_RDF_MASK ; - rgd->rd_flags |= (rl_flags |GFS2_RDF_UPTODATE |GFS2_RDF_CHECK ); + rgd->rd_flags |= (rl_flags |GFS2_RDF_CHECK );if (rgd->rd_rgl->rl_unlinked ==0 ) rgd->rd_flags &= ~GFS2_RDF_CHECK ; rgd->rd_free =be32_to_cpu (rgd->rd_rgl->rl_free);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 17/159 ASoC: dpcm: Properly initialise hw->rate_max
In reply to Greg Kroah-HartmanFrom: Charles Keepax <[email protected]>
[ Upstream commit e33ffbd9cd39da09831ce62c11025d830bf78d9e ]
If the CPU DAI does not initialise rate_max, say if using using KNOT or CONTINUOUS, then the rate_max field will be initialised to 0. A value of zero in the rate_max field of the hardware runtime will cause the sound card to support no sample rates at all. Obviously this is not desired, just a different mechanism is being used to apply the constraints. As such update the setting of rate_max in dpcm_init_runtime_hw to be consistent with the non-DPCM cases and set rate_max to UINT_MAX if nothing is defined on the CPU DAI.
--- sound/soc/soc-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/soc-pcm.c +1 -1
@@ -1541,7 +1541,7 @@ static void dpcm_init_runtime_hw(struct snd_pcm_runtime *runtime, u64 formats) { runtime->hw.rate_min = stream->rate_min; - runtime->hw.rate_max = stream->rate_max; + runtime->hw.rate_max =min_not_zero (stream->rate_max,UINT_MAX ); runtime->hw.channels_min = stream->channels_min; runtime->hw.channels_max = stream->channels_max;if (runtime->hw.formats)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 18/159 MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3
In reply to Greg Kroah-HartmanFrom: Tuomas Tynkkynen <[email protected]>
[ Upstream commit feef7918667b84f9d5653c501542dd8d84ae32af ]
Setting GPIO 21 high seems to be required to enable power to USB ports on the WNDR3400v3. As there is already similar code for WNR3500L, make the existing USB power GPIO code generic and use that.
Patchwork: https://patchwork.linux-mips.org/patch/20259/
--- arch/mips/bcm47xx/workarounds.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
arch/mips/bcm47xx/workarounds.c +5 -3
@@ -4,9 +4,8 @@#include <bcm47xx_board.h> #include <bcm47xx.h> -static void __init bcm47xx_workarounds_netgear_wnr3500l (void ) +static void __init bcm47xx_workarounds_enable_usb_power (int usb_power) { -const int usb_power =12 ;int err; err =gpio_request_one (usb_power,GPIOF_OUT_INIT_HIGH ,"usb_power" );
@@ -22,7 +21,10 @@ void __init bcm47xx_workarounds(void)switch (board) {case BCM47XX_BOARD_NETGEAR_WNR3500L : -bcm47xx_workarounds_netgear_wnr3500l (); +bcm47xx_workarounds_enable_usb_power (12 ); +break ; +case BCM47XX_BOARD_NETGEAR_WNDR3400_V3 : +bcm47xx_workarounds_enable_usb_power (21 );break ;default :/* No workaround(s) needed */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 19/159 ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook
In reply to Greg Kroah-HartmanFrom: Marek Szyprowski <[email protected]>
[ Upstream commit 64858773d78e820003a94e5a7179d368213655d6 ]
This patch adds missing properties to the CODEC and sound nodes, so the audio will work also on Snow rev5 Chromebook. This patch is an extension to the commit e9eefc3f8ce0 ("ARM: dts: exynos: Add missing clock and DAI properties to the max98095 node in Snow Chromebook")
and commit 6ab569936d60 ("ARM: dts: exynos: Enable HDMI audio on Snow Chromebook"). It has been reported that such changes work fine on the rev5 board too.
--- arch/arm/boot/dts/exynos5250-snow-rev5.dts | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/boot/dts/exynos5250-snow-rev5.dts +11 -0
@@ -23,6 +23,14 @@ samsung,model = "Snow-I2S-MAX98090"; samsung,audio-codec = <&max98090>; + + cpu { + sound-dai = <&i2s0 0>; + }; + + codec { + sound-dai = <&max98090 0>, <&hdmi>; + }; }; };
@@ -34,6 +42,9 @@ interrupt-parent = <&gpx0>; pinctrl-names = "default"; pinctrl-0 = <&max98090_irq>; + clocks = <&pmu_system_controller 0>; + clock-names = "mclk"; + #sound-dai-cells = <1>; }; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 20/159 i40e: use correct length for strncpy
In reply to Greg Kroah-HartmanFrom: Mitch Williams <[email protected]>
[ Upstream commit 7eb74ff891b4e94b8bac48f648a21e4b94ddee64 ]
Caught by GCC 8. When we provide a length for strncpy, we should not include the terminating null. So we must tell it one less than the size of the destination buffer.
--- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_ptp.c +2 -1
@@ -605,7 +605,8 @@ static long i40e_ptp_create_clock(struct i40e_pf *pf)if (!IS_ERR_OR_NULL (pf->ptp_clock))return 0 ; -strncpy (pf->ptp_caps.name, i40e_driver_name,sizeof (pf->ptp_caps.name)); +strncpy (pf->ptp_caps.name, i40e_driver_name, +sizeof (pf->ptp_caps.name) -1 ); pf->ptp_caps.owner =THIS_MODULE ; pf->ptp_caps.max_adj =999999999 ; pf->ptp_caps.n_ext_ts =0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 21/159 i40e: hold the rtnl lock on clearing interrupt scheme
In reply to Greg Kroah-HartmanFrom: Patryk Małek <[email protected]>
[ Upstream commit 5cba17b14182696d6bb0ec83a1d087933f252241 ]
Hold the rtnl lock when we're clearing interrupt scheme in i40e_shutdown and in i40e_remove.
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_main.c +8 -0
@@ -10828,6 +10828,7 @@ static void i40e_remove(struct pci_dev *pdev)mutex_destroy (&hw->aq.asq_mutex);/* Clear all dynamic memory lists of rings, q_vectors, and VSIs */ +rtnl_lock ();i40e_clear_interrupt_scheme (pf);for (i =0 ; i < pf->num_alloc_vsi; i++) {if (pf->vsi[i]) {
@@ -10836,6 +10837,7 @@ static void i40e_remove(struct pci_dev *pdev) pf->vsi[i] =NULL ; } } +rtnl_unlock ();for (i =0 ; i <I40E_MAX_VEB ; i++) {kfree (pf->veb[i]);
@@ -10982,7 +10984,13 @@ static void i40e_shutdown(struct pci_dev *pdev)wr32 (hw,I40E_PFPM_WUFC , (pf->wol_en ?I40E_PFPM_WUFC_MAG_MASK :0 )); +/* Since we're going to destroy queues during the +* i40e_clear_interrupt_scheme() we should hold the RTNL lock for this +* whole section +*/ +rtnl_lock ();i40e_clear_interrupt_scheme (pf); +rtnl_unlock ();if (system_state ==SYSTEM_POWER_OFF ) {pci_wake_from_d3 (pdev, pf->wol_en);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 22/159 i40e: Prevent deleting MAC address from VF when set by PF
In reply to Greg Kroah-HartmanFrom: Patryk Małek <[email protected]>
[ Upstream commit 5907cf6c5bbe78be2ed18b875b316c6028b20634 ]
To prevent VF from deleting MAC address that was assigned by the PF we need to check for that scenario when we try to delete a MAC address from a VF.
--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +10 -0
@@ -1677,6 +1677,16 @@ static int i40e_vc_del_mac_addr_msg(struct i40e_vf *vf, u8 *msg, u16 msglen) ret =I40E_ERR_INVALID_MAC_ADDR ; goto error_param; } + +if (vf->pf_set_mac && +ether_addr_equal (al->list[i].addr, + vf->default_lan_addr.addr)) { +dev_err (&pf->pdev->dev, +"MAC addr %pM has been set by PF, cannot delete it for VF %d, reset VF to change MAC addr\n" , + vf->default_lan_addr.addr, vf->vf_id); + ret =I40E_ERR_PARAM ; + goto error_param; + } } vsi = pf->vsi[vf->lan_vsi_idx];
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 23/159 ARM: dts: pxa: fix power i2c base address
In reply to Greg Kroah-HartmanFrom: Marcel Ziswiler <[email protected]>
[ Upstream commit 8a1ecc01a473b75ab97be9b36f623e4551a6e9ae ]
There is one too many zeroes in the Power I2C base address. Fix this.
--- arch/arm/boot/dts/pxa27x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/pxa27x.dtsi +1 -1
@@ -63,7 +63,7 @@ clocks = <&clks CLK_PWM1>; }; - pwri2c: i2c@40f000180 { + pwri2c: i2c@40f00180 { compatible = "mrvl,pxa-i2c"; reg = <0x40f00180 0x24>; interrupts = <6>;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 24/159 rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument
In reply to Greg Kroah-HartmanFrom: Larry Finger <[email protected]>
[ Upstream commit 199ba9faca909e77ac533449ecd1248123ce89e7 ]
In gcc8, when the 3rd argument (size) of a call to strncpy() matches the length of the first argument, the compiler warns of the possibility of an unterminated string. Using strlcpy() forces a null at the end.
--- drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c +1 -1
@@ -146,7 +146,7 @@ static int rtl8187_register_led(struct ieee80211_hw *dev, led->dev = dev; led->ledpin = ledpin; led->is_radio = is_radio; -strncpy (led->name, name,sizeof (led->name)); +strlcpy (led->name, name,sizeof (led->name)); led->led_dev.name = led->name; led->led_dev.default_trigger = default_trigger;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 25/159 net: lan78xx: Bail out if lan78xx_get_endpoints fails
In reply to Greg Kroah-HartmanFrom: Stefan Wahren <[email protected]>
[ Upstream commit fa8cd98c06407b5798b927cd7fd14d30f360ed02 ]
We need to bail out if lan78xx_get_endpoints() fails, otherwise the result is overwritten.
--- drivers/net/usb/lan78xx.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/usb/lan78xx.c +5 -0
@@ -2246,6 +2246,11 @@ static int lan78xx_bind(struct lan78xx_net *dev, struct usb_interface *intf)int i; ret =lan78xx_get_endpoints (dev, intf); +if (ret) { +netdev_warn (dev->net,"lan78xx_get_endpoints failed: %d\n" , + ret); +return ret; + } dev->data[0 ] = (unsigned long )kzalloc (sizeof (*pdata),GFP_KERNEL );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 26/159 ASoC: sgtl5000: avoid division by zero if lo_vag is zero
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit 9ab708aef61f5620113269a9d1bdb1543d1207d0 ]
In the case where lo_vag <= SGTL5000_LINE_OUT_GND_BASE, lo_vag is set to zero and later vol_quot is computed by dividing by lo_vag causing a division by zero error. Fix this by avoiding a zero division and set vol_quot to zero in this specific case so that the lowest setting for i is correctly set.
--- sound/soc/codecs/sgtl5000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/sgtl5000.c +1 -1
@@ -1415,7 +1415,7 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)* Searching for a suitable index solving this formula: * idx = 40 * log10(vag_val / lo_cagcntrl) + 15 */ - vol_quot = (vag *100 ) / lo_vag; + vol_quot = lo_vag ? (vag *100 ) / lo_vag :0 ; lo_vol =0 ;for (i =0 ; i <ARRAY_SIZE (vol_quot_table); i++) {if (vol_quot >= vol_quot_table[i])
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 27/159 ARM: dts: exynos: Disable pull control for S5M8767 PMIC
In reply to Greg Kroah-HartmanFrom: Marek Szyprowski <[email protected]>
[ Upstream commit ef2ecab9af5feae97c47b7f61cdd96f7f49b2c23 ]
S5M8767 PMIC interrupt line on Exynos5250-based Arndale board has external pull-up resistors, so disable any pull control for it in in controller node. This fixes support for S5M8767 interrupts and enables operation of wakeup from S5M8767 RTC alarm.
--- arch/arm/boot/dts/exynos5250-arndale.dts | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/exynos5250-arndale.dts +9 -0
@@ -170,6 +170,8 @@ reg = <0x66>; interrupt-parent = <&gpx3>; interrupts = <2 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&s5m8767_irq>; vinb1-supply = <&main_dc_reg>; vinb2-supply = <&main_dc_reg>;
@@ -552,6 +554,13 @@ cap-sd-highspeed; }; +&pinctrl_0 { + s5m8767_irq: s5m8767-irq { + samsung,pins = "gpx3-2"; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; +}; + &rtc { status = "okay"; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 28/159 ath10k: wmi: disable softirqs while calling ieee80211_rx
In reply to Greg Kroah-HartmanFrom: Erik Stromdahl <[email protected]>
[ Upstream commit 37f62c0d5822f631b786b29a1b1069ab714d1a28 ]
This is done in order not to trig the below warning in ieee80211_rx_napi:
WARN_ON_ONCE(softirq_count() == 0);
ieee80211_rx_napi requires that softirq's are disabled during execution.
The High latency bus drivers (SDIO and USB) sometimes call the wmi ep_rx_complete callback from non softirq context, resulting in a trigger of the above warning.
Calling ieee80211_rx_ni with softirq's already disabled (e.g., from softirq context) should be safe as the local_bh_disable and local_bh_enable functions (called from ieee80211_rx_ni) are fully reentrant.
--- drivers/net/wireless/ath/ath10k/wmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/wmi.c +2 -1
@@ -2294,7 +2294,8 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) status->freq, status->band, status->signal, status->rate_idx); -ieee80211_rx (ar->hw, skb); +ieee80211_rx_ni (ar->hw, skb); +return 0 ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 29/159 mips: txx9: fix iounmap related issue
In reply to Greg Kroah-HartmanFrom: Ding Xiang <[email protected]>
[ Upstream commit c6e1241a82e6e74d1ae5cc34581dab2ffd6022d0 ]
if device_register return error, iounmap should be called, also iounmap need to call before put_device.
Patchwork: https://patchwork.linux-mips.org/patch/20476/
--- arch/mips/txx9/generic/setup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
arch/mips/txx9/generic/setup.c +2 -3
@@ -961,12 +961,11 @@ void __init txx9_sramc_init(struct resource *r) goto exit_put; err =sysfs_create_bin_file (&dev->dev.kobj, &dev->bindata_attr);if (err) { -device_unregister (&dev->dev);iounmap (dev->base); -kfree (dev); +device_unregister (&dev->dev); }return ; exit_put: +iounmap (dev->base);put_device (&dev->dev); -return ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 30/159 of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC
In reply to Greg Kroah-HartmanFrom: Rob Herring <[email protected]>
[ Upstream commit f6707fd6241e483f6fea2caae82d876e422bb11a ]
Cache nodes under the cpu node(s) is PowerMac specific according to the comment above, so make the code enforce that.
--- drivers/of/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/base.c +1 -1
@@ -2125,7 +2125,7 @@ struct device_node *of_find_next_cache_node(const struct device_node *np)/* OF on pmac has nodes instead of properties named "l2-cache" * beneath CPU nodes. */ -if (!strcmp (np->type,"cpu" )) +if (IS_ENABLED (CONFIG_PPC_PMAC ) && !strcmp (np->type,"cpu" ))for_each_child_of_node (np, child)if (!strcmp (child->type,"cache" ))return child;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 31/159 ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files
In reply to Greg Kroah-HartmanFrom: H. Nikolaus Schaller <[email protected]>
[ Upstream commit fa0d7dc355c890725b6178dab0cc11b194203afa ]
needed for device variants based on GTA04 board but with different display panel (driver).
--- arch/arm/boot/dts/omap3-gta04.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04.dtsi +1 -1
@@ -70,7 +70,7 @@ #sound-dai-cells = <0>; }; - spi_lcd { + spi_lcd: spi_lcd { compatible = "spi-gpio"; #address-cells = <0x1>; #size-cells = <0x0>;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 32/159 ARM: dts: omap3-gta04: tvout: enable as display1 alias
In reply to Greg Kroah-HartmanFrom: H. Nikolaus Schaller <[email protected]>
[ Upstream commit 8905592b6e50cec905e6c6035bbd36201a3bfac1 ]
The omap dss susbystem takes the display aliases to find out which displays exist. To enable tv-out we must define an alias.
--- arch/arm/boot/dts/omap3-gta04.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/omap3-gta04.dtsi +1 -0
@@ -28,6 +28,7 @@ aliases { display0 = &lcd; + display1 = &tv0; }; gpio-keys {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 33/159 ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot
In reply to Greg Kroah-HartmanFrom: H. Nikolaus Schaller <[email protected]>
[ Upstream commit fa99c21ecb3cd4021a60d0e8bf880e78b5bd0729 ]
Vendor defined U-Boot has changed the partition scheme a while ago:
* kernel partition 6MB
* file system partition uses the remainder up to end of the NAND
* increased size of the environment partition (to get an OneNAND compatible base address)
* shrink the U-Boot partition
Let's be compatible (e.g. Debian kernel built from upstream).
--- arch/arm/boot/dts/omap3-gta04.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/omap3-gta04.dtsi +6 -6
@@ -523,22 +523,22 @@ bootloaders@80000 { label = "U-Boot"; - reg = <0x80000 0x1e0000>; + reg = <0x80000 0x1c0000>; }; - bootloaders_env@260000 { + bootloaders_env@240000 { label = "U-Boot Env"; - reg = <0x260000 0x20000>; + reg = <0x240000 0x40000>; }; kernel@280000 { label = "Kernel"; - reg = <0x280000 0x400000>; + reg = <0x280000 0x600000>; }; - filesystem@680000 { + filesystem@880000 { label = "File System"; - reg = <0x680000 0xf980000>; + reg = <0x880000 0>; /* 0 = MTDPART_SIZ_FULL */ }; }; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 34/159 ARM: dts: omap3-gta04: keep vpll2 always on
In reply to Greg Kroah-HartmanFrom: H. Nikolaus Schaller <[email protected]>
[ Upstream commit 1ae00833e30c9b4af5cbfda65d75b1de12f74013 ]
This is needed to make the display and venc work properly. Compare to omap3-beagle.dts.
--- arch/arm/boot/dts/omap3-gta04.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/omap3-gta04.dtsi +6 -0
@@ -460,6 +460,12 @@ regulator-max-microvolt = <3150000>; }; +/* Needed to power the DPI pins */ + +&vpll2 { + regulator-always-on; +}; + &dss { pinctrl-names = "default"; pinctrl-0 = < &dss_dpi_pins >;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 35/159 dmaengine: dma-jz4780: Further residue status fix
In reply to Greg Kroah-HartmanFrom: Daniel Silsby <[email protected]>
[ Upstream commit 83ef4fb7556b6a673f755da670cbacab7e2c7f1b ]
Func jz4780_dma_desc_residue() expects the index to the next hw descriptor as its last parameter. Caller func jz4780_dma_tx_status(), however, applied modulus before passing it. When the current hw descriptor was last in the list, the index passed became zero.
The resulting excess of reported residue especially caused problems with cyclic DMA transfer clients, i.e. ALSA AIC audio output, which rely on this for determining current DMA location within buffer.
Combined with the recent and related residue-reporting fixes, spurious ALSA audio underruns on jz4770 hardware are now fixed.
--- drivers/dma/dma-jz4780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/dma-jz4780.c +1 -1
@@ -576,7 +576,7 @@ static enum dma_status jz4780_dma_tx_status(struct dma_chan *chan, to_jz4780_dma_desc(vdesc), 0); }else if (cookie == jzchan->desc->vdesc.tx.cookie) { txstate->residue =jz4780_dma_desc_residue (jzchan, jzchan->desc, - (jzchan->curr_hwdesc +1 ) % jzchan->desc->count); + jzchan->curr_hwdesc +1 ); }else txstate->residue =0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 36/159 signal: Always ignore SIGKILL and SIGSTOP sent to the global init
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
[ Upstream commit 86989c41b5ea08776c450cb759592532314a4ed6 ]
If the first process started (aka /sbin/init) receives a SIGKILL it will panic the system if it is delivered. Making the system unusable and undebugable. It isn't much better if the first process started receives SIGSTOP.
So always ignore SIGSTOP and SIGKILL sent to init.
This is done in a separate clause in sig_task_ignored as force_sig_info can clear SIG_UNKILLABLE and this protection should work even then.
--- kernel/signal.c | 4 ++++ 1 file changed, 4 insertions(+)
kernel/signal.c +4 -0
@@ -71,6 +71,10 @@ static int sig_task_ignored(struct task_struct *t, int sig, bool force) handler =sig_handler (t, sig); +/* SIGKILL and SIGSTOP may not be sent to the global init */ +if (unlikely (is_global_init (t) &&sig_kernel_only (sig))) +return true; +if (unlikely (t->signal->flags &SIGNAL_UNKILLABLE ) && handler ==SIG_DFL && !(force &&sig_kernel_only (sig)))return 1 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 37/159 signal: Properly deliver SIGILL from uprobes
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
[ Upstream commit 55a3235fc71bf34303e34a95eeee235b2d2a35dd ]
For userspace to tell the difference between a random signal and an exception, the exception must include siginfo information.
Using SEND_SIG_FORCED for SIGILL is thus wrong, and it will result in userspace seeing si_code == SI_USER (like a random signal) instead of si_code == SI_KERNEL or a more specific si_code as all exceptions deliver.
Therefore replace force_sig_info(SIGILL, SEND_SIG_FORCE, current) with force_sig(SIG_ILL, current) which gets this right and is shorter and easier to type.
--- kernel/events/uprobes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/events/uprobes.c +2 -2
@@ -1836,7 +1836,7 @@ static void handle_trampoline(struct pt_regs *regs) sigill:uprobe_warn (current,"handle uretprobe, sending SIGILL." ); -force_sig_info (SIGILL ,SEND_SIG_FORCED , current); +force_sig (SIGILL , current); }
@@ -1952,7 +1952,7 @@ static void handle_singlestep(struct uprobe_task *utask, struct pt_regs *regs)if (unlikely (err)) {uprobe_warn (current,"execute the probed insn, sending SIGILL." ); -force_sig_info (SIGILL ,SEND_SIG_FORCED , current); +force_sig (SIGILL , current); } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 38/159 signal: Properly deliver SIGSEGV from x86 uprobes
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
[ Upstream commit 4a63c1ffd384ebdce40aac9c997dab68379137be ]
For userspace to tell the difference between an random signal and an exception, the exception must include siginfo information.
Using SEND_SIG_FORCED for SIGSEGV is thus wrong, and it will result in userspace seeing si_code == SI_USER (like a random signal) instead of si_code == SI_KERNEL or a more specific si_code as all exceptions deliver.
Therefore replace force_sig_info(SIGSEGV, SEND_SIG_FORCE, current) with force_sig(SIG_SEGV, current) which gets this right and is shorter and easier to type.
--- arch/x86/kernel/uprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/uprobes.c +1 -1
@@ -983,7 +983,7 @@ arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regspr_err ("uprobe: return address clobbered: pid=%d, %%sp=%#lx, " "%%ip=%#lx\n" , current->pid, regs->sp, regs->ip); -force_sig_info (SIGSEGV ,SEND_SIG_FORCED , current); +force_sig (SIGSEGV , current); }return -1 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 39/159 scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir()
In reply to Greg Kroah-HartmanFrom: George Kennedy <[email protected]>
[ Upstream commit 288315e95264b6355e26609e9dec5dc4563d4ab0 ]
sym_int_sir() in sym_hipd.c does not check the command pointer for NULL before using it in debug message prints.
--- drivers/scsi/sym53c8xx_2/sym_hipd.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/scsi/sym53c8xx_2/sym_hipd.c +11 -4
@@ -4371,6 +4371,13 @@ static void sym_nego_rejected(struct sym_hcb *np, struct sym_tcb *tp, struct symOUTB (np,HS_PRT ,HS_BUSY ); } +#define sym_printk(lvl, tp, cp, fmt, v...) do { \ + if (cp) \ + scmd_printk(lvl, cp->cmd, fmt, ##v); \ + else \ + starget_printk(lvl, tp->starget, fmt, ##v); \ +} while (0) +/* * chip exception handler for programmed interrupts. */
@@ -4416,7 +4423,7 @@ static void sym_int_sir(struct sym_hcb *np)* been selected with ATN. We do not want to handle that. */ case SIR_SEL_ATN_NO_MSG_OUT : -scmd_printk (KERN_WARNING , cp->cmd, +sym_printk (KERN_WARNING , tp, cp,"No MSG OUT phase after selection with ATN\n" ); goto out_stuck;/*
@@ -4424,7 +4431,7 @@ static void sym_int_sir(struct sym_hcb *np)* having reselected the initiator. */ case SIR_RESEL_NO_MSG_IN : -scmd_printk (KERN_WARNING , cp->cmd, +sym_printk (KERN_WARNING , tp, cp,"No MSG IN phase after reselection\n" ); goto out_stuck;/*
@@ -4432,7 +4439,7 @@ static void sym_int_sir(struct sym_hcb *np)* an IDENTIFY. */ case SIR_RESEL_NO_IDENTIFY : -scmd_printk (KERN_WARNING , cp->cmd, +sym_printk (KERN_WARNING , tp, cp,"No IDENTIFY after reselection\n" ); goto out_stuck;/*
@@ -4461,7 +4468,7 @@ static void sym_int_sir(struct sym_hcb *np)case SIR_RESEL_ABORTED : np->lastmsg = np->msgout[0 ]; np->msgout[0 ] =M_NOOP ; -scmd_printk (KERN_WARNING , cp->cmd, +sym_printk (KERN_WARNING , tp, cp,"message %x sent on bad reselection\n" , np->lastmsg); goto out;/*
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 40/159 ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set
In reply to Greg Kroah-HartmanFrom: Oleksij Rempel <[email protected]>
[ Upstream commit 8148d2136002da2e2887caf6a07bbd9c033f14f3 ]
One of the Freescale recommended sequences for power off with external PMIC is the following:
...
3. SoC is programming PMIC for power off when standby is asserted.
4. In CCM STOP mode, Standby is asserted, PMIC gates SoC supplies.
See:
http://www.nxp.com/assets/documents/data/en/reference-manuals/IMX6DQRM.pdf
page 5083
This patch implements step 4. of this sequence.
--- arch/arm/mach-imx/pm-imx6.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
arch/arm/mach-imx/pm-imx6.c +25 -0
@@ -602,6 +602,28 @@ static void __init imx6_pm_common_init(const struct imx6_pm_socdata IMX6Q_GPR1_GINT); } +static void imx6_pm_stby_poweroff (void ) +{ +imx6_set_lpm (STOP_POWER_OFF ); +imx6q_suspend_finish (0 ); + +mdelay (1000 ); + +pr_emerg ("Unable to poweroff system\n" ); +} + +static int imx6_pm_stby_poweroff_probe (void ) +{ +if (pm_power_off) { +pr_warn ("%s: pm_power_off already claimed %p %pf!\n" , + __func__, pm_power_off, pm_power_off); +return -EBUSY ; + } + + pm_power_off = imx6_pm_stby_poweroff; +return 0 ; +} +void __init imx6_pm_ccm_init (const char *ccm_compat) {struct device_node *np;
@@ -618,6 +640,9 @@ void __init imx6_pm_ccm_init(const char *ccm_compat) val =readl_relaxed (ccm_base +CLPCR ); val &= ~BM_CLPCR_LPM ;writel_relaxed (val, ccm_base +CLPCR ); + +if (of_property_read_bool (np,"fsl,pmic-stby-poweroff" )) +imx6_pm_stby_poweroff_probe (); }void __init imx6q_pm_init (void )
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 41/159 scsi: pm80xx: Corrected dma_unmap_sg() parameter
In reply to Greg Kroah-HartmanFrom: Deepak Ukey <[email protected]>
[ Upstream commit 76cb25b058034d37244be6aca97a2ad52a5fbcad ]
For the function dma_unmap_sg(), the <nents> parameter should be number of elements in the scatter list prior to the mapping, not after the mapping.
--- drivers/scsi/pm8001/pm8001_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/pm8001/pm8001_sas.c +1 -1
@@ -463,7 +463,7 @@ err_out:dev_printk (KERN_ERR , pm8001_ha->dev,"pm8001 exec failed[%d]!\n" , rc);if (!sas_protocol_ata (t->task_proto))if (n_elem) -dma_unmap_sg (pm8001_ha->dev, t->scatter, n_elem, +dma_unmap_sg (pm8001_ha->dev, t->scatter, t->num_scatter, t->data_dir); out_done:spin_unlock_irqrestore (&pm8001_ha->lock, flags);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 42/159 scsi: pm80xx: Fixed system hang issue during kexec boot
In reply to Greg Kroah-HartmanFrom: Deepak Ukey <[email protected]>
[ Upstream commit 72349b62a571effd6faadd0600b8e657dd87afbf ]
When the firmware is not responding, execution of kexec boot causes a system hang. When firmware assertion happened, driver get notified with interrupt vector updated in MPI configuration table. Then, the driver will read scratchpad register and set controller_fatal_error flag to true.
--- drivers/scsi/pm8001/pm8001_hwi.c | 6 +++ drivers/scsi/pm8001/pm8001_sas.c | 7 +++ drivers/scsi/pm8001/pm8001_sas.h | 1 + drivers/scsi/pm8001/pm80xx_hwi.c | 80 +++++++++++++++++++++++++++++--- drivers/scsi/pm8001/pm80xx_hwi.h | 3 ++ 5 files changed, 91 insertions(+), 6 deletions(-)
drivers/scsi/pm8001/pm8001_hwi.c +6 -0
@@ -1479,6 +1479,12 @@ u32 pm8001_mpi_msg_consume(struct pm8001_hba_info *pm8001_ha, }else {u32 producer_index;void *pi_virt = circularQ->pi_virt; +/* spurious interrupt during setup if +* kexec-ing and driver doing a doorbell access +* with the pre-kexec oq interrupt setup +*/ +if (!pi_virt) +break ;/* Update the producer index from SPC */ producer_index =pm8001_read_32 (pi_virt); circularQ->producer_index =cpu_to_le32 (producer_index);
drivers/scsi/pm8001/pm8001_sas.c +7 -0
@@ -371,6 +371,13 @@ static int pm8001_task_exec(struct sas_task *task,return 0 ; } pm8001_ha =pm8001_find_ha_by_dev (task->dev); +if (pm8001_ha->controller_fatal_error) { +struct task_status_struct *ts = &t->task_status; + + ts->resp =SAS_TASK_UNDELIVERED ; + t->task_done (t); +return 0 ; + }PM8001_IO_DBG (pm8001_ha,pm8001_printk ("pm8001_task_exec device \n " ));spin_lock_irqsave (&pm8001_ha->lock, flags); do {
drivers/scsi/pm8001/pm8001_sas.h +1 -0
@@ -531,6 +531,7 @@ struct pm8001_hba_info {u32 logging_level;u32 fw_status;u32 smp_exp_mode; +bool controller_fatal_error;const struct firmware *fw_image;struct isr_param irq_vector[PM8001_MAX_MSIX_VEC ]; };
drivers/scsi/pm8001/pm80xx_hwi.c +74 -6
115 lines not on this page · raw message
drivers/scsi/pm8001/pm80xx_hwi.h +3 -0
@@ -1288,6 +1288,9 @@ typedef struct SASProtocolTimerConfig SASProtocolTimerConfig_t;#define SCRATCH_PAD_BOOT_LOAD_SUCCESS 0x0#define SCRATCH_PAD_IOP0_READY 0xC00#define SCRATCH_PAD_IOP1_READY 0x3000 +#define SCRATCH_PAD_MIPSALL_READY (SCRATCH_PAD_IOP1_READY | \ + SCRATCH_PAD_IOP0_READY | \ + SCRATCH_PAD_RAAE_READY)/* boot loader state */ #define SCRATCH_PAD1_BOOTSTATE_MASK 0x70/* Bit 4-6 */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 43/159 kprobes: Dont call BUG_ON() if there is a kprobe in use on free list
In reply to Greg Kroah-HartmanFrom: Masami Hiramatsu <[email protected]>
[ Upstream commit cbdd96f5586151e48317d90a403941ec23f12660 ]
Instead of calling BUG_ON(), if we find a kprobe in use on free kprobe list, just remove it from the list and keep it on kprobe hash list as same as other in-use kprobes.
--- kernel/kprobes.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
kernel/kprobes.c +7 -1
@@ -514,8 +514,14 @@ static void do_free_cleaned_kprobes(void)struct optimized_kprobe *op, *tmp;list_for_each_entry_safe (op, tmp, &freeing_list, list) { -BUG_ON (!kprobe_unused (&op->kp));list_del_init (&op->list); +if (WARN_ON_ONCE (!kprobe_unused (&op->kp))) { +/* +* This must not happen, but if there is a kprobe +* still in use, keep it on kprobes hash list. +*/ +continue ; + }free_aggr_kprobe (&op->kp); } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 44/159 nvmem: core: return error code instead of NULL from nvmem_device_get
In reply to Greg Kroah-HartmanFrom: Srinivas Kandagatla <[email protected]>
[ Upstream commit ca6ac25cecf0e740d7cc8e03e0ebbf8acbeca3df ]
nvmem_device_get() should return ERR_PTR() on error or valid pointer on success, but one of the code path seems to return NULL, so fix it.
--- drivers/nvmem/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvmem/core.c +1 -1
@@ -457,7 +457,7 @@ static struct nvmem_device *nvmem_find(const char *name) d =bus_find_device (&nvmem_bus_type,NULL , (void *)name, nvmem_match);if (!d) -return NULL ; +return ERR_PTR (-ENOENT );return to_nvmem_device (d); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 45/159 media: fix: media: pci: meye: validate offset to avoid arbitrary access
In reply to Greg Kroah-HartmanFrom: Lao Wei <[email protected]>
[ Upstream commit eac7230fdb4672c2cb56f6a01a1744f562c01f80 ]
Motion eye video4linux driver for Sony Vaio PictureBook desn't validate user-controlled parameter 'vma->vm_pgoff', a malicious process might access all of kernel memory from user space by trying pass different arbitrary address.
Discussion: http://www.openwall.com/lists/oss-security/2018/07/06/1
--- drivers/media/pci/meye/meye.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/meye/meye.c +1 -1
@@ -1469,7 +1469,7 @@ static int meye_mmap(struct file *file, struct vm_area_struct *vma)unsigned long page, pos;mutex_lock (&meye.lock); -if (size > gbuffers * gbufsize) { +if (size > gbuffers * gbufsize || offset > gbuffers * gbufsize - size) {mutex_unlock (&meye.lock);return -EINVAL ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 46/159 ALSA: intel8x0m: Register irq handler after register initializations
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
[ Upstream commit 7064f376d4a10686f51c879401a569bb4babf9c6 ]
The interrupt handler has to be acquired after the other resource initialization when allocated with IRQF_SHARED. Otherwise it's triggered before the resource gets ready, and may lead to unpleasant behavior.
--- sound/pci/intel8x0m.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
sound/pci/intel8x0m.c +10 -10
@@ -1171,16 +1171,6 @@ static int snd_intel8x0m_create(struct snd_card *card, } port_inited: -if (request_irq (pci->irq, snd_intel8x0m_interrupt,IRQF_SHARED , -KBUILD_MODNAME , chip)) { -dev_err (card->dev,"unable to grab IRQ %d\n" , pci->irq); -snd_intel8x0m_free (chip); -return -EBUSY ; - } - chip->irq = pci->irq; -pci_set_master (pci); -synchronize_irq (chip->irq); -/* initialize offsets */ chip->bdbars_count =2 ; tbl = intel_regs;
@@ -1224,11 +1214,21 @@ static int snd_intel8x0m_create(struct snd_card *card, chip->int_sta_reg =ICH_REG_GLOB_STA ; chip->int_sta_mask = int_sta_masks; +pci_set_master (pci); +if ((err =snd_intel8x0m_chip_init (chip,1 )) <0 ) {snd_intel8x0m_free (chip);return err; } +if (request_irq (pci->irq, snd_intel8x0m_interrupt,IRQF_SHARED , +KBUILD_MODNAME , chip)) { +dev_err (card->dev,"unable to grab IRQ %d\n" , pci->irq); +snd_intel8x0m_free (chip); +return -EBUSY ; + } + chip->irq = pci->irq; +if ((err =snd_device_new (card,SNDRV_DEV_LOWLEVEL , chip, &ops)) <0 ) {snd_intel8x0m_free (chip);return err;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 47/159 pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit b97760ae8e3dc8bb91881c13425a0bff55f2bd85 ]
Smatch complains about this condition:
if (has_config && num_pins >= 1)
The "has_config" variable is either uninitialized or true. The "num_pins" variable is unsigned and we verified that it is non-zero on the lines before so we know "num_pines >= 1" is true. Really, we could just check "num_configs" directly and remove the "has_config" variable.
--- drivers/pinctrl/pinctrl-at91-pio4.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/pinctrl/pinctrl-at91-pio4.c +2 -6
@@ -477,7 +477,6 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,unsigned num_pins, num_configs, reserve;unsigned long *configs;struct property *pins; -bool has_config;u32 pinfunc;int ret, i;
@@ -493,9 +492,6 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,return ret; } -if (num_configs) - has_config = true; - num_pins = pins->length /sizeof (u32);if (!num_pins) { dev_err(pctldev->dev, "no pins found in node %s\n",
@@ -508,7 +504,7 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,* map for each pin. */ reserve =1 ; -if (has_config && num_pins >=1 ) +if (num_configs) reserve++; reserve *= num_pins; ret = pinctrl_utils_reserve_map(pctldev, map, reserved_maps, num_maps,
@@ -531,7 +527,7 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,pinctrl_utils_add_map_mux (pctldev, map, reserved_maps, num_maps, group, func); -if (has_config) { +if (num_configs) { ret = pinctrl_utils_add_map_configs(pctldev, map, reserved_maps, num_maps, group, configs, num_configs,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 48/159 llc: avoid blocking in llc_sap_close()
In reply to Greg Kroah-HartmanFrom: Cong Wang <[email protected]>
[ Upstream commit 9708d2b5b7c648e8e0a40d11e8cea12f6277f33c ]
llc_sap_close() is called by llc_sap_put() which could be called in BH context in llc_rcv(). We can't block in BH.
There is no reason to block it here, kfree_rcu() should be sufficient.
--- include/net/llc.h | 1 + net/llc/llc_core.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-)
include/net/llc.h +1 -0
@@ -66,6 +66,7 @@ struct llc_sap {int sk_count;struct hlist_nulls_head sk_laddr_hash[LLC_SK_LADDR_HASH_ENTRIES ];struct hlist_head sk_dev_hash[LLC_SK_DEV_HASH_ENTRIES ]; +struct rcu_head rcu; }; static inline
net/llc/llc_core.c +1 -3
@@ -127,9 +127,7 @@ void llc_sap_close(struct llc_sap *sap)list_del_rcu (&sap->node);spin_unlock_bh (&llc_sap_list_lock); -synchronize_rcu (); - -kfree (sap); +kfree_rcu (sap, rcu); }static struct packet_type llc_packet_type__read_mostly = {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 49/159 powerpc/vdso: Correct call frame information
In reply to Greg Kroah-HartmanFrom: Alan Modra <[email protected]>
[ Upstream commit 56d20861c027498b5a1112b4f9f05b56d906fdda ]
Call Frame Information is used by gdb for back-traces and inserting breakpoints on function return for the "finish" command. This failed when inside __kernel_clock_gettime. More concerning than difficulty debugging is that CFI is also used by stack frame unwinding code to implement exceptions. If you have an app that needs to handle asynchronous exceptions for some reason, and you are unlucky enough to get one inside the VDSO time functions, your app will crash.
What's wrong: There is control flow in __kernel_clock_gettime that reaches label 99 without saving lr in r12. CFI info however is interpreted by the unwinder without reference to control flow: It's a simple matter of "Execute all the CFI opcodes up to the current address". That means the unwinder thinks r12 contains the return address at label 99. Disabuse it of that notion by resetting CFI for the return address at label 99.
Note that the ".cfi_restore lr" could have gone anywhere from the "mtlr r12" a few instructions earlier to the instruction at label 99. I put the CFI as late as possible, because in general that's best practice (and if possible grouped with other CFI in order to reduce the number of CFI opcodes executed when unwinding). Using r12 as the return address is perfectly fine after the "mtlr r12" since r12 on that code path still contains the return address.
__get_datapage also has a CFI error. That function temporarily saves lr in r0, and reflects that fact with ".cfi_register lr,r0". A later use of r0 means the CFI at that point isn't correct, as r0 no longer contains the return address. Fix that too.
--- arch/powerpc/kernel/vdso32/datapage.S | 1 + arch/powerpc/kernel/vdso32/gettimeofday.S | 1 + arch/powerpc/kernel/vdso64/datapage.S | 1 + arch/powerpc/kernel/vdso64/gettimeofday.S | 1 + 4 files changed, 4 insertions(+)
arch/powerpc/kernel/vdso32/datapage.S +1 -0
@@ -37,6 +37,7 @@ data_page_branch: mtlr r0 addi r3, r3, __kernel_datapage_offset-data_page_branch lwz r0,0(r3) + .cfi_restore lr add r3,r0,r3 blr .cfi_endproc
arch/powerpc/kernel/vdso32/gettimeofday.S +1 -0
@@ -139,6 +139,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime) */ 99: li r0,__NR_clock_gettime + .cfi_restore lr sc blr .cfi_endproc
arch/powerpc/kernel/vdso64/datapage.S +1 -0
@@ -37,6 +37,7 @@ data_page_branch: mtlr r0 addi r3, r3, __kernel_datapage_offset-data_page_branch lwz r0,0(r3) + .cfi_restore lr add r3,r0,r3 blr .cfi_endproc
arch/powerpc/kernel/vdso64/gettimeofday.S +1 -0
@@ -124,6 +124,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime) */ 99: li r0,__NR_clock_gettime + .cfi_restore lr sc blr .cfi_endproc
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 50/159 ARM: dts: socfpga: Fix I2C bus unit-address error
In reply to Greg Kroah-HartmanFrom: Dinh Nguyen <[email protected]>
[ Upstream commit cbbc488ed85061a765cf370c3e41f383c1e0add6 ]
dtc has new checks for I2C buses. Fix the warnings in unit-addresses.
arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dtb: Warning (i2c_bus_reg): /soc/i2c@ffc04000/adxl345@0: I2C bus unit address format error, expected "53"
--- arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts +1 -1
@@ -88,7 +88,7 @@ status = "okay"; speed-mode = <0>; - adxl345: adxl345@0 { + adxl345: adxl345@53 { compatible = "adi,adxl345"; reg = <0x53>;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 51/159 pinctrl: at91: dont use the same irqchip with multiple gpiochips
In reply to Greg Kroah-HartmanFrom: Ludovic Desroches <[email protected]>
[ Upstream commit 0c3dfa176912b5f87732545598200fb55e9c1978 ]
Sharing the same irqchip with multiple gpiochips is not a good practice. For instance, when installing hooks, we change the state of the irqchip. The initial state of the irqchip for the second gpiochip to register is then disrupted.
--- drivers/pinctrl/pinctrl-at91.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/pinctrl/pinctrl-at91.c +14 -14
@@ -1556,16 +1556,6 @@ void at91_pinctrl_gpio_resume(void)#define gpio_irq_set_wake NULL#endif /* CONFIG_PM */ -static struct irq_chip gpio_irqchip = { - .name ="GPIO" , - .irq_ack = gpio_irq_ack, - .irq_disable = gpio_irq_mask, - .irq_mask = gpio_irq_mask, - .irq_unmask = gpio_irq_unmask, -/* .irq_set_type is set dynamically */ - .irq_set_wake = gpio_irq_set_wake, -}; -static void gpio_irq_handler (struct irq_desc *desc) {struct irq_chip *chip =irq_desc_get_chip (desc);
@@ -1608,12 +1598,22 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,struct gpio_chip *gpiochip_prev =NULL ;struct at91_gpio_chip *prev =NULL ;struct irq_data *d =irq_get_irq_data (at91_gpio->pioc_virq); +struct irq_chip *gpio_irqchip;int ret, i; + gpio_irqchip =devm_kzalloc (&pdev->dev,sizeof (*gpio_irqchip),GFP_KERNEL ); +if (!gpio_irqchip) +return -ENOMEM ; + at91_gpio->pioc_hwirq =irqd_to_hwirq (d); -/* Setup proper .irq_set_type function */ - gpio_irqchip.irq_set_type = at91_gpio->ops->irq_type; + gpio_irqchip->name ="GPIO" ; + gpio_irqchip->irq_ack = gpio_irq_ack; + gpio_irqchip->irq_disable = gpio_irq_mask; + gpio_irqchip->irq_mask = gpio_irq_mask; + gpio_irqchip->irq_unmask = gpio_irq_unmask; + gpio_irqchip->irq_set_wake = gpio_irq_set_wake, + gpio_irqchip->irq_set_type = at91_gpio->ops->irq_type;/* Disable irqs of this PIO controller */ writel_relaxed (~0 , at91_gpio->regbase +PIO_IDR );
@@ -1624,7 +1624,7 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,* interrupt. */ ret =gpiochip_irqchip_add (&at91_gpio->chip, - &gpio_irqchip, + gpio_irqchip,0 , handle_edge_irq,IRQ_TYPE_EDGE_BOTH );
@@ -1642,7 +1642,7 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,if (!gpiochip_prev) {/* Then register the chain on the parent IRQ */ gpiochip_set_chained_irqchip (&at91_gpio->chip, - &gpio_irqchip, + gpio_irqchip, at91_gpio->pioc_virq, gpio_irq_handler);return 0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 52/159 cxgb4: Fix endianness issue in t4_fwcache()
In reply to Greg Kroah-HartmanFrom: Ganesh Goudar <[email protected]>
[ Upstream commit 0dc235afc59a226d951352b0adf4a89b532a9d13 ]
Do not put host-endian 0 or 1 into big endian feild.
--- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +1 -1
@@ -3482,7 +3482,7 @@ int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op) c.param[0 ].mnem =cpu_to_be32 (FW_PARAMS_MNEM_V (FW_PARAMS_MNEM_DEV ) |FW_PARAMS_PARAM_X_V (FW_PARAMS_PARAM_DEV_FWCACHE )); - c.param[0 ].val = (__force __be32 )op; + c.param[0 ].val =cpu_to_be32 (op);return t4_wr_mbox (adap, adap->mbox, &c,sizeof (c),NULL ); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 53/159 power: supply: ab8500_fg: silence uninitialized variable warnings
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 54baff8d4e5dce2cef61953b1dc22079cda1ddb1 ]
If kstrtoul() fails then we print "charge_full" when it's uninitialized. The debug printk doesn't add anything so I deleted it and cleaned these two functions up a bit.
--- drivers/power/ab8500_fg.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-)
drivers/power/ab8500_fg.c +12 -19
@@ -2447,17 +2447,14 @@ static ssize_t charge_full_store(struct ab8500_fg *di, const char *buf, size_t count) {unsigned long charge_full; -ssize_t ret; +int ret; ret =kstrtoul (buf,10 , &charge_full); +if (ret) +return ret; -dev_dbg (di->dev,"Ret %zd charge_full %lu" , ret, charge_full); - -if (!ret) { - di->bat_cap.max_mah = (int ) charge_full; - ret = count; - } -return ret; + di->bat_cap.max_mah = (int ) charge_full; +return count; }static ssize_t charge_now_show (struct ab8500_fg *di,char *buf)
@@ -2469,20 +2466,16 @@ static ssize_t charge_now_store(struct ab8500_fg *di, const char *buf, size_t count) {unsigned long charge_now; -ssize_t ret; +int ret; ret =kstrtoul (buf,10 , &charge_now); +if (ret) +return ret; -dev_dbg (di->dev,"Ret %zd charge_now %lu was %d" , - ret, charge_now, di->bat_cap.prev_mah); - -if (!ret) { - di->bat_cap.user_mah = (int ) charge_now; - di->flags.user_cap = true; - ret = count; -queue_delayed_work (di->fg_wq, &di->fg_periodic_work,0 ); - } -return ret; + di->bat_cap.user_mah = (int ) charge_now; + di->flags.user_cap = true; +queue_delayed_work (di->fg_wq, &di->fg_periodic_work,0 ); +return count; } static struct ab8500_fg_sysfs_entry charge_full_attr =
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 54/159 power: supply: max8998-charger: Fix platform data retrieval
In reply to Greg Kroah-HartmanFrom: Tomasz Figa <[email protected]>
[ Upstream commit cb90a2c6f77fe9b43d1e3f759bb2f13fe7fa1811 ]
Since the max8998 MFD driver supports instantiation by DT, platform data retrieval is handled in MFD probe and cell drivers should get use the pdata field of max8998_dev struct to obtain them.
--- drivers/power/max8998_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/max8998_charger.c +1 -1
@@ -85,7 +85,7 @@ static const struct power_supply_desc max8998_battery_desc = {static int max8998_battery_probe (struct platform_device *pdev) {struct max8998_dev *iodev =dev_get_drvdata (pdev->dev.parent); -struct max8998_platform_data *pdata =dev_get_platdata (iodev->dev); +struct max8998_platform_data *pdata = iodev->pdata;struct power_supply_config psy_cfg = {};struct max8998_battery_data *max8998;struct i2c_client *i2c;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 55/159 kernfs: Fix range checks in kernfs_get_target_path
In reply to Greg Kroah-HartmanFrom: Bernd Edlinger <[email protected]>
[ Upstream commit a75e78f21f9ad4b810868c89dbbabcc3931591ca ]
The terminating NUL byte is only there because the buffer is allocated with kzalloc(PAGE_SIZE, GFP_KERNEL), but since the range-check is off-by-one, and PAGE_SIZE==PATH_MAX, the returned string may not be zero-terminated if it is exactly PATH_MAX characters long. Furthermore also the initial loop may theoretically exceed PATH_MAX and cause a fault.
--- fs/kernfs/symlink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
fs/kernfs/symlink.c +4 -1
@@ -63,6 +63,9 @@ static int kernfs_get_target_path(struct kernfs_node *parent,if (base == kn)break ; +if ((s - path) +3 >=PATH_MAX ) +return -ENAMETOOLONG ; +strcpy (s,"../" ); s +=3 ; base = base->parent;
@@ -79,7 +82,7 @@ static int kernfs_get_target_path(struct kernfs_node *parent,if (len <2 )return -EINVAL ; len--; -if ((s - path) + len >PATH_MAX ) +if ((s - path) + len >=PATH_MAX )return -ENAMETOOLONG ;/* reverse fillup of target string from target to base */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 56/159 s390/qeth: invoke softirqs after napi_schedule()
In reply to Greg Kroah-HartmanFrom: Julian Wiedmann <[email protected]>
[ Upstream commit 4d19db777a2f32c9b76f6fd517ed8960576cb43e ]
Calling napi_schedule() from process context does not ensure that the NET_RX softirq is run in a timely fashion. So trigger it manually.
This is no big issue with current code. A call to ndo_open() is usually followed by a ndo_set_rx_mode() call, and for qeth this contains a spin_unlock_bh(). Except for OSN, where qeth_l2_set_rx_mode() bails out early.
Nevertheless it's best to not depend on this behaviour, and just fix the issue at its source like all other drivers do. For instance see commit 83a0c6e58901 ("i40e: Invoke softirqs after napi_reschedule").
--- drivers/s390/net/qeth_l2_main.c | 3 +++ drivers/s390/net/qeth_l3_main.c | 3 +++ 2 files changed, 6 insertions(+)
drivers/s390/net/qeth_l2_main.c +3 -0
@@ -996,7 +996,10 @@ static int __qeth_l2_open(struct net_device *dev)if (qdio_stop_irq (card->data.ccwdev,0 ) >=0 ) {napi_enable (&card->napi); +local_bh_disable ();napi_schedule (&card->napi); +/* kick-start the NAPI softirq: */ +local_bh_enable (); }else rc = -EIO ;return rc;
drivers/s390/net/qeth_l3_main.c +3 -0
@@ -3031,7 +3031,10 @@ static int __qeth_l3_open(struct net_device *dev)if (qdio_stop_irq (card->data.ccwdev,0 ) >=0 ) {napi_enable (&card->napi); +local_bh_disable ();napi_schedule (&card->napi); +/* kick-start the NAPI softirq: */ +local_bh_enable (); }else rc = -EIO ;return rc;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 57/159 PCI/ACPI: Correct error message for ASPM disabling
In reply to Greg Kroah-HartmanFrom: Sinan Kaya <[email protected]>
[ Upstream commit 1ad61b612b95980a4d970c52022aa01dfc0f6068 ]
If _OSC execution fails today for platforms without an _OSC entry, code is printing a misleading message saying disabling ASPM as follows:
acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
We need to ensure that platform supports ASPM to begin with.
--- drivers/acpi/pci_root.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/acpi/pci_root.c +3 -2
@@ -454,8 +454,9 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm)decode_osc_support (root,"OS supports" , support); status =acpi_pci_osc_support (root, support);if (ACPI_FAILURE (status)) { -dev_info (&device->dev,"_OSC failed (%s); disabling ASPM\n" , -acpi_format_exception (status)); +dev_info (&device->dev,"_OSC failed (%s)%s\n" , +acpi_format_exception (status), +pcie_aspm_support_enabled () ?"; disabling ASPM" :"" ); *no_aspm =1 ;return ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 58/159 serial: mxs-auart: Fix potential infinite loop
In reply to Greg Kroah-HartmanFrom: Anton Vasilyev <[email protected]>
[ Upstream commit 5963e8a3122471cadfe0eba41c4ceaeaa5c8bb4d ]
On the error path of mxs_auart_request_gpio_irq() is performed backward iterating with index i of enum type. Underline enum type may be unsigned char. In this case check (--i >= 0) will be always true and error handling goes into infinite loop.
The patch changes the check so that it is valid for signed and unsigned types.
Found by Linux Driver Verification project (linuxtesting.org).
--- drivers/tty/serial/mxs-auart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/tty/serial/mxs-auart.c +2 -1
@@ -1248,8 +1248,9 @@ static int mxs_auart_request_gpio_irq(struct mxs_auart_port *s)/* * If something went wrong, rollback. +* Be careful: i may be unsigned. */ -while (err && (--i >=0 )) +while (err && (i-- >0 ))if (irq[i] >=0 )free_irq (irq[i], s);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 59/159 powerpc/iommu: Avoid derefence before pointer check
In reply to Greg Kroah-HartmanFrom: Breno Leitao <[email protected]>
[ Upstream commit 984ecdd68de0fa1f63ce205d6c19ef5a7bc67b40 ]
The tbl pointer is being derefenced by IOMMU_PAGE_SIZE prior the check if it is not NULL.
Just moving the dereference code to after the check, where there will be guarantee that 'tbl' will not be NULL.
--- arch/powerpc/kernel/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/iommu.c +1 -1
@@ -764,9 +764,9 @@ dma_addr_t iommu_map_page(struct device *dev, struct iommu_table *tbl, vaddr =page_address (page) + offset; uaddr = (unsigned long )vaddr; - npages =iommu_num_pages (uaddr, size,IOMMU_PAGE_SIZE (tbl));if (tbl) { + npages =iommu_num_pages (uaddr, size,IOMMU_PAGE_SIZE (tbl)); align =0 ;if (tbl->it_page_shift <PAGE_SHIFT && size >=PAGE_SIZE && ((unsigned long )vaddr & ~PAGE_MASK ) ==0 )
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 60/159 powerpc/64s/hash: Fix stab_rr off by one initialization
In reply to Greg Kroah-HartmanFrom: Nicholas Piggin <[email protected]>
[ Upstream commit 09b4438db13fa83b6219aee5993711a2aa2a0c64 ]
This causes SLB alloation to start 1 beyond the start of the SLB. There is no real problem because after it wraps it stats behaving properly, it's just surprisig to see when looking at SLB traces.
--- arch/powerpc/mm/slb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/mm/slb.c +1 -1
@@ -322,7 +322,7 @@ void slb_initialize(void)#endif } -get_paca ()->stab_rr =SLB_NUM_BOLTED ; +get_paca ()->stab_rr =SLB_NUM_BOLTED -1 ; lflags =SLB_VSID_KERNEL | linear_llp; vflags =SLB_VSID_KERNEL | vmalloc_llp;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 61/159 powerpc/pseries: Disable CPU hotplug across migrations
In reply to Greg Kroah-HartmanFrom: Nathan Fontenot <[email protected]>
[ Upstream commit 85a88cabad57d26d826dd94ea34d3a785824d802 ]
When performing partition migrations all present CPUs must be online as all present CPUs must make the H_JOIN call as part of the migration process. Once all present CPUs make the H_JOIN call, one CPU is returned to make the rtas call to perform the migration to the destination system.
During testing of migration and changing the SMT state we have found instances where CPUs are offlined, as part of the SMT state change, before they make the H_JOIN call. This results in a hung system where every CPU is either in H_JOIN or offline.
To prevent this this patch disables CPU hotplug during the migration process.
--- arch/powerpc/kernel/rtas.c | 2 ++ 1 file changed, 2 insertions(+)
arch/powerpc/kernel/rtas.c +2 -0
@@ -967,6 +967,7 @@ int rtas_ibm_suspend_me(u64 handle) goto out; } +cpu_hotplug_disable ();stop_topology_update ();/* Call function on all CPUs. One of us will make the
@@ -981,6 +982,7 @@ int rtas_ibm_suspend_me(u64 handle)printk (KERN_ERR "Error doing global join\n" );start_topology_update (); +cpu_hotplug_enable ();/* Take down CPUs not online prior to suspend */ cpuret =rtas_offline_cpus_mask (offline_mask);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 62/159 libfdt: Ensure INT_MAX is defined in libfdt_env.h
In reply to Greg Kroah-HartmanFrom: Rob Herring <[email protected]>
[ Upstream commit 53dd9dce6979bc54d64a3a09a2fb20187a025be7 ]
The next update of libfdt has a new dependency on INT_MAX. Update the instances of libfdt_env.h in the kernel to either include the necessary header with the definition or define it locally.
--- arch/arm/boot/compressed/libfdt_env.h | 2 ++ arch/powerpc/boot/libfdt_env.h | 2 ++ include/linux/libfdt_env.h | 1 + 3 files changed, 5 insertions(+)
arch/arm/boot/compressed/libfdt_env.h +2 -0
@@ -5,6 +5,8 @@#include <linux/string.h> #include <asm/byteorder.h> +#define INT_MAX ((int)(~0U>>1)) +typedef __be16 fdt16_t ;typedef __be32 fdt32_t ;typedef __be64 fdt64_t ;
arch/powerpc/boot/libfdt_env.h +2 -0
@@ -4,6 +4,8 @@#include <types.h> #include <string.h> +#define INT_MAX ((int)(~0U>>1)) +#include "of.h" typedef u32 uint32_t ;
include/linux/libfdt_env.h +1 -0
@@ -1,6 +1,7 @@#ifndef _LIBFDT_ENV_H#define _LIBFDT_ENV_H +#include <linux/kernel.h> /* For INT_MAX */ #include <linux/string.h> #include <asm/byteorder.h>
Signature · 9 lines
2.20.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Greg Kroah-Hartman
maintainerPATCH 63/159 power: supply: twl4030_charger: fix charging current out-of-bounds
In reply to Greg Kroah-HartmanFrom: Andreas Kemnade <[email protected]>
[ Upstream commit 8314c212f995bc0d06b54ad02ef0ab4089781540 ]
the charging current uses unsigned int variables, if we step back if the current is still low, we would run into negative which means setting the target to a huge value.
Better add checks here.
--- drivers/power/twl4030_charger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/power/twl4030_charger.c +2 -1
@@ -449,7 +449,8 @@ static void twl4030_current_worker(struct work_struct *data)if (v <USB_MIN_VOLT ) {/* Back up and stop adjusting. */ - bci->usb_cur -=USB_CUR_STEP ; +if (bci->usb_cur >=USB_CUR_STEP ) + bci->usb_cur -=USB_CUR_STEP ; bci->usb_cur_target = bci->usb_cur; }else if (bci->usb_cur >= bci->usb_cur_target || bci->usb_cur +USB_CUR_STEP >USB_MAX_CURRENT ) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 64/159 power: supply: twl4030_charger: disable eoc interrupt on linear charge
In reply to Greg Kroah-HartmanFrom: Andreas Kemnade <[email protected]>
[ Upstream commit 079cdff3d0a09c5da10ae1be35def7a116776328 ]
This avoids getting woken up from suspend after power interruptions when the bci wrongly thinks the battery is full just because of input current going low because of low input power
--- drivers/power/twl4030_charger.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-)
drivers/power/twl4030_charger.c +26 -1
@@ -469,6 +469,7 @@ static void twl4030_current_worker(struct work_struct *data)static int twl4030_charger_enable_usb (struct twl4030_bci *bci,bool enable) {int ret; +u32 reg;if (bci->usb_mode ==CHARGE_OFF ) enable = false;
@@ -482,14 +483,38 @@ static int twl4030_charger_enable_usb(struct twl4030_bci *bci, bool enable) bci->usb_enabled =1 ; } -if (bci->usb_mode ==CHARGE_AUTO ) +if (bci->usb_mode ==CHARGE_AUTO ) { +/* Enable interrupts now. */ + reg = ~(u32)(TWL4030_ICHGLOW |TWL4030_ICHGEOC | +TWL4030_TBATOR2 |TWL4030_TBATOR1 | +TWL4030_BATSTS ); + ret =twl_i2c_write_u8 (TWL4030_MODULE_INTERRUPTS , reg, +TWL4030_INTERRUPTS_BCIIMR1A ); +if (ret <0 ) { +dev_err (bci->dev, +"failed to unmask interrupts: %d\n" , + ret); +return ret; + }/* forcing the field BCIAUTOUSB (BOOT_BCI[1]) to 1 */ ret =twl4030_clear_set_boot_bci (0 ,TWL4030_BCIAUTOUSB ); + }/* forcing USBFASTMCHG(BCIMFSTS4[2]) to 1 */ ret =twl4030_clear_set (TWL_MODULE_MAIN_CHARGE ,0 ,TWL4030_USBFASTMCHG ,TWL4030_BCIMFSTS4 );if (bci->usb_mode ==CHARGE_LINEAR ) { +/* Enable interrupts now. */ + reg = ~(u32)(TWL4030_ICHGLOW |TWL4030_TBATOR2 | +TWL4030_TBATOR1 |TWL4030_BATSTS ); + ret =twl_i2c_write_u8 (TWL4030_MODULE_INTERRUPTS , reg, +TWL4030_INTERRUPTS_BCIIMR1A ); +if (ret <0 ) { +dev_err (bci->dev, +"failed to unmask interrupts: %d\n" , + ret); +return ret; + }twl4030_clear_set_boot_bci (TWL4030_BCIAUTOAC |TWL4030_CVENAC ,0 );/* Watch dog key: WOVF acknowledge */ ret = twl_i2c_write_u8(TWL_MODULE_MAIN_CHARGE, 0x33,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 65/159 net: toshiba: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit bacade822524e02f662d88f784d2ae821a5546fb ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 4 ++-- drivers/net/ethernet/toshiba/ps3_gelic_net.h | 2 +- drivers/net/ethernet/toshiba/spider_net.c | 4 ++-- drivers/net/ethernet/toshiba/tc35815.c | 6 ++++-- 4 files changed, 9 insertions(+), 7 deletions(-)
drivers/net/ethernet/toshiba/ps3_gelic_net.c +2 -2
@@ -845,9 +845,9 @@ static int gelic_card_kick_txdma(struct gelic_card *card,* @skb: packet to send out * @netdev: interface device structure * -* returns 0 on success, <0 on failure +* returns NETDEV_TX_OK on success, NETDEV_TX_BUSY on failure */ -int gelic_net_xmit (struct sk_buff *skb,struct net_device *netdev) +netdev_tx_t gelic_net_xmit (struct sk_buff *skb,struct net_device *netdev) {struct gelic_card *card =netdev_card (netdev);struct gelic_descr *descr;
drivers/net/ethernet/toshiba/ps3_gelic_net.h +1 -1
@@ -370,7 +370,7 @@ void gelic_card_up(struct gelic_card *card);void gelic_card_down (struct gelic_card *card);int gelic_net_open (struct net_device *netdev);int gelic_net_stop (struct net_device *netdev); -int gelic_net_xmit (struct sk_buff *skb,struct net_device *netdev); +netdev_tx_t gelic_net_xmit (struct sk_buff *skb,struct net_device *netdev);void gelic_net_set_multi (struct net_device *netdev);void gelic_net_tx_timeout (struct net_device *netdev);int gelic_net_change_mtu (struct net_device *netdev,int new_mtu);
drivers/net/ethernet/toshiba/spider_net.c +2 -2
@@ -881,9 +881,9 @@ out:* @skb: packet to send out * @netdev: interface device structure * -* returns 0 on success, !0 on failure +* returns NETDEV_TX_OK on success, NETDEV_TX_BUSY on failure */ -static int +static netdev_tx_t spider_net_xmit (struct sk_buff *skb,struct net_device *netdev) {int cnt;
drivers/net/ethernet/toshiba/tc35815.c +4 -2
@@ -475,7 +475,8 @@ static void free_rxbuf_skb(struct pci_dev *hwdev, struct sk_buff *skb, dma_addr_/* Index to functions, as function prototypes. */ static int tc35815_open (struct net_device *dev); -static int tc35815_send_packet (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t tc35815_send_packet (struct sk_buff *skb, +struct net_device *dev);static irqreturn_t tc35815_interrupt (int irq,void *dev_id);static int tc35815_rx (struct net_device *dev,int limit);static int tc35815_poll (struct napi_struct *napi,int budget);
@@ -1279,7 +1280,8 @@ tc35815_open(struct net_device *dev)* invariant will hold if you make sure that the netif_*_queue() * calls are done at the proper times. */ -static int tc35815_send_packet (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +tc35815_send_packet (struct sk_buff *skb,struct net_device *dev) {struct tc35815_local *lp =netdev_priv (dev);struct TxFD *txfd;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 66/159 net: xilinx: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 81255af8d9d5565004792c295dde49344df450ca ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/xilinx/ll_temac_main.c | 3 ++- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 ++- drivers/net/ethernet/xilinx/xilinx_emaclite.c | 9 +++++---- 3 files changed, 9 insertions(+), 6 deletions(-)
drivers/net/ethernet/xilinx/ll_temac_main.c +2 -1
@@ -673,7 +673,8 @@ static inline int temac_check_tx_bd_space(struct temac_local *lp, int num_frag)return 0 ; } -static int temac_start_xmit (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t +temac_start_xmit (struct sk_buff *skb,struct net_device *ndev) {struct temac_local *lp =netdev_priv (ndev);struct cdmac_bd *cur_p;
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +2 -1
@@ -656,7 +656,8 @@ static inline int axienet_check_tx_bd_space(struct axienet_local *lp,* start the transmission. Additionally if checksum offloading is supported, * it populates AXI Stream Control fields with appropriate values. */ -static int axienet_start_xmit (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t +axienet_start_xmit (struct sk_buff *skb,struct net_device *ndev) {u32 ii;u32 num_frag;
drivers/net/ethernet/xilinx/xilinx_emaclite.c +5 -4
@@ -1008,9 +1008,10 @@ static int xemaclite_close(struct net_device *dev)* deferred and the Tx queue is stopped so that the deferred socket buffer can * be transmitted when the Emaclite device is free to transmit data. * -* Return: 0, always. +* Return: NETDEV_TX_OK, always. */ -static int xemaclite_send (struct sk_buff *orig_skb,struct net_device *dev) +static netdev_tx_t +xemaclite_send (struct sk_buff *orig_skb,struct net_device *dev) {struct net_local *lp =netdev_priv (dev);struct sk_buff *new_skb;
@@ -1031,7 +1032,7 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)/* Take the time stamp now, since we can't do this in an ISR. */ skb_tx_timestamp (new_skb);spin_unlock_irqrestore (&lp->reset_lock, flags); -return 0 ; +return NETDEV_TX_OK ; }spin_unlock_irqrestore (&lp->reset_lock, flags);
@@ -1040,7 +1041,7 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev) dev->stats.tx_bytes += len;dev_consume_skb_any (new_skb); -return 0 ; +return NETDEV_TX_OK ; }/**
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 67/159 net: broadcom: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 0c13b8d1aee87c35a2fbc1d85a1f766227cf54b5 ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 5 +++-- drivers/net/ethernet/broadcom/sb1250-mac.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/net/ethernet/broadcom/bcm63xx_enet.c +3 -2
@@ -571,12 +571,13 @@ static irqreturn_t bcm_enet_isr_dma(int irq, void *dev_id)/* * tx request callback */ -static int bcm_enet_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +bcm_enet_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct bcm_enet_priv *priv;struct bcm_enet_desc *desc;u32 len_stat; -int ret; +netdev_tx_t ret; priv =netdev_priv (dev);
drivers/net/ethernet/broadcom/sb1250-mac.c +2 -2
@@ -300,7 +300,7 @@ static enum sbmac_state sbmac_set_channel_state(struct sbmac_softc *,static void sbmac_promiscuous_mode (struct sbmac_softc *sc,int onoff);static uint64_t sbmac_addr2reg (unsigned char *ptr);static irqreturn_t sbmac_intr (int irq,void *dev_instance); -static int sbmac_start_tx (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t sbmac_start_tx (struct sk_buff *skb,struct net_device *dev);static void sbmac_setmulti (struct sbmac_softc *sc);static int sbmac_init (struct platform_device *pldev,long long base);static int sbmac_set_speed (struct sbmac_softc *s,enum sbmac_speed speed);
@@ -2033,7 +2033,7 @@ static irqreturn_t sbmac_intr(int irq,void *dev_instance)* Return value: * nothing ********************************************************************* */ -static int sbmac_start_tx (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t sbmac_start_tx (struct sk_buff *skb,struct net_device *dev) {struct sbmac_softc *sc =netdev_priv (dev);unsigned long flags;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 68/159 net: amd: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit fe72352e37ae8478f4c97975a9831f0c50f22e73 ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/amd/am79c961a.c | 2 +- drivers/net/ethernet/amd/atarilance.c | 6 ++++-- drivers/net/ethernet/amd/declance.c | 2 +- drivers/net/ethernet/amd/sun3lance.c | 6 ++++-- drivers/net/ethernet/amd/sunlance.c | 2 +- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 4 ++-- 6 files changed, 13 insertions(+), 9 deletions(-)
drivers/net/ethernet/amd/am79c961a.c +1 -1
@@ -440,7 +440,7 @@ static void am79c961_timeout(struct net_device *dev)/* * Transmit a packet */ -static int +static netdev_tx_t am79c961_sendpacket (struct sk_buff *skb,struct net_device *dev) {struct dev_priv *priv =netdev_priv (dev);
drivers/net/ethernet/amd/atarilance.c +4 -2
@@ -339,7 +339,8 @@ static unsigned long lance_probe1( struct net_device *dev, struct lance_addr *init_rec );static int lance_open (struct net_device *dev );static void lance_init_ring (struct net_device *dev ); -static int lance_start_xmit (struct sk_buff *skb,struct net_device *dev ); +static netdev_tx_t lance_start_xmit (struct sk_buff *skb, +struct net_device *dev);static irqreturn_t lance_interrupt (int irq,void *dev_id );static int lance_rx (struct net_device *dev );static int lance_close (struct net_device *dev );
@@ -770,7 +771,8 @@ static void lance_tx_timeout (struct net_device *dev)/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ -static int lance_start_xmit (struct sk_buff *skb,struct net_device *dev ) +static netdev_tx_t +lance_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct lance_private *lp =netdev_priv (dev);struct lance_ioreg *IO = lp->iobase;
drivers/net/ethernet/amd/declance.c +1 -1
@@ -893,7 +893,7 @@ static void lance_tx_timeout(struct net_device *dev)netif_wake_queue (dev); } -static int lance_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t lance_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct lance_private *lp =netdev_priv (dev);volatile struct lance_regs *ll = lp->ll;
drivers/net/ethernet/amd/sun3lance.c +4 -2
@@ -235,7 +235,8 @@ struct lance_private {static int lance_probe (struct net_device *dev);static int lance_open (struct net_device *dev );static void lance_init_ring (struct net_device *dev ); -static int lance_start_xmit (struct sk_buff *skb,struct net_device *dev ); +static netdev_tx_t lance_start_xmit (struct sk_buff *skb, +struct net_device *dev);static irqreturn_t lance_interrupt (int irq,void *dev_id);static int lance_rx (struct net_device *dev );static int lance_close (struct net_device *dev );
@@ -511,7 +512,8 @@ static void lance_init_ring( struct net_device *dev ) } -static int lance_start_xmit (struct sk_buff *skb,struct net_device *dev ) +static netdev_tx_t +lance_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct lance_private *lp =netdev_priv (dev);int entry, len;
drivers/net/ethernet/amd/sunlance.c +1 -1
@@ -1106,7 +1106,7 @@ static void lance_tx_timeout(struct net_device *dev)netif_wake_queue (dev); } -static int lance_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t lance_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct lance_private *lp =netdev_priv (dev);int entry, skblen, len;
drivers/net/ethernet/amd/xgbe/xgbe-drv.c +2 -2
@@ -1390,7 +1390,7 @@ static int xgbe_close(struct net_device *netdev)return 0 ; } -static int xgbe_xmit (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t xgbe_xmit (struct sk_buff *skb,struct net_device *netdev) {struct xgbe_prv_data *pdata =netdev_priv (netdev);struct xgbe_hw_if *hw_if = &pdata->hw_if;
@@ -1399,7 +1399,7 @@ static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)struct xgbe_ring *ring;struct xgbe_packet_data *packet;struct netdev_queue *txq; -int ret; +netdev_tx_t ret;DBGPR ("-->xgbe_xmit: skb->len = %d\n" , skb->len);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 69/159 usb: chipidea: Fix otg event handler
In reply to Greg Kroah-HartmanFrom: Loic Poulain <[email protected]>
[ Upstream commit 59739131e0ca06db7560f9073fff2fb83f6bc2a5 ]
At OTG work running time, it's possible that several events need to be addressed (e.g. ID and VBUS events). The current implementation handles only one event at a time which leads to ignoring the other one. Fix it.
--- drivers/usb/chipidea/otg.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/usb/chipidea/otg.c +6 -3
@@ -206,14 +206,17 @@ static void ci_otg_work(struct work_struct *work) }pm_runtime_get_sync (ci->dev); +if (ci->id_event) { ci->id_event = false;ci_handle_id_switch (ci); - }else if (ci->b_sess_valid_event) { + } + +if (ci->b_sess_valid_event) { ci->b_sess_valid_event = false;ci_handle_vbus_change (ci); - }else -dev_err (ci->dev,"unexpected event occurs at %s\n" , __func__); + } +pm_runtime_put_sync (ci->dev);enable_irq (ci->irq);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 70/159 ARM: dts: am335x-evm: fix number of cpsw
In reply to Greg Kroah-HartmanFrom: Grygorii Strashko <[email protected]>
[ Upstream commit dcbf6b18d81bcdc51390ca1b258c17e2e13b7d0c ]
am335x-evm has only one CPSW external port physically wired, but DT defines 2 ext. ports. As result, PHY connection failure reported for the second ext. port.
Update DT to reflect am335x-evm board HW configuration, and, while here, switch to use phy-handle instead of phy_id.
--- arch/arm/boot/dts/am335x-evm.dts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/am335x-evm.dts +6 -6
@@ -697,6 +697,7 @@ pinctrl-0 = <&cpsw_default>; pinctrl-1 = <&cpsw_sleep>; status = "okay"; + slaves = <1>; }; &davinci_mdio {
@@ -704,15 +705,14 @@ pinctrl-0 = <&davinci_mdio_default>; pinctrl-1 = <&davinci_mdio_sleep>; status = "okay"; -}; -&cpsw_emac0 { - phy_id = <&davinci_mdio>, <0>; - phy-mode = "rgmii-txid"; + ethphy0: ethernet-phy@0 { + reg = <0>; + }; }; -&cpsw_emac1 { - phy_id = <&davinci_mdio>, <1>; +&cpsw_emac0 { + phy-handle = <ðphy0>; phy-mode = "rgmii-txid"; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 71/159 ARM: dts: ux500: Correct SCU unit address
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 2f217d24ecaec2012e628d21e244eef0608656a4 ]
The unit address of the Cortex-A9 SCU device node contains one zero too many. Remove it.
--- arch/arm/boot/dts/ste-dbx5x0.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ste-dbx5x0.dtsi +1 -1
@@ -186,7 +186,7 @@ <0xa0410100 0x100>; }; - scu@a04100000 { + scu@a0410000 { compatible = "arm,cortex-a9-scu"; reg = <0xa0410000 0x100>; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 72/159 ARM: dts: ux500: Fix LCDA clock line muxing
In reply to Greg Kroah-HartmanFrom: Linus Walleij <[email protected]>
[ Upstream commit ecde29569e3484e1d0a032bf4074449bce4d4a03 ]
The "lcdaclk_b_1" group is muxed with the function "lcd" but needs a separate entry to be muxed in with "lcda" rather than "lcd".
--- arch/arm/boot/dts/ste-href-family-pinctrl.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/boot/dts/ste-href-family-pinctrl.dtsi +6 -2
@@ -607,16 +607,20 @@ mcde { lcd_default_mode: lcd_default { - default_mux { + default_mux1 { /* Mux in VSI0 and all the data lines */ function = "lcd"; groups = "lcdvsi0_a_1", /* VSI0 for LCD */ "lcd_d0_d7_a_1", /* Data lines */ "lcd_d8_d11_a_1", /* TV-out */ - "lcdaclk_b_1", /* Clock line for TV-out */ "lcdvsi1_a_1"; /* VSI1 for HDMI */ }; + default_mux2 { + function = "lcda"; + groups = + "lcdaclk_b_1"; /* Clock line for TV-out */ + }; default_cfg1 { pins = "GPIO68_E1", /* VSI0 */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 73/159 ARM: dts: ste: Fix SPI controller node names
In reply to Greg Kroah-HartmanFrom: Rob Herring <[email protected]>
[ Upstream commit 2f967f9e9fa076affb711da1a8389b5d33814fc6 ]
SPI controller nodes should be named 'spi' rather than 'ssp'. Fixing the name enables dtc SPI bus checks.
--- arch/arm/boot/dts/ste-dbx5x0.dtsi | 4 ++-- arch/arm/boot/dts/ste-hrefprev60.dtsi | 2 +- arch/arm/boot/dts/ste-snowball.dts | 2 +- arch/arm/boot/dts/ste-u300.dts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/boot/dts/ste-dbx5x0.dtsi +2 -2
@@ -894,7 +894,7 @@ power-domains = <&pm_domains DOMAIN_VAPE>; }; - ssp@80002000 { + spi@80002000 { compatible = "arm,pl022", "arm,primecell"; reg = <0x80002000 0x1000>; interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>;
@@ -908,7 +908,7 @@ power-domains = <&pm_domains DOMAIN_VAPE>; }; - ssp@80003000 { + spi@80003000 { compatible = "arm,pl022", "arm,primecell"; reg = <0x80003000 0x1000>; interrupts = <0 52 IRQ_TYPE_LEVEL_HIGH>;
arch/arm/boot/dts/ste-hrefprev60.dtsi +1 -1
@@ -57,7 +57,7 @@ }; }; - ssp@80002000 { + spi@80002000 { /* * On the first generation boards, this SSP/SPI port was connected * to the AB8500.
arch/arm/boot/dts/ste-snowball.dts +1 -1
@@ -311,7 +311,7 @@ pinctrl-1 = <&i2c3_sleep_mode>; }; - ssp@80002000 { + spi@80002000 { pinctrl-names = "default"; pinctrl-0 = <&ssp0_snowball_mode>; };
arch/arm/boot/dts/ste-u300.dts +1 -1
@@ -451,7 +451,7 @@ dma-names = "rx"; }; - spi: ssp@c0006000 { + spi: spi@c0006000 { compatible = "arm,pl022", "arm,primecell"; reg = <0xc0006000 0x1000>; interrupt-parent = <&vica>;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 74/159 cpufeature: avoid warning when compiling with clang
In reply to Greg Kroah-HartmanFrom: Stefan Agner <[email protected]>
[ Upstream commit c785896b21dd8e156326ff660050b0074d3431df ]
The table id (second) argument to MODULE_DEVICE_TABLE is often referenced otherwise. This is not the case for CPU features. This leads to warnings when building the kernel with Clang:
arch/arm/crypto/aes-ce-glue.c:450:1: warning: variable
'cpu_feature_match_AES' is not needed and will not be emitted [-Wunneeded-internal-declaration]
module_cpu_feature_match(AES, aes_init);
^
Avoid warnings by using __maybe_unused, similar to commit 1f318a8bafcf ("modules: mark __inittest/__exittest as __maybe_unused").
--- include/linux/cpufeature.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/cpufeature.h +1 -1
@@ -45,7 +45,7 @@* 'asm/cpufeature.h' of your favorite architecture. */ #define module_cpu_feature_match (x, __initfunc) \ -static struct cpu_feature const cpu_feature_match_ ## x[] = \ +static struct cpu_feature const __maybe_unused cpu_feature_match_ ## x[] = \ { { .feature = cpu_feature(x) }, { } }; \ MODULE_DEVICE_TABLE(cpu, cpu_feature_match_ ## x); \ \
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 75/159 bnx2x: Ignore bandwidth attention in single function mode
In reply to Greg Kroah-HartmanFrom: Shahed Shaikh <[email protected]>
[ Upstream commit 75a110a1783ef8324ffd763b24f4ac268253cbca ]
This is a workaround for FW bug -
MFW generates bandwidth attention in single function mode, which is only expected to be generated in multi function mode. This undesired attention in SF mode results in incorrect HW configuration and resulting into Tx timeout.
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +10 -0
@@ -3532,6 +3532,16 @@ static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp)*/ static void bnx2x_config_mf_bw (struct bnx2x *bp) { +/* Workaround for MFW bug. +* MFW is not supposed to generate BW attention in +* single function mode. +*/ +if (!IS_MF (bp)) { +DP (BNX2X_MSG_MCP , +"Ignoring MF BW config in single function mode\n" ); +return ; + } +if (bp->link_vars.link_up) {bnx2x_cmng_fns_init (bp, true,CMNG_FNS_MINMAX );bnx2x_link_sync_notify (bp);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 76/159 net: micrel: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 2b49117a5abee8478b0470cba46ac74f93b4a479 ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/micrel/ks8695net.c | 2 +- drivers/net/ethernet/micrel/ks8851_mll.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/micrel/ks8695net.c +1 -1
@@ -1156,7 +1156,7 @@ ks8695_timeout(struct net_device *ndev)* sk_buff and adds it to the TX ring. It then kicks the TX DMA * engine to ensure transmission begins. */ -static int +static netdev_tx_t ks8695_start_xmit (struct sk_buff *skb,struct net_device *ndev) {struct ks8695_priv *ksp =netdev_priv (ndev);
drivers/net/ethernet/micrel/ks8851_mll.c +2 -2
@@ -1020,9 +1020,9 @@ static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len)* spin_lock_irqsave is required because tx and rx should be mutual exclusive. * So while tx is in-progress, prevent IRQ interrupt from happenning. */ -static int ks_start_xmit (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t ks_start_xmit (struct sk_buff *skb,struct net_device *netdev) { -int retv =NETDEV_TX_OK ; +netdev_tx_t retv =NETDEV_TX_OK ;struct ks_net *ks =netdev_priv (netdev);disable_irq (netdev->irq);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 77/159 x86/CPU: Use correct macros for Cyrix calls
In reply to Greg Kroah-HartmanFrom: Matthew Whitehead <[email protected]>
[ Upstream commit 03b099bdcdf7125d4a63dc9ddeefdd454e05123d ]
There are comments in processor-cyrix.h advising you to _not_ make calls using the deprecated macros in this style:
setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80);
This is because it expands the macro into a non-functioning calling sequence. The calling order must be:
outb(CX86_CCR2, 0x22); inb(0x23);
Quoted 1 line
From the comments:
* When using the old macros a line like
* setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
* gets expanded to:
* do {
* outb((CX86_CCR2), 0x22);
* outb((({
* outb((CX86_CCR2), 0x22);
* inb(0x23);
* }) | 0x88), 0x23);
* } while (0);
The new macros fix this problem, so use them instead.
--- arch/x86/kernel/cpu/cyrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/cyrix.c +1 -1
@@ -433,7 +433,7 @@ static void cyrix_identify(struct cpuinfo_x86 *c)/* enable MAPEN */ setCx86 (CX86_CCR3 , (ccr3 &0x0f ) |0x10 );/* enable cpuid */ -setCx86_old (CX86_CCR4 ,getCx86_old (CX86_CCR4 ) |0x80 ); +setCx86 (CX86_CCR4 ,getCx86 (CX86_CCR4 ) |0x80 );/* disable MAPEN */ setCx86 (CX86_CCR3 , ccr3);local_irq_restore (flags);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 78/159 MIPS: kexec: Relax memory restriction
In reply to Greg Kroah-HartmanFrom: Dengcheng Zhu <[email protected]>
[ Upstream commit a6da4d6fdf8bd512c98d3ac7f1d16bc4bb282919 ]
We can rely on the system kernel and the dump capture kernel themselves in memory usage.
Being restrictive with 512MB limit may cause kexec tool failure on some platforms.
Patchwork: https://patchwork.linux-mips.org/patch/20568/
--- arch/mips/include/asm/kexec.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/mips/include/asm/kexec.h +3 -3
@@ -12,11 +12,11 @@#include <asm/stacktrace.h> /* Maximum physical address we can use pages from */ -#define KEXEC_SOURCE_MEMORY_LIMIT (0x20000000) +#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)/* Maximum address we can reach in physical address mode */ -#define KEXEC_DESTINATION_MEMORY_LIMIT (0x20000000) +#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)/* Maximum address we can use for the control code buffer */ -#define KEXEC_CONTROL_MEMORY_LIMIT (0x20000000) +#define KEXEC_CONTROL_MEMORY_LIMIT (-1UL)/* Reserve 3*4096 bytes for board-specific info */ #define KEXEC_CONTROL_PAGE_SIZE (4096 + 3*4096)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 79/159 media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init()
In reply to Greg Kroah-HartmanFrom: Jia-Ju Bai <[email protected]>
[ Upstream commit 8d11eb847de7d89c2754988c944d51a4f63e219b ]
The driver may sleep in a interrupt handler.
The function call paths (from bottom to top) in Linux-4.16 are:
[FUNC] kzalloc(GFP_KERNEL) drivers/media/pci/ivtv/ivtv-yuv.c, 938:
kzalloc in ivtv_yuv_initdrivers/media/pci/ivtv/ivtv-yuv.c, 960:
ivtv_yuv_init in ivtv_yuv_next_freedrivers/media/pci/ivtv/ivtv-yuv.c, 1126:
ivtv_yuv_next_free in ivtv_yuv_setup_stream_framedrivers/media/pci/ivtv/ivtv-irq.c, 827:
ivtv_yuv_setup_stream_frame in ivtv_irq_dec_data_reqdrivers/media/pci/ivtv/ivtv-irq.c, 1013:
ivtv_irq_dec_data_req in ivtv_irq_handler
To fix this bug, GFP_KERNEL is replaced with GFP_ATOMIC.
This bug is found by my static analysis tool DSAC.
--- drivers/media/pci/ivtv/ivtv-yuv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/ivtv/ivtv-yuv.c +1 -1
@@ -936,7 +936,7 @@ static void ivtv_yuv_init(struct ivtv *itv) }/* We need a buffer for blanking when Y plane is offset - non-fatal if we can't get one */ - yi->blanking_ptr =kzalloc (720 *16 ,GFP_KERNEL |__GFP_NOWARN); + yi->blanking_ptr =kzalloc (720 *16 ,GFP_ATOMIC |__GFP_NOWARN);if (yi->blanking_ptr) { yi->blanking_dmaptr =pci_map_single (itv->pdev, yi->blanking_ptr,720 *16 ,PCI_DMA_TODEVICE ); }else {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 80/159 media: davinci: Fix implicit enum conversion warning
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
[ Upstream commit 4158757395b300b6eb308fc20b96d1d231484413 ]
Clang warns when one enumerated type is implicitly converted to another.
drivers/media/platform/davinci/vpbe_display.c:524:24: warning: implicit conversion from enumeration type 'enum osd_v_exp_ratio' to different enumeration type 'enum osd_h_exp_ratio' [-Wenum-conversion]
layer_info->h_exp = V_EXP_6_OVER_5;
~ ^~~~~~~~~~~~~~1 warning generated.
This appears to be a copy and paste error judging from the couple of lines directly above this statement and the way that height is handled in the if block above this one.
--- drivers/media/platform/davinci/vpbe_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/davinci/vpbe_display.c +1 -1
@@ -520,7 +520,7 @@ vpbe_disp_calculate_scale_factor(struct vpbe_display *disp_dev,else if (v_scale ==4 ) layer_info->v_zoom =ZOOM_X4 ;if (v_exp) - layer_info->h_exp =V_EXP_6_OVER_5 ; + layer_info->v_exp =V_EXP_6_OVER_5 ; }else {/* no scaling, only cropping. Set display area to crop area */ cfg->ysize = expected_ysize;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 81/159 usb: gadget: uvc: configfs: Drop leaked references to config items
In reply to Greg Kroah-HartmanFrom: Laurent Pinchart <[email protected]>
[ Upstream commit 86f3daed59bceb4fa7981d85e89f63ebbae1d561 ]
Some of the .allow_link() and .drop_link() operations implementations call config_group_find_item() and then leak the reference to the returned item. Fix this by dropping those references where needed.
--- drivers/usb/gadget/function/uvc_configfs.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/gadget/function/uvc_configfs.c +4 -0
@@ -564,6 +564,7 @@ static int uvcg_control_class_allow_link(struct config_item *src, unlock:mutex_unlock (&opts->lock); out: +config_item_put (header);mutex_unlock (su_mutex);return ret; }
@@ -605,6 +606,7 @@ static int uvcg_control_class_drop_link(struct config_item *src, unlock:mutex_unlock (&opts->lock); out: +config_item_put (header);mutex_unlock (su_mutex);return ret; }
@@ -2087,6 +2089,7 @@ static int uvcg_streaming_class_allow_link(struct config_item *src, unlock:mutex_unlock (&opts->lock); out: +config_item_put (header);mutex_unlock (su_mutex);return ret; }
@@ -2131,6 +2134,7 @@ static int uvcg_streaming_class_drop_link(struct config_item *src, unlock:mutex_unlock (&opts->lock); out: +config_item_put (header);mutex_unlock (su_mutex);return ret; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 82/159 usb: gadget: uvc: configfs: Prevent format changes after linking header
In reply to Greg Kroah-HartmanFrom: Joel Pepper <[email protected]>
[ Upstream commit cb2200f7af8341aaf0c6abd7ba37e4c667c41639 ]
While checks are in place to avoid attributes and children of a format being manipulated after the format is linked into the streaming header, the linked flag was never actually set, invalidating the protections. Update the flag as appropriate in the header link calls.
--- drivers/usb/gadget/function/uvc_configfs.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/gadget/function/uvc_configfs.c +3 -0
@@ -807,6 +807,7 @@ static int uvcg_streaming_header_allow_link(struct config_item *src, format_ptr->fmt = target_fmt;list_add_tail (&format_ptr->entry, &src_hdr->formats); ++src_hdr->num_fmt; + ++target_fmt->linked; out:mutex_unlock (&opts->lock);
@@ -845,6 +846,8 @@ static int uvcg_streaming_header_drop_link(struct config_item *src,break ; } + --target_fmt->linked; + out:mutex_unlock (&opts->lock);mutex_unlock (su_mutex);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 83/159 usb: gadget: uvc: Factor out video USB request queueing
In reply to Greg Kroah-HartmanFrom: Laurent Pinchart <[email protected]>
[ Upstream commit 9d1ff5dcb3cd3390b1e56f1c24ae42c72257c4a3 ]
USB requests for video data are queued from two different locations in the driver, with the same code block occurring twice. Factor it out to a function.
--- drivers/usb/gadget/function/uvc_video.c | 30 ++++++++++++++++--------- 1 file changed, 20 insertions(+), 10 deletions(-)
drivers/usb/gadget/function/uvc_video.c +20 -10
@@ -129,6 +129,19 @@ uvc_video_encode_isoc(struct usb_request *req, struct uvc_video *video,* Request handling */ +static int uvcg_video_ep_queue (struct uvc_video *video,struct usb_request *req) +{ +int ret; + + ret =usb_ep_queue (video->ep, req,GFP_ATOMIC ); +if (ret <0 ) { +printk (KERN_INFO "Failed to queue request (%d).\n" , ret); +usb_ep_set_halt (video->ep); + } + +return ret; +} +/* * I somehow feel that synchronisation won't be easy to achieve here. We have * three events that control USB requests submission:
@@ -193,14 +206,13 @@ uvc_video_complete(struct usb_ep *ep, struct usb_request *req) video->encode (req, video, buf); -if ((ret =usb_ep_queue (ep, req,GFP_ATOMIC )) <0 ) { -printk (KERN_INFO "Failed to queue request (%d).\n" , ret); -usb_ep_set_halt (ep); -spin_unlock_irqrestore (&video->queue.irqlock, flags); + ret =uvcg_video_ep_queue (video, req); +spin_unlock_irqrestore (&video->queue.irqlock, flags); + +if (ret <0 ) {uvcg_queue_cancel (queue,0 ); goto requeue; } -spin_unlock_irqrestore (&video->queue.irqlock, flags);return ;
@@ -320,15 +332,13 @@ int uvcg_video_pump(struct uvc_video *video) video->encode (req, video, buf);/* Queue the USB request */ - ret =usb_ep_queue (video->ep, req,GFP_ATOMIC ); + ret =uvcg_video_ep_queue (video, req); +spin_unlock_irqrestore (&queue->irqlock, flags); +if (ret <0 ) { -printk (KERN_INFO "Failed to queue request (%d)\n" , ret); -usb_ep_set_halt (video->ep); -spin_unlock_irqrestore (&queue->irqlock, flags);uvcg_queue_cancel (queue,0 );break ; } -spin_unlock_irqrestore (&queue->irqlock, flags); }spin_lock_irqsave (&video->req_lock, flags);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 84/159 usb: gadget: uvc: Only halt video streaming endpoint in bulk mode
In reply to Greg Kroah-HartmanFrom: Laurent Pinchart <[email protected]>
[ Upstream commit 8dbf9c7abefd5c1434a956d5c6b25e11183061a3 ]
When USB requests for video data fail to be submitted, the driver signals a problem to the host by halting the video streaming endpoint. This is only valid in bulk mode, as isochronous transfers have no handshake phase and can't thus report a stall. The usb_ep_set_halt() call returns an error when using isochronous endpoints, which we happily ignore, but some UDCs complain in the kernel log. Fix this by only trying to halt the endpoint in bulk mode.
--- drivers/usb/gadget/function/uvc_video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/gadget/function/uvc_video.c +3 -1
@@ -136,7 +136,9 @@ static int uvcg_video_ep_queue(struct uvc_video *video, struct usb_request *req) ret =usb_ep_queue (video->ep, req,GFP_ATOMIC );if (ret <0 ) {printk (KERN_INFO "Failed to queue request (%d).\n" , ret); -usb_ep_set_halt (video->ep); +/* Isochronous endpoints can't be halted. */ +if (usb_endpoint_xfer_bulk (video->ep->desc)) +usb_ep_set_halt (video->ep); }return ret;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 85/159 misc: kgdbts: Fix restrict error
In reply to Greg Kroah-HartmanFrom: Laura Abbott <[email protected]>
[ Upstream commit fa0218ef733e6f247a1a3986e3eb12460064ac77 ]
kgdbts current fails when compiled with restrict:
drivers/misc/kgdbts.c: In function ‘configure_kgdbts’:drivers/misc/kgdbts.c:1070:2: error: ‘strcpy’ source argument is the same as destination [-Werror=restrict]
strcpy(config, opt);
^~~~~~~~~~~~~~~~~~~
As the error says, config is being used in both the source and destination. Refactor the code to avoid the extra copy and put the parsing closer to the actual location.
--- drivers/misc/kgdbts.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
drivers/misc/kgdbts.c +6 -10
@@ -979,6 +979,12 @@ static void kgdbts_run_tests(void)int nmi_sleep =0 ;int i; + verbose =0 ; +if (strstr (config,"V1" )) + verbose =1 ; +if (strstr (config,"V2" )) + verbose =2 ; + ptr =strchr (config,'F' );if (ptr) fork_test =simple_strtol (ptr +1 ,NULL ,10 );
@@ -1062,13 +1068,6 @@ static int kgdbts_option_setup(char *opt)return -ENOSPC ; }strcpy (config, opt); - - verbose =0 ; -if (strstr (config,"V1" )) - verbose =1 ; -if (strstr (config,"V2" )) - verbose =2 ; -return 0 ; }
@@ -1080,9 +1079,6 @@ static int configure_kgdbts(void)if (!strlen (config) ||isspace (config[0 ])) goto noconfig; - err =kgdbts_option_setup (config); -if (err) - goto noconfig; final_ack =0 ;run_plant_and_detach_test (1 );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 86/159 misc: genwqe: should return proper error value.
In reply to Greg Kroah-HartmanFrom: zhong jiang <[email protected]>
[ Upstream commit 02241995b004faa7d9ff628e97f24056190853f8 ]
The function should return -EFAULT when copy_from_user fails. Even though the caller does not distinguish them. but we should keep backward compatibility.
--- drivers/misc/genwqe/card_utils.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/misc/genwqe/card_utils.c +7 -6
@@ -298,7 +298,7 @@ static int genwqe_sgl_size(int num_pages)int genwqe_alloc_sync_sgl (struct genwqe_dev *cd,struct genwqe_sgl *sgl,void __user *user_addr,size_t user_size) { -int rc; +int ret = -ENOMEM ;struct pci_dev *pci_dev = cd->pci_dev; sgl->fpage_offs =offset_in_page ((unsigned long )user_addr);
@@ -317,7 +317,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,if (get_order (sgl->sgl_size) >MAX_ORDER ) {dev_err (&pci_dev->dev,"[%s] err: too much memory requested!\n" , __func__); -return -ENOMEM ; +return ret; } sgl->sgl = __genwqe_alloc_consistent(cd, sgl->sgl_size,
@@ -325,7 +325,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,if (sgl->sgl ==NULL ) {dev_err (&pci_dev->dev,"[%s] err: no memory available!\n" , __func__); -return -ENOMEM ; +return ret; }/* Only use buffering on incomplete pages */
@@ -338,7 +338,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,/* Sync with user memory */ if (copy_from_user (sgl->fpage + sgl->fpage_offs, user_addr, sgl->fpage_size)) { - rc = -EFAULT ; + ret = -EFAULT ; goto err_out; } }
@@ -351,7 +351,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,/* Sync with user memory */ if (copy_from_user (sgl->lpage, user_addr + user_size - sgl->lpage_size, sgl->lpage_size)) { - rc = -EFAULT ; + ret = -EFAULT ; goto err_out2; } }
@@ -373,7 +373,8 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl, sgl->sgl =NULL ; sgl->sgl_dma_addr =0 ; sgl->sgl_size =0 ; -return -ENOMEM ; + +return ret; } int genwqe_setup_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 87/159 vfio/pci: Fix potential memory leak in vfio_msi_cap_len
In reply to Greg Kroah-HartmanFrom: Li Qiang <[email protected]>
[ Upstream commit 30ea32ab1951c80c6113f300fce2c70cd12659e4 ]
Free allocated vdev->msi_perm in error path.
--- drivers/vfio/pci/vfio_pci_config.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/vfio/pci/vfio_pci_config.c +3 -1
@@ -1130,8 +1130,10 @@ static int vfio_msi_cap_len(struct vfio_pci_device *vdev, u8 pos)return -ENOMEM ; ret =init_pci_cap_msi_perm (vdev->msi_perm, len, flags); -if (ret) +if (ret) { +kfree (vdev->msi_perm);return ret; + }return len; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 88/159 scsi: libsas: always unregister the old device if going to discover new
In reply to Greg Kroah-HartmanFrom: Jason Yan <[email protected]>
[ Upstream commit 32c850bf587f993b2620b91e5af8a64a7813f504 ]
If we went into sas_rediscover_dev() the attached_sas_addr was already insured not to be zero. So it's unnecessary to check if the attached_sas_addr is zero.
And although if the sas address is not changed, we always have to unregister the old device when we are going to register a new one. We cannot just leave the device there and bring up the new.
--- drivers/scsi/libsas/sas_expander.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
drivers/scsi/libsas/sas_expander.c +5 -8
@@ -2049,14 +2049,11 @@ static int sas_rediscover_dev(struct domain_device *dev, int phy_id, bool last)return res; } -/* delete the old link */ -if (SAS_ADDR (phy->attached_sas_addr) && -SAS_ADDR (sas_addr) !=SAS_ADDR (phy->attached_sas_addr)) { -SAS_DPRINTK ("ex %016llx phy 0x%x replace %016llx\n" , -SAS_ADDR (dev->sas_addr), phy_id, -SAS_ADDR (phy->attached_sas_addr)); -sas_unregister_devs_sas_addr (dev, phy_id, last); - } +/* we always have to delete the old device when we went here */ +SAS_DPRINTK ("ex %016llx phy 0x%x replace %016llx\n" , +SAS_ADDR (dev->sas_addr), phy_id, +SAS_ADDR (phy->attached_sas_addr)); +sas_unregister_devs_sas_addr (dev, phy_id, last);return sas_discover_new (dev, phy_id); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 89/159 ARM: dts: tegra30: fix xcvr-setup-use-fuses
In reply to Greg Kroah-HartmanFrom: Marcel Ziswiler <[email protected]>
[ Upstream commit 564706f65cda3de52b09e51feb423a43940fe661 ]
There was a dot instead of a comma. Fix this.
--- arch/arm/boot/dts/tegra30.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/tegra30.dtsi +3 -3
@@ -823,7 +823,7 @@ nvidia,elastic-limit = <16>; nvidia,term-range-adj = <6>; nvidia,xcvr-setup = <51>; - nvidia.xcvr-setup-use-fuses; + nvidia,xcvr-setup-use-fuses; nvidia,xcvr-lsfslew = <1>; nvidia,xcvr-lsrslew = <1>; nvidia,xcvr-hsslew = <32>;
@@ -860,7 +860,7 @@ nvidia,elastic-limit = <16>; nvidia,term-range-adj = <6>; nvidia,xcvr-setup = <51>; - nvidia.xcvr-setup-use-fuses; + nvidia,xcvr-setup-use-fuses; nvidia,xcvr-lsfslew = <2>; nvidia,xcvr-lsrslew = <2>; nvidia,xcvr-hsslew = <32>;
@@ -896,7 +896,7 @@ nvidia,elastic-limit = <16>; nvidia,term-range-adj = <6>; nvidia,xcvr-setup = <51>; - nvidia.xcvr-setup-use-fuses; + nvidia,xcvr-setup-use-fuses; nvidia,xcvr-lsfslew = <2>; nvidia,xcvr-lsrslew = <2>; nvidia,xcvr-hsslew = <32>;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 90/159 ARM: tegra: apalis_t30: fix mmc1 cmd pull-up
In reply to Greg Kroah-HartmanFrom: Marcel Ziswiler <[email protected]>
[ Upstream commit 1c997fe4becdc6fcbc06e23982ceb65621e6572a ]
Fix MMC1 cmd pin pull-up causing issues on carrier boards without external pull-up.
--- arch/arm/boot/dts/tegra30-apalis.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/tegra30-apalis.dtsi +3 -3
@@ -147,14 +147,14 @@ /* Apalis MMC1 */ sdmmc3_clk_pa6 { - nvidia,pins = "sdmmc3_clk_pa6", - "sdmmc3_cmd_pa7"; + nvidia,pins = "sdmmc3_clk_pa6"; nvidia,function = "sdmmc3"; nvidia,pull = <TEGRA_PIN_PULL_NONE>; nvidia,tristate = <TEGRA_PIN_DISABLE>; }; sdmmc3_dat0_pb7 { - nvidia,pins = "sdmmc3_dat0_pb7", + nvidia,pins = "sdmmc3_cmd_pa7", + "sdmmc3_dat0_pb7", "sdmmc3_dat1_pb6", "sdmmc3_dat2_pb5", "sdmmc3_dat3_pb4",
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 91/159 net: smsc: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 6323d57f335ce1490d025cacc83fc10b07792130 ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/smsc/smc911x.c | 3 ++- drivers/net/ethernet/smsc/smc91x.c | 3 ++- drivers/net/ethernet/smsc/smsc911x.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-)
drivers/net/ethernet/smsc/smc911x.c +2 -1
@@ -511,7 +511,8 @@ static void smc911x_hardware_send_pkt(struct net_device *dev)* now, or set the card to generates an interrupt when ready * for the packet. */ -static int smc911x_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +smc911x_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct smc911x_local *lp =netdev_priv (dev);unsigned int free;
drivers/net/ethernet/smsc/smc91x.c +2 -1
@@ -637,7 +637,8 @@ done: if (!THROTTLE_TX_PKTS)* now, or set the card to generates an interrupt when ready * for the packet. */ -static int smc_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +smc_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct smc_local *lp =netdev_priv (dev);void __iomem *ioaddr = lp->base;
drivers/net/ethernet/smsc/smsc911x.c +2 -1
@@ -1677,7 +1677,8 @@ static int smsc911x_stop(struct net_device *dev) }/* Entry point for transmitting a packet */ -static int smsc911x_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +smsc911x_hard_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct smsc911x_data *pdata =netdev_priv (dev);unsigned int freespace;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 92/159 EDAC: Raise the maximum number of memory controllers
In reply to Greg Kroah-HartmanFrom: Justin Ernst <[email protected]>
[ Upstream commit 6b58859419554fb824e09cfdd73151a195473cbc ]
We observe an oops in the skx_edac module during boot:
EDAC MC0: Giving out device to module skx_edac controller Skylake Socket#0 IMC#0 EDAC MC1: Giving out device to module skx_edac controller Skylake Socket#0 IMC#1 EDAC MC2: Giving out device to module skx_edac controller Skylake Socket#1 IMC#0
...
EDAC MC13: Giving out device to module skx_edac controller Skylake Socket#0 IMC#1 EDAC MC14: Giving out device to module skx_edac controller Skylake Socket#1 IMC#0 EDAC MC15: Giving out device to module skx_edac controller Skylake Socket#1 IMC#1 Too many memory controllers: 16
EDAC MC: Removed device 0 for skx_edac Skylake Socket#0 IMC#0
We observe there are two memory controllers per socket, with a limit of 16. Raise the maximum number of memory controllers from 16 to 2 * MAX_NUMNODES (1024).
[ bp: This is just a band-aid fix until we've sorted out the whole issue
with the bus_type association and handling in EDAC and can get rid of this arbitrary limit. ]
--- include/linux/edac.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/edac.h +2 -1
@@ -17,6 +17,7 @@#include <linux/completion.h> #include <linux/workqueue.h> #include <linux/debugfs.h> +#include <linux/numa.h> struct device ;
@@ -778,6 +779,6 @@ struct mem_ctl_info {/* * Maximum number of memory controllers in the coherent fabric. */ -#define EDAC_MAX_MCS 16 +#define EDAC_MAX_MCS 2 * MAX_NUMNODES#endif
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 93/159 Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS
In reply to Greg Kroah-HartmanFrom: Luiz Augusto von Dentz <[email protected]>
[ Upstream commit a5c3021bb62b970713550db3f7fd08aa70665d7e ]
If the remote is not able to fully utilize the MPS choosen recalculate the credits based on the actual amount it is sending that way it can still send packets of MTU size without credits dropping to 0.
--- net/bluetooth/l2cap_core.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
net/bluetooth/l2cap_core.c +10 -0
@@ -6795,6 +6795,16 @@ static int l2cap_le_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb) chan->sdu_len = sdu_len; chan->sdu_last_frag = skb; +/* Detect if remote is not able to use the selected MPS */ +if (skb->len +L2CAP_SDULEN_SIZE < chan->mps) { +u16 mps_len = skb->len +L2CAP_SDULEN_SIZE ; + +/* Adjust the number of credits */ +BT_DBG ("chan->mps %u -> %u" , chan->mps, mps_len); + chan->mps = mps_len; +l2cap_chan_le_send_credits (chan); + } +return 0 ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 94/159 arm64: dts: amd: Fix SPI bus warnings
In reply to Greg Kroah-HartmanFrom: Rob Herring <[email protected]>
[ Upstream commit e9f0878c4b2004ac19581274c1ae4c61ae3ca70e ]
dtc has new checks for SPI buses. Fix the warnings in node names.
arch/arm64/boot/dts/amd/amd-overdrive.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi' arch/arm64/boot/dts/amd/amd-overdrive-rev-b0.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi' arch/arm64/boot/dts/amd/amd-overdrive-rev-b1.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi'
--- arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi +2 -2
@@ -84,7 +84,7 @@ clock-names = "uartclk", "apb_pclk"; }; - spi0: ssp@e1020000 { + spi0: spi@e1020000 { status = "disabled"; compatible = "arm,pl022", "arm,primecell"; #gpio-cells = <2>;
@@ -95,7 +95,7 @@ clock-names = "apb_pclk"; }; - spi1: ssp@e1030000 { + spi1: spi@e1030000 { status = "disabled"; compatible = "arm,pl022", "arm,primecell"; #gpio-cells = <2>;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 95/159 fuse: use READ_ONCE on congestion_threshold and max_background
In reply to Greg Kroah-HartmanFrom: Kirill Tkhai <[email protected]>
[ Upstream commit 2a23f2b8adbe4bd584f936f7ac17a99750eed9d7 ]
Since they are of unsigned int type, it's allowed to read them unlocked during reporting to userspace. Let's underline this fact with READ_ONCE() macroses.
--- fs/fuse/control.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/fuse/control.c +2 -2
@@ -107,7 +107,7 @@ static ssize_t fuse_conn_max_background_read(struct file *file,if (!fc)return 0 ; - val = fc->max_background; + val =READ_ONCE (fc->max_background);fuse_conn_put (fc);return fuse_conn_limit_read (file, buf, len, ppos, val);
@@ -144,7 +144,7 @@ static ssize_t fuse_conn_congestion_threshold_read(struct file *file,if (!fc)return 0 ; - val = fc->congestion_threshold; + val =READ_ONCE (fc->congestion_threshold);fuse_conn_put (fc);return fuse_conn_limit_read (file, buf, len, ppos, val);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 96/159 Bluetooth: hci_ldisc: Fix null pointer derefence in case of early data
In reply to Greg Kroah-HartmanFrom: Loic Poulain <[email protected]>
commit 84cb3df02aea4b00405521e67c4c67c2d525c364 upstream.
HCI_UART_PROTO_SET flag is set before hci_uart_set_proto call. If we receive data from tty layer during this procedure, proto pointer may not be assigned yet, leading to null pointer dereference in rx method hci_uart_tty_receive.
This patch fixes this issue by introducing HCI_UART_PROTO_READY flag in order to avoid any proto operation before proto opening and assignment.
--- drivers/bluetooth/hci_ldisc.c | 11 +++++++---- drivers/bluetooth/hci_uart.h | 1 + 2 files changed, 8 insertions(+), 4 deletions(-)
drivers/bluetooth/hci_ldisc.c +7 -4
@@ -227,7 +227,7 @@ static int hci_uart_flush(struct hci_devtty_ldisc_flush (tty);tty_driver_flush_buffer (tty); -if (test_bit (HCI_UART_PROTO_SET , &hu->flags)) +if (test_bit (HCI_UART_PROTO_READY , &hu->flags)) hu->proto->flush (hu);return 0 ;
@@ -506,7 +506,7 @@ static void hci_uart_tty_close(struct ttcancel_work_sync (&hu->write_work); -if (test_and_clear_bit (HCI_UART_PROTO_SET , &hu->flags)) { +if (test_and_clear_bit (HCI_UART_PROTO_READY , &hu->flags)) {if (hdev) {if (test_bit (HCI_UART_REGISTERED , &hu->flags))hci_unregister_dev (hdev);
@@ -514,6 +514,7 @@ static void hci_uart_tty_close(struct tt } hu->proto->close (hu); } +clear_bit (HCI_UART_PROTO_SET , &hu->flags);kfree (hu); }
@@ -540,7 +541,7 @@ static void hci_uart_tty_wakeup(struct tif (tty != hu->tty)return ; -if (test_bit (HCI_UART_PROTO_SET , &hu->flags)) +if (test_bit (HCI_UART_PROTO_READY , &hu->flags))hci_uart_tx_wakeup (hu); }
@@ -564,7 +565,7 @@ static void hci_uart_tty_receive(structif (!hu || tty != hu->tty)return ; -if (!test_bit (HCI_UART_PROTO_SET , &hu->flags)) +if (!test_bit (HCI_UART_PROTO_READY , &hu->flags))return ;/* It does not need a lock here as it is already protected by a mutex in
@@ -652,9 +653,11 @@ static int hci_uart_set_proto(struct hcireturn err; hu->proto = p; +set_bit (HCI_UART_PROTO_READY , &hu->flags); err =hci_uart_register_dev (hu);if (err) { +clear_bit (HCI_UART_PROTO_READY , &hu->flags); p->close (hu);return err; }
drivers/bluetooth/hci_uart.h +1 -0
@@ -94,6 +94,7 @@ struct hci_uart {/* HCI_UART proto flag bits */ #define HCI_UART_PROTO_SET 0#define HCI_UART_REGISTERED 1 +#define HCI_UART_PROTO_READY 2/* TX states */ #define HCI_UART_SENDING 1
Greg Kroah-Hartman
maintainerPATCH 97/159 Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto()
In reply to Greg Kroah-HartmanFrom: Kefeng Wang <[email protected]>
commit 56897b217a1d0a91c9920cb418d6b3fe922f590a upstream.
task A: task B: hci_uart_set_proto flush_to_ldisc - p->open(hu) -> h5_open //alloc h5 - receive_buf
- set_bit HCI_UART_PROTO_READY - tty_port_default_receive_buf
- hci_uart_register_dev - tty_ldisc_receive_buf
- hci_uart_tty_receive
- test_bit HCI_UART_PROTO_READY
- h5_recv
- clear_bit HCI_UART_PROTO_READY while() {
- p->open(hu) -> h5_close //free h5
- h5_rx_3wire_hdr
- h5_reset() //use-after-free
}
It could use ioctl to set hci uart proto, but there is a use-after-free issue when hci_uart_register_dev() fail in hci_uart_set_proto(), see stack above, fix this by setting HCI_UART_PROTO_READY bit only when hci_uart_register_dev() return success.
--- drivers/bluetooth/hci_ldisc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/bluetooth/hci_ldisc.c +1 -2
@@ -653,15 +653,14 @@ static int hci_uart_set_proto(struct hcireturn err; hu->proto = p; -set_bit (HCI_UART_PROTO_READY , &hu->flags); err =hci_uart_register_dev (hu);if (err) { -clear_bit (HCI_UART_PROTO_READY , &hu->flags); p->close (hu);return err; } +set_bit (HCI_UART_PROTO_READY , &hu->flags);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 98/159 memfd: Use radix_tree_deref_slot_protected to avoid the warning.
In reply to Greg Kroah-HartmanFrom: zhong jiang <[email protected]>
The commit eb4058d8daf8 ("memfd: Fix locking when tagging pins") introduces the following warning messages.
*WARNING: suspicious RCU usage in memfd_wait_for_pins*
It is because we still use radix_tree_deref_slot without read_rcu_lock. We should use radix_tree_deref_slot_protected instead in the case.
--- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/shmem.c +1 -1
@@ -1862,7 +1862,7 @@ static void shmem_tag_pins(struct addresspin_lock_irq (&mapping->tree_lock); restart:radix_tree_for_each_slot (slot, &mapping->page_tree, &iter, start) { - page =radix_tree_deref_slot (slot); + page =radix_tree_deref_slot_protected (slot, &mapping->tree_lock);if (!page ||radix_tree_exception (page)) {if (radix_tree_deref_retry (page)) goto restart;
Greg Kroah-Hartman
maintainerPATCH 99/159 slcan: Fix memory leak in error path
In reply to Greg Kroah-HartmanFrom: Jouni Hogander <[email protected]>
commit ed50e1600b4483c049ce76e6bd3b665a6a9300ed upstream.
This patch is fixing memory leak reported by Syzkaller:
BUG: memory leak unreferenced object 0xffff888067f65500 (size 4096):
comm "syz-executor043", pid 454, jiffies 4294759719 (age 11.930s)
hex dump (first 32 bytes):
73 6c 63 61 6e 30 00 00 00 00 00 00 00 00 00 00 slcan0..........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<00000000a06eec0d>] __kmalloc+0x18b/0x2c0
[<0000000083306e66>] kvmalloc_node+0x3a/0xc0
[<000000006ac27f87>] alloc_netdev_mqs+0x17a/0x1080
[<0000000061a996c9>] slcan_open+0x3ae/0x9a0
[<000000001226f0f9>] tty_ldisc_open.isra.1+0x76/0xc0
[<0000000019289631>] tty_set_ldisc+0x28c/0x5f0
[<000000004de5a617>] tty_ioctl+0x48d/0x1590
[<00000000daef496f>] do_vfs_ioctl+0x1c7/0x1510
[<0000000059068dbc>] ksys_ioctl+0x99/0xb0
[<000000009a6eb334>] __x64_sys_ioctl+0x78/0xb0
[<0000000053d0332e>] do_syscall_64+0x16f/0x580
[<0000000021b83b99>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[<000000008ea75434>] 0xffffffffffffffff--- drivers/net/can/slcan.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/can/slcan.c +1 -0
@@ -613,6 +613,7 @@ err_free_chan: sl->tty =NULL ; tty->disc_data =NULL ;clear_bit (SLF_INUSE , &sl->flags); +free_netdev (sl->dev); err_exit:rtnl_unlock ();
Greg Kroah-Hartman
maintainerPATCH 100/159 net: cdc_ncm: Signedness bug in cdc_ncm_set_dgram_size()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit a56dcc6b455830776899ce3686735f1172e12243 upstream.
This code is supposed to test for negative error codes and partial reads, but because sizeof() is size_t (unsigned) type then negative error codes are type promoted to high positive values and the condition doesn't work as expected.
--- drivers/net/usb/cdc_ncm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/cdc_ncm.c +1 -1
@@ -534,7 +534,7 @@ static void cdc_ncm_set_dgram_size(struc err =usbnet_read_cmd (dev,USB_CDC_GET_MAX_DATAGRAM_SIZE ,USB_TYPE_CLASS |USB_DIR_IN |USB_RECIP_INTERFACE ,0 , iface_no, &max_datagram_size,sizeof (max_datagram_size)); -if (err <sizeof (max_datagram_size)) { +if (err !=sizeof (max_datagram_size)) {dev_dbg (&dev->intf->dev,"GET_MAX_DATAGRAM_SIZE failed\n" ); goto out; }
Greg Kroah-Hartman
maintainerPATCH 101/159 x86/atomic: Fix smp_mb__{before,after}_atomic()
In reply to Greg Kroah-HartmanFrom: Peter Zijlstra <[email protected]>
commit 69d927bba39517d0980462efc051875b7f4db185 upstream.
Recent probing at the Linux Kernel Memory Model uncovered a 'surprise'. Strongly ordered architectures where the atomic RmW primitive implies full memory ordering and smp_mb__{before,after}_atomic() are a simple barrier() (such as x86) fail for:
*x = 1; atomic_inc(u); smp_mb__after_atomic(); r0 = *y;
Because, while the atomic_inc() implies memory order, it (surprisingly) does not provide a compiler barrier. This then allows the compiler to re-order like so:
atomic_inc(u); *x = 1; smp_mb__after_atomic(); r0 = *y;
Which the CPU is then allowed to re-order (under TSO rules) like:
atomic_inc(u); r0 = *y; *x = 1;
And this very much was not intended. Therefore strengthen the atomic RmW ops to include a compiler barrier.
NOTE: atomic_{or,and,xor} and the bitops already had the compiler barrier.
--- arch/x86/include/asm/atomic.h | 8 ++++---- arch/x86/include/asm/atomic64_64.h | 8 ++++---- arch/x86/include/asm/barrier.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-)
arch/x86/include/asm/atomic.h +4 -4
@@ -49,7 +49,7 @@ static __always_inline void atomic_add(i { asmvolatile (LOCK_PREFIX "addl %1,%0" :"+m" (v->counter) - :"ir" (i)); + :"ir" (i) :"memory" ); }/**
@@ -63,7 +63,7 @@ static __always_inline void atomic_sub(i { asmvolatile (LOCK_PREFIX "subl %1,%0" :"+m" (v->counter) - :"ir" (i)); + :"ir" (i) :"memory" ); }/**
@@ -89,7 +89,7 @@ static __always_inline int atomic_sub_an static __always_inline void atomic_inc(atomic_t *v) { asmvolatile (LOCK_PREFIX "incl %0" - :"+m" (v->counter)); + :"+m" (v->counter) ::"memory" ); }/**
@@ -101,7 +101,7 @@ static __always_inline void atomic_inc(a static __always_inline void atomic_dec(atomic_t *v) { asmvolatile (LOCK_PREFIX "decl %0" - :"+m" (v->counter)); + :"+m" (v->counter) ::"memory" ); }/**
arch/x86/include/asm/atomic64_64.h +4 -4
@@ -44,7 +44,7 @@ static __always_inline void atomic64_add { asmvolatile (LOCK_PREFIX "addq %1,%0" :"=m" (v->counter) - :"er" (i),"m" (v->counter)); + :"er" (i),"m" (v->counter) :"memory" ); }/**
@@ -58,7 +58,7 @@ static inline void atomic64_sub(long i, { asmvolatile (LOCK_PREFIX "subq %1,%0" :"=m" (v->counter) - :"er" (i),"m" (v->counter)); + :"er" (i),"m" (v->counter) :"memory" ); }/**
@@ -85,7 +85,7 @@ static __always_inline void atomic64_inc { asmvolatile (LOCK_PREFIX "incq %0" :"=m" (v->counter) - :"m" (v->counter)); + :"m" (v->counter) :"memory" ); }/**
@@ -98,7 +98,7 @@ static __always_inline void atomic64_dec { asmvolatile (LOCK_PREFIX "decq %0" :"=m" (v->counter) - :"m" (v->counter)); + :"m" (v->counter) :"memory" ); }/**
arch/x86/include/asm/barrier.h +2 -2
@@ -116,7 +116,7 @@ do { \#endif /* Atomic operations are already serializing on x86 */ -#define smp_mb__before_atomic () barrier() -#define smp_mb__after_atomic () barrier() +#define smp_mb__before_atomic () do { } while (0) +#define smp_mb__after_atomic () do { } while (0)#endif /* _ASM_X86_BARRIER_H */
Greg Kroah-Hartman
maintainerPATCH 102/159 apparmor: fix uninitialized lsm_audit member
In reply to Greg Kroah-HartmanFrom: John Johansen <[email protected]>
commit b6b1b81b3afba922505b57f4c812bba022f7c4a9 upstream.
The task field in the lsm_audit struct needs to be initialized if a change_hat fails, otherwise the following oops will occur
BUG: unable to handle kernel paging request at 0000002fbead7d08 IP: [<ffffffff8171153e>] _raw_spin_lock+0xe/0x50 PGD 1e3f35067 PUD 0 Oops: 0002 [#1] SMP Modules linked in: pppox crc_ccitt p8023 p8022 psnap llc ax25 btrfs raid6_pq xor xfs libcrc32c dm_multipath scsi_dh kvm_amd dcdbas kvm microcode amd64_edac_mod joydev edac_core psmouse edac_mce_amd serio_raw k10temp sp5100_tco i2c_piix4 ipmi_si ipmi_msghandler acpi_power_meter mac_hid lp parport hid_generic usbhid hid pata_acpi mpt2sas ahci raid_class pata_atiixp bnx2 libahci scsi_transport_sas [last unloaded: tipc] CPU: 2 PID: 699 Comm: changehat_twice Tainted: GF O 3.13.0-7-generic #25-Ubuntu Hardware name: Dell Inc. PowerEdge R415/08WNM9, BIOS 1.8.6 12/06/2011 task: ffff8802135c6000 ti: ffff880212986000 task.ti: ffff880212986000 RIP: 0010:[<ffffffff8171153e>] [<ffffffff8171153e>] _raw_spin_lock+0xe/0x50 RSP: 0018:ffff880212987b68 EFLAGS: 00010006 RAX: 0000000000020000 RBX: 0000002fbead7500 RCX: 0000000000000000 RDX: 0000000000000292 RSI: ffff880212987ba8 RDI: 0000002fbead7d08 RBP: ffff880212987b68 R08: 0000000000000246 R09: ffff880216e572a0 R10: ffffffff815fd677 R11: ffffea0008469580 R12: ffffffff8130966f R13: ffff880212987ba8 R14: 0000002fbead7d08 R15: ffff8800d8c6b830 FS: 00002b5e6c84e7c0(0000) GS:ffff880216e40000(0000) knlGS:0000000055731700 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000002fbead7d08 CR3: 000000021270f000 CR4: 00000000000006e0 Stack: ffff880212987b98 ffffffff81075f17 ffffffff8130966f 0000000000000009 0000000000000000 0000000000000000 ffff880212987bd0 ffffffff81075f7c 0000000000000292 ffff880212987c08 ffff8800d8c6b800 0000000000000026 Call Trace: [<ffffffff81075f17>] __lock_task_sighand+0x47/0x80 [<ffffffff8130966f>] ? apparmor_cred_prepare+0x2f/0x50 [<ffffffff81075f7c>] do_send_sig_info+0x2c/0x80 [<ffffffff81075fee>] send_sig_info+0x1e/0x30 [<ffffffff8130242d>] aa_audit+0x13d/0x190 [<ffffffff8130c1dc>] aa_audit_file+0xbc/0x130 [<ffffffff8130966f>] ? apparmor_cred_prepare+0x2f/0x50 [<ffffffff81304cc2>] aa_change_hat+0x202/0x530 [<ffffffff81308fc6>] aa_setprocattr_changehat+0x116/0x1d0 [<ffffffff8130a11d>] apparmor_setprocattr+0x25d/0x300 [<ffffffff812cee56>] security_setprocattr+0x16/0x20 [<ffffffff8121fc87>] proc_pid_attr_write+0x107/0x130 [<ffffffff811b7604>] vfs_write+0xb4/0x1f0 [<ffffffff811b8039>] SyS_write+0x49/0xa0 [<ffffffff8171a1bf>] tracesys+0xe1/0xe6
--- security/apparmor/audit.c | 3 ++- security/apparmor/file.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
security/apparmor/audit.c +2 -1
@@ -200,7 +200,8 @@ int aa_audit(int type, struct aa_profileif (sa->aad->type ==AUDIT_APPARMOR_KILL ) (void )send_sig_info (SIGKILL ,NULL , - sa->u.tsk ? sa->u.tsk : current); + sa->type ==LSM_AUDIT_DATA_TASK && sa->u.tsk ? + sa->u.tsk : current);if (sa->aad->type ==AUDIT_APPARMOR_ALLOWED )return complain_error (sa->aad->error);
security/apparmor/file.c +2 -1
@@ -110,7 +110,8 @@ int aa_audit_file(struct aa_profile *proint type =AUDIT_APPARMOR_AUTO ;struct common_audit_data sa;struct apparmor_audit_data aad = {0 ,}; - sa.type =LSM_AUDIT_DATA_NONE ; + sa.type =LSM_AUDIT_DATA_TASK ; + sa.u.tsk =NULL ; sa.aad = &aad; aad.op = op, aad.fs.request = request;
Greg Kroah-Hartman
maintainerPATCH 103/159 apparmor: fix update the mtime of the profile file on replacement
In reply to Greg Kroah-HartmanFrom: John Johansen <[email protected]>
commit d671e890205a663429da74e1972e652bea4d73ab upstream.
--- security/apparmor/apparmorfs.c | 2 ++ 1 file changed, 2 insertions(+)
security/apparmor/apparmorfs.c +2 -0
@@ -380,6 +380,8 @@ void __aa_fs_profile_migrate_dents(strucfor (i =0 ; i <AAFS_PROF_SIZEOF ; i++) { new->dents[i] = old->dents[i]; +if (new->dents[i]) + new->dents[i]->d_inode->i_mtime =CURRENT_TIME ; old->dents[i] =NULL ; } }
Greg Kroah-Hartman
maintainerPATCH 104/159 apparmor: fix module parameters can be changed after policy is locked
In reply to Greg Kroah-HartmanFrom: John Johansen <[email protected]>
commit 58acf9d911c8831156634a44d0b022d683e1e50c upstream.
the policy_lock parameter is a one way switch that prevents policy from being further modified. Unfortunately some of the module parameters can effectively modify policy by turning off enforcement.
split policy_admin_capable into a view check and a full admin check, and update the admin check to test the policy_lock parameter.
--- security/apparmor/include/policy.h | 2 ++ security/apparmor/lsm.c | 22 ++++++++++------------ security/apparmor/policy.c | 18 +++++++++++++++++- 3 files changed, 29 insertions(+), 13 deletions(-)
security/apparmor/include/policy.h +2 -0
@@ -403,6 +403,8 @@ static inline int AUDIT_MODE(struct aa_p return profile->audit; } +bool policy_view_capable (void ); +bool policy_admin_capable (void );bool aa_may_manage_policy (int op);#endif /* __AA_POLICY_H */
security/apparmor/lsm.c +10 -12
@@ -749,51 +749,49 @@ __setup("apparmor=", apparmor_enabled_se/* set global flag turning off the ability to load policy */ static int param_set_aalockpolicy (const char *val,const struct kernel_param *kp) { -if (!capable (CAP_MAC_ADMIN )) +if (!policy_admin_capable ())return -EPERM ; -if (aa_g_lock_policy) -return -EACCES ;return param_set_bool (val, kp); }static int param_get_aalockpolicy (char *buffer,const struct kernel_param *kp) { -if (!capable (CAP_MAC_ADMIN )) +if (!policy_view_capable ())return -EPERM ;return param_get_bool (buffer, kp); }static int param_set_aabool (const char *val,const struct kernel_param *kp) { -if (!capable (CAP_MAC_ADMIN )) +if (!policy_admin_capable ())return -EPERM ;return param_set_bool (val, kp); }static int param_get_aabool (char *buffer,const struct kernel_param *kp) { -if (!capable (CAP_MAC_ADMIN )) +if (!policy_view_capable ())return -EPERM ;return param_get_bool (buffer, kp); }static int param_set_aauint (const char *val,const struct kernel_param *kp) { -if (!capable (CAP_MAC_ADMIN )) +if (!policy_admin_capable ())return -EPERM ;return param_set_uint (val, kp); }static int param_get_aauint (char *buffer,const struct kernel_param *kp) { -if (!capable (CAP_MAC_ADMIN )) +if (!policy_view_capable ())return -EPERM ;return param_get_uint (buffer, kp); }static int param_get_audit (char *buffer,struct kernel_param *kp) { -if (!capable (CAP_MAC_ADMIN )) +if (!policy_view_capable ())return -EPERM ;if (!apparmor_enabled)
@@ -805,7 +803,7 @@ static int param_get_audit(char *buffer,static int param_set_audit (const char *val,struct kernel_param *kp) {int i; -if (!capable (CAP_MAC_ADMIN )) +if (!policy_admin_capable ())return -EPERM ;if (!apparmor_enabled)
@@ -826,7 +824,7 @@ static int param_set_audit(const char *vstatic int param_get_mode (char *buffer,struct kernel_param *kp) { -if (!capable (CAP_MAC_ADMIN )) +if (!policy_admin_capable ())return -EPERM ;if (!apparmor_enabled)
@@ -838,7 +836,7 @@ static int param_get_mode(char *buffer,static int param_set_mode (const char *val,struct kernel_param *kp) {int i; -if (!capable (CAP_MAC_ADMIN )) +if (!policy_admin_capable ())return -EPERM ;if (!apparmor_enabled)
security/apparmor/policy.c +17 -1
@@ -916,6 +916,22 @@ static int audit_policy(int op, gfp_t gf &sa, NULL); } +bool policy_view_capable (void ) +{ +struct user_namespace *user_ns =current_user_ns (); +bool response = false; + +if (ns_capable (user_ns,CAP_MAC_ADMIN )) + response = true; + +return response; +} + +bool policy_admin_capable (void ) +{ +return policy_view_capable () && !aa_g_lock_policy; +} +/** * aa_may_manage_policy - can the current task manage policy * @op: the policy manipulation operation being done
@@ -930,7 +946,7 @@ bool aa_may_manage_policy(int op)return 0 ; } -if (!capable (CAP_MAC_ADMIN )) { +if (!policy_admin_capable ()) {audit_policy (op,GFP_KERNEL ,NULL ,"not policy admin" , -EACCES );return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 105/159 kprobes/x86: Prohibit probing on exception masking instructions
In reply to Greg Kroah-HartmanFrom: Masami Hiramatsu <[email protected]>
commit ee6a7354a3629f9b65bc18dbe393503e9440d6f5 upstream.
Since MOV SS and POP SS instructions will delay the exceptions until the next instruction is executed, single-stepping on it by kprobes must be prohibited.
However, kprobes usually executes those instructions directly on trampoline buffer (a.k.a. kprobe-booster), except for the kprobes which has post_handler. Thus if kprobe user probes MOV SS with post_handler, it will do single-stepping on the MOV SS.
This means it is safe that if it is used via ftrace or perf/bpf since those don't use the post_handler.
Anyway, since the stack switching is a rare case, it is safer just rejecting kprobes on such instructions.
--- arch/x86/include/asm/insn.h | 18 ++++++++++++++++++ arch/x86/kernel/kprobes/core.c | 4 ++++ 2 files changed, 22 insertions(+)
arch/x86/include/asm/insn.h +18 -0
@@ -198,4 +198,22 @@ static inline int insn_offset_immediate( return insn_offset_displacement(insn) + insn->displacement.nbytes; } +#define POP_SS_OPCODE 0x1f +#define MOV_SREG_OPCODE 0x8e + +/* +* Intel SDM Vol.3A 6.8.3 states; +* "Any single-step trap that would be delivered following the MOV to SS +* instruction or POP to SS instruction (because EFLAGS.TF is 1) is +* suppressed." +* This function returns true if @insn is MOV SS or POP SS. On these +* instructions, single stepping is suppressed. +*/ +static inline int insn_masking_exception (struct insn *insn) +{ +return insn->opcode.bytes[0 ] ==POP_SS_OPCODE || + (insn->opcode.bytes[0 ] ==MOV_SREG_OPCODE && +X86_MODRM_REG (insn->modrm.bytes[0 ]) ==2 ); +} +#endif /* _ASM_X86_INSN_H */
arch/x86/kernel/kprobes/core.c +4 -0
@@ -372,6 +372,10 @@ int __copy_instruction(u8 *dest, u8 *srcreturn 0 ;memcpy (dest, insn.kaddr, length); +/* We should not singlestep on the exception masking instructions */ +if (insn_masking_exception (&insn)) +return 0 ; +#ifdef CONFIG_X86_64 if (insn_rip_relative (&insn)) {s64 newdisp;
Greg Kroah-Hartman
maintainerPATCH 106/159 uprobes/x86: Prohibit probing on MOV SS instruction
In reply to Greg Kroah-HartmanFrom: Masami Hiramatsu <[email protected]>
commit 13ebe18c94f5b0665c01ae7fad2717ae959f4212 upstream.
Since MOV SS and POP SS instructions will delay the exceptions until the next instruction is executed, single-stepping on it by uprobes must be prohibited.
uprobe already rejects probing on POP SS (0x1f), but allows probing on MOV SS (0x8e and reg == 2). This checks the target instruction and if it is MOV SS or POP SS, returns -ENOTSUPP to reject probing.
--- arch/x86/kernel/uprobes.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/x86/kernel/uprobes.c +4 -0
@@ -296,6 +296,10 @@ static int uprobe_init_insn(struct arch_if (is_prefix_bad (insn))return -ENOTSUPP ; +/* We should not singlestep on the exception masking instructions */ +if (insn_masking_exception (insn)) +return -ENOTSUPP ; +if (x86_64) good_insns = good_insns_64;else
Greg Kroah-Hartman
maintainerPATCH 107/159 fbdev: Remove unused SH-Mobile HDMI driver
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
commit 34280340b1dc74c521e636f45cd728f9abf56ee2 upstream.
As of commit 44d88c754e57a6d9 ("ARM: shmobile: Remove legacy SoC code for R-Mobile A1"), the SH-Mobile HDMI driver is no longer used. In theory it could still be used on R-Mobile A1 SoCs, but that requires adding DT support to the driver, which is not planned.
Remove the driver, it can be resurrected from git history when needed.
--- drivers/video/fbdev/Kconfig | 10 drivers/video/fbdev/Makefile | 1 drivers/video/fbdev/sh_mobile_hdmi.c | 1489 ----------------------------------- include/video/sh_mobile_hdmi.h | 49 - 4 files changed, 1549 deletions(-)
drivers/video/fbdev/Kconfig +0 -10
@@ -1991,16 +1991,6 @@ config FB_SH_MOBILE_LCDC ---help--- Frame buffer driver for the on-chip SH-Mobile LCD controller. -config FB_SH_MOBILE_HDMI - tristate "SuperH Mobile HDMI controller support" - depends on FB_SH_MOBILE_LCDC - select FB_MODE_HELPERS - select SOUND - select SND - select SND_SOC - ---help--- - Driver for the on-chip SH-Mobile HDMI controller. - config FB_TMIO tristate "Toshiba Mobile IO FrameBuffer support" depends on FB && (MFD_TMIO || COMPILE_TEST)
drivers/video/fbdev/Makefile +0 -1
@@ -118,7 +118,6 @@ obj-$(CONFIG_FB_UDL) += udlfb.o obj-$(CONFIG_FB_SMSCUFX) += smscufx.o obj-$(CONFIG_FB_XILINX) += xilinxfb.o obj-$(CONFIG_SH_MIPI_DSI) += sh_mipi_dsi.o -obj-$(CONFIG_FB_SH_MOBILE_HDMI) += sh_mobile_hdmi.o obj-$(CONFIG_FB_SH_MOBILE_MERAM) += sh_mobile_meram.o obj-$(CONFIG_FB_SH_MOBILE_LCDC) += sh_mobile_lcdcfb.o obj-$(CONFIG_FB_OMAP) += omap/
drivers/video/fbdev/sh_mobile_hdmi.c deleted +0 -1489
1,489 lines not on this page · raw message
include/video/sh_mobile_hdmi.h deleted +0 -49
49 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 108/159 fbdev: Ditch fb_edid_add_monspecs
In reply to Greg Kroah-HartmanFrom: Daniel Vetter <[email protected]>
commit 3b8720e63f4a1fc6f422a49ecbaa3b59c86d5aaf upstream.
It's dead code ever since
commit 34280340b1dc74c521e636f45cd728f9abf56ee2
Author: Geert Uytterhoeven <[email protected]> Date: Fri Dec 4 17:01:43 2015 +0100
fbdev: Remove unused SH-Mobile HDMI driver
Also with this gone we can remove the cea_modes db. This entire thing is massively incomplete anyway, compared to the CEA parsing that drm_edid.c does.
--- drivers/video/fbdev/core/fbmon.c | 95 -------------------------------------- drivers/video/fbdev/core/modedb.c | 57 ---------------------- include/linux/fb.h | 3 - 3 files changed, 155 deletions(-)
drivers/video/fbdev/core/fbmon.c +0 -95
@@ -997,97 +997,6 @@ void fb_edid_to_monspecs(unsigned char *DPRINTK ("========================================\n" ); } -/** -* fb_edid_add_monspecs() - add monitor video modes from E-EDID data -* @edid: 128 byte array with an E-EDID block -* @spacs: monitor specs to be extended -*/ -void fb_edid_add_monspecs (unsigned char *edid,struct fb_monspecs *specs) -{ -unsigned char *block; -struct fb_videomode *m; -int num =0 , i; -u8 svd[64 ], edt[(128 -4 ) /DETAILED_TIMING_DESCRIPTION_SIZE ]; -u8 pos =4 , svd_n =0 ; - -if (!edid) -return ; - -if (!edid_checksum (edid)) -return ; - -if (edid[0 ] !=0x2 || - edid[2 ] <4 || edid[2 ] >128 -DETAILED_TIMING_DESCRIPTION_SIZE ) -return ; - -DPRINTK (" Short Video Descriptors\n" ); - -while (pos < edid[2 ]) { -u8 len = edid[pos] &0x1f , type = (edid[pos] >>5 ) &7 ; -pr_debug ("Data block %u of %u bytes\n" , type, len); -if (type ==2 ) { -for (i = pos; i < pos + len; i++) { -u8 idx = edid[pos + i] &0x7f ; - svd[svd_n++] = idx; -pr_debug ("N%sative mode #%d\n" , - edid[pos + i] &0x80 ?"" :"on-n" , idx); - } - }else if (type ==3 && len >=3 ) { -/* Check Vendor Specific Data Block. For HDMI, -it is always 00-0C-03 for HDMI Licensing, LLC. */ -if (edid[pos +1 ] ==3 && edid[pos +2 ] ==0xc && - edid[pos +3 ] ==0 ) - specs->misc |=FB_MISC_HDMI ; - } - pos += len +1 ; - } - - block = edid + edid[2 ]; - -DPRINTK (" Extended Detailed Timings\n" ); - -for (i =0 ; i < (128 - edid[2 ]) /DETAILED_TIMING_DESCRIPTION_SIZE ; - i++, block +=DETAILED_TIMING_DESCRIPTION_SIZE ) -if (PIXEL_CLOCK ) - edt[num++] = block - edid; - -/* Yikes, EDID data is totally useless */ -if (!(num + svd_n)) -return ; - - m =kzalloc ((specs->modedb_len + num + svd_n) * -sizeof (struct fb_videomode ),GFP_KERNEL ); - -if (!m) -return ; - -memcpy (m, specs->modedb, specs->modedb_len *sizeof (struct fb_videomode )); - -for (i = specs->modedb_len; i < specs->modedb_len + num; i++) { -get_detailed_timing (edid + edt[i - specs->modedb_len], &m[i]); -if (i == specs->modedb_len) - m[i].flag |=FB_MODE_IS_FIRST ; -pr_debug ("Adding %ux%u@%u\n" , m[i].xres, m[i].yres, m[i].refresh); - } - -for (i = specs->modedb_len + num; i < specs->modedb_len + num + svd_n; i++) { -int idx = svd[i - specs->modedb_len - num]; -if (!idx || idx >=ARRAY_SIZE (cea_modes)) { -pr_warning ("Reserved SVD code %d\n" , idx); - }else if (!cea_modes[idx].xres) { -pr_warning ("Unimplemented SVD code %d\n" , idx); - }else { -memcpy (&m[i], cea_modes + idx,sizeof (m[i])); -pr_debug ("Adding SVD #%d: %ux%u@%u\n" , idx, - m[i].xres, m[i].yres, m[i].refresh); - } - } - -kfree (specs->modedb); - specs->modedb = m; - specs->modedb_len = specs->modedb_len + num + svd_n; -} -/* * VESA Generalized Timing Formula (GTF) */
@@ -1498,9 +1407,6 @@ void fb_edid_to_monspecs(unsigned char * { specs =NULL ; } -void fb_edid_add_monspecs (unsigned char *edid,struct fb_monspecs *specs) -{ -}void fb_destroy_modedb (struct fb_videomode *modedb) { }
@@ -1608,7 +1514,6 @@ EXPORT_SYMBOL(fb_firmware_edid);EXPORT_SYMBOL (fb_parse_edid);EXPORT_SYMBOL (fb_edid_to_monspecs); -EXPORT_SYMBOL (fb_edid_add_monspecs);EXPORT_SYMBOL (fb_get_mode);EXPORT_SYMBOL (fb_validate_mode);EXPORT_SYMBOL (fb_destroy_modedb);
drivers/video/fbdev/core/modedb.c +0 -57
63 lines not on this page · raw message
include/linux/fb.h +0 -3
@@ -716,8 +716,6 @@ extern int fb_parse_edid(unsigned char *extern const unsigned char *fb_firmware_edid (struct device *device);extern void fb_edid_to_monspecs (unsigned char *edid,struct fb_monspecs *specs); -extern void fb_edid_add_monspecs (unsigned char *edid, -struct fb_monspecs *specs);extern void fb_destroy_modedb (struct fb_videomode *modedb);extern int fb_find_mode_cvt (struct fb_videomode *mode,int margins,int rb);extern unsigned char *fb_ddc_read (struct i2c_adapter *adapter);
@@ -791,7 +789,6 @@ struct dmt_videomode {extern const char *fb_mode_option;extern const struct fb_videomode vesa_modes[]; -extern const struct fb_videomode cea_modes[65 ];extern const struct dmt_videomode dmt_modes[];struct fb_modelist {
Greg Kroah-Hartman
maintainerPATCH 109/159 block: introduce blk_rq_is_passthrough
In reply to Greg Kroah-HartmanFrom: Christoph Hellwig <[email protected]>
commit 57292b58ddb58689e8c3b4c6eadbef10d9ca44dd upstream.
This can be used to check for fs vs non-fs requests and basically removes all knowledge of BLOCK_PC specific from the block layer, as well as preparing for removing the cmd_type field in struct request.
[only take the blkdev.h changes as we only want the function for backported patches - gregkh]
--- include/linux/blkdev.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
include/linux/blkdev.h +11 -5
@@ -199,6 +199,11 @@ struct request {struct request *next_rq; }; +static inline bool blk_rq_is_passthrough (struct request *rq) +{ +return rq->cmd_type !=REQ_TYPE_FS ; +} +static inline unsigned short req_get_ioprio (struct request *req) {return req->ioprio;
@@ -582,9 +587,10 @@ static inline void queue_flag_clear(unsi ((rq)->cmd_flags & (REQ_FAILFAST_DEV |REQ_FAILFAST_TRANSPORT | \ REQ_FAILFAST_DRIVER)) -#define blk_account_rq (rq) \ - (((rq)->cmd_flags & REQ_STARTED) && \ - ((rq)->cmd_type == REQ_TYPE_FS)) +static inline bool blk_account_rq (struct request *rq) +{ +return (rq->cmd_flags &REQ_STARTED ) && !blk_rq_is_passthrough (rq); +}#define blk_rq_cpu_valid (rq) ((rq)->cpu != -1)#define blk_bidi_rq (rq) ((rq)->next_rq != NULL)
@@ -645,7 +651,7 @@ static inline void blk_clear_rl_full(strstatic inline bool rq_mergeable (struct request *rq) { -if (rq->cmd_type !=REQ_TYPE_FS ) +if (blk_rq_is_passthrough (rq))return false;if (rq->cmd_flags &REQ_NOMERGE_FLAGS )
@@ -890,7 +896,7 @@ static inline unsigned int blk_rq_get_ma {struct request_queue *q = rq->q; -if (unlikely (rq->cmd_type !=REQ_TYPE_FS )) +if (blk_rq_is_passthrough (rq))return q->limits.max_hw_sectors;if (!q->limits.chunk_sectors || (rq->cmd_flags &REQ_DISCARD ))
Greg Kroah-Hartman
maintainerPATCH 110/159 libata: have ata_scsi_rw_xlat() fail invalid passthrough requests
In reply to Greg Kroah-HartmanFrom: Jens Axboe <[email protected]>
commit 2d7271501720038381d45fb3dcbe4831228fc8cc upstream.
For passthrough requests, libata-scsi takes what the user passes in as gospel. This can be problematic if the user fills in the CDB incorrectly. One example of that is in request sizes. For read/write commands, the CDB contains fields describing the transfer length of the request. These should match with the SG_IO header fields, but libata-scsi currently does no validation of that.
Check that the number of blocks in the CDB for passthrough requests matches what was mapped into the request. If the CDB asks for more data then the validated SG_IO header fields, error it.
--- drivers/ata/libata-scsi.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
drivers/ata/libata-scsi.c +21 -0
@@ -1654,6 +1654,21 @@ nothing_to_do:return 1 ; } +static bool ata_check_nblocks (struct scsi_cmnd *scmd,u32 n_blocks) +{ +struct request *rq = scmd->request; +u32 req_blocks; + +if (!blk_rq_is_passthrough (rq)) +return true; + + req_blocks =blk_rq_bytes (rq) / scmd->device->sector_size; +if (n_blocks > req_blocks) +return false; + +return true; +} +/** * ata_scsi_rw_xlat - Translate SCSI r/w command into an ATA one * @qc: Storage for translated ATA taskfile
@@ -1693,6 +1708,8 @@ static unsigned int ata_scsi_rw_xlat(strscsi_10_lba_len (cdb, &block, &n_block);if (cdb[1 ] & (1 <<3 )) tf_flags |=ATA_TFLAG_FUA ; +if (!ata_check_nblocks (scmd, n_block)) + goto invalid_fld;break ;case READ_6 :case WRITE_6 :
@@ -1705,6 +1722,8 @@ static unsigned int ata_scsi_rw_xlat(str*/ if (!n_block) n_block =256 ; +if (!ata_check_nblocks (scmd, n_block)) + goto invalid_fld;break ;case READ_16 :case WRITE_16 :
@@ -1713,6 +1732,8 @@ static unsigned int ata_scsi_rw_xlat(strscsi_16_lba_len (cdb, &block, &n_block);if (cdb[1 ] & (1 <<3 )) tf_flags |=ATA_TFLAG_FUA ; +if (!ata_check_nblocks (scmd, n_block)) + goto invalid_fld;break ;default :DPRINTK ("no-byte command\n" );
Greg Kroah-Hartman
maintainerPATCH 111/159 net: ovs: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit eddf11e18dff0e8671e06ce54e64cfc843303ab9 ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- net/openvswitch/vport-internal_dev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
net/openvswitch/vport-internal_dev.c +3 -2
@@ -44,7 +44,8 @@ static struct internal_dev *internal_dev_priv(struct net_device *netdev) }/* Called with rcu_read_lock_bh. */ -static int internal_dev_xmit (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t +internal_dev_xmit (struct sk_buff *skb,struct net_device *netdev) {int len, err;
@@ -63,7 +64,7 @@ static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) }else { netdev->stats.tx_errors++; } -return 0 ; +return NETDEV_TX_OK ; }static int internal_dev_open (struct net_device *netdev)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 112/159 ARM: dts: omap5: enable OTG role for DWC3 controller
In reply to Greg Kroah-HartmanFrom: H. Nikolaus Schaller <[email protected]>
[ Upstream commit 656c1a65ab555ee5c7cd0d6aee8ab82ca3c1795f ]
Since SMPS10 and OTG cable detection extcon are described here, and work to enable OTG power when an OTG cable is plugged in, we can define OTG mode in the controller (which is disabled by default in omap5.dtsi).
Tested on OMAP5EVM and Pyra.
--- arch/arm/boot/dts/omap5-board-common.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/omap5-board-common.dtsi +4 -0
@@ -633,6 +633,10 @@ vbus-supply = <&smps10_out1_reg>; }; +&dwc3 { + dr_mode = "otg"; +}; + &mcspi1 { };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 113/159 f2fs: return correct errno in f2fs_gc
In reply to Greg Kroah-HartmanFrom: Jaegeuk Kim <[email protected]>
[ Upstream commit 61f7725aa148ee870436a29d3a24d5c00ab7e9af ]
This fixes overriding error number in f2fs_gc.
--- fs/f2fs/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/gc.c +1 -1
@@ -880,7 +880,7 @@ int f2fs_gc(struct f2fs_sb_info *sbi, bool sync)put_gc_inode (&gc_list); -if (sync) +if (sync && !ret) ret = sec_freed ?0 : -EAGAIN ;return ret; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 114/159 SUNRPC: Fix priority queue fairness
In reply to Greg Kroah-HartmanFrom: Trond Myklebust <[email protected]>
[ Upstream commit f42f7c283078ce3c1e8368b140e270755b1ae313 ]
Fix up the priority queue to not batch by owner, but by queue, so that we allow '1 << priority' elements to be dequeued before switching to the next priority queue.
The owner field is still used to wake up requests in round robin order by owner to avoid single processes hogging the RPC layer by loading the queues.
--- include/linux/sunrpc/sched.h | 2 - net/sunrpc/sched.c | 109 +++++++++++++++++------------------ 2 files changed, 54 insertions(+), 57 deletions(-)
include/linux/sunrpc/sched.h +0 -2
@@ -181,7 +181,6 @@ struct rpc_timer {struct rpc_wait_queue {spinlock_t lock;struct list_head tasks[RPC_NR_PRIORITY ];/* task queue for each priority level */ -pid_t owner;/* process id of last task serviced */ unsigned char maxpriority;/* maximum priority (0 if queue is not a priority queue) */ unsigned char priority;/* current priority */ unsigned char nr;/* # tasks remaining for cookie */
@@ -197,7 +196,6 @@ struct rpc_wait_queue {* from a single cookie. The aim is to improve * performance of NFS operations such as read/write. */ -#define RPC_BATCH_COUNT 16#define RPC_IS_PRIORITY (q) ((q)->maxpriority > 0)/*
net/sunrpc/sched.c +54 -55
170 lines not on this page · raw message
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 115/159 ath10k: fix vdev-start timeout on error
In reply to Greg Kroah-HartmanFrom: Ben Greear <[email protected]>
[ Upstream commit 833fd34d743c728afe6d127ef7bee67e7d9199a8 ]
The vdev-start-response message should cause the completion to fire, even in the error case. Otherwise, the user still gets no useful information and everything is blocked until the timeout period.
Add some warning text to print out the invalid status code to aid debugging, and propagate failure code.
--- drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/mac.c | 2 +- drivers/net/wireless/ath/ath10k/wmi.c | 19 ++++++++++++++++--- drivers/net/wireless/ath/ath10k/wmi.h | 8 +++++++- 4 files changed, 25 insertions(+), 5 deletions(-)
drivers/net/wireless/ath/ath10k/core.h +1 -0
@@ -755,6 +755,7 @@ struct ath10k {struct completion install_key_done; +int last_wmi_vdev_start_status;struct completion vdev_setup_done;struct workqueue_struct *workqueue;
drivers/net/wireless/ath/ath10k/mac.c +1 -1
@@ -850,7 +850,7 @@ static inline int ath10k_vdev_setup_sync(struct ath10k *ar)if (time_left ==0 )return -ETIMEDOUT ; -return 0 ; +return ar->last_wmi_vdev_start_status; }static int ath10k_monitor_vdev_start (struct ath10k *ar,int vdev_id)
drivers/net/wireless/ath/ath10k/wmi.c +16 -3
@@ -2945,18 +2945,31 @@ void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, struct sk_buff *skb) {struct wmi_vdev_start_ev_arg arg = {};int ret; +u32 status;ath10k_dbg (ar,ATH10K_DBG_WMI ,"WMI_VDEV_START_RESP_EVENTID\n" ); + ar->last_wmi_vdev_start_status =0 ; + ret =ath10k_wmi_pull_vdev_start (ar, skb, &arg);if (ret) {ath10k_warn (ar,"failed to parse vdev start event: %d\n" , ret); -return ; + ar->last_wmi_vdev_start_status = ret; + goto out; } -if (WARN_ON (__le32_to_cpu (arg.status))) -return ; + status =__le32_to_cpu (arg.status); +if (WARN_ON_ONCE (status)) { +ath10k_warn (ar,"vdev-start-response reports status error: %d (%s)\n" , + status, (status ==WMI_VDEV_START_CHAN_INVALID ) ? +"chan-invalid" :"unknown" ); +/* Setup is done one way or another though, so we should still +* do the completion, so don't return here. +*/ + ar->last_wmi_vdev_start_status = -EINVAL ; + } +out:complete (&ar->vdev_setup_done); }
drivers/net/wireless/ath/ath10k/wmi.h +7 -1
@@ -5969,11 +5969,17 @@ struct wmi_ch_info_ev_arg {__le32 rx_frame_count; }; +/* From 10.4 firmware, not sure all have the same values. */ +enum wmi_vdev_start_status { +WMI_VDEV_START_OK =0 , +WMI_VDEV_START_CHAN_INVALID , +}; +struct wmi_vdev_start_ev_arg {__le32 vdev_id;__le32 req_id;__le32 resp_type;/* %WMI_VDEV_RESP_ */ -__le32 status; +__le32 status;/* See wmi_vdev_start_status enum above */ };struct wmi_peer_kick_ev_arg {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 116/159 ath9k: fix reporting calculated new FFT upper max
In reply to Greg Kroah-HartmanFrom: Simon Wunderlich <[email protected]>
[ Upstream commit 4fb5837ac2bd46a85620b297002c704e9958f64d ]
Since the debug print code is outside of the loop, it shouldn't use the loop iterator anymore but instead print the found maximum index.
--- drivers/net/wireless/ath/ath9k/common-spectral.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/common-spectral.c +1 -1
@@ -411,7 +411,7 @@ ath_cmn_process_ht20_40_fft(struct ath_rx_status *rs,ath_dbg (common,SPECTRAL_SCAN ,"Calculated new upper max 0x%X at %i\n" , - tmp_mag, i); + tmp_mag, fft_sample_40.upper_max_index); }else for (i = dc_pos; i <SPECTRAL_HT20_40_NUM_BINS ; i++) {if (fft_sample_40.data[i] == (upper_mag >> max_exp))
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 117/159 usb: gadget: udc: fotg210-udc: Fix a sleep-in-atomic-context bug in fotg210_get_status()
In reply to Greg Kroah-HartmanFrom: Jia-Ju Bai <[email protected]>
[ Upstream commit 2337a77c1cc86bc4e504ecf3799f947659c86026 ]
The driver may sleep in an interrupt handler.
The function call path (from bottom to top) in Linux-4.17 is:
[FUNC] fotg210_ep_queue(GFP_KERNEL)drivers/usb/gadget/udc/fotg210-udc.c, 744:
fotg210_ep_queue in fotg210_get_status
drivers/usb/gadget/udc/fotg210-udc.c, 768:
fotg210_get_status in fotg210_setup_packetdrivers/usb/gadget/udc/fotg210-udc.c, 949:
fotg210_setup_packet in fotg210_irq (interrupt handler)
To fix this bug, GFP_KERNEL is replaced with GFP_ATOMIC. If possible, spin_unlock() and spin_lock() around fotg210_ep_queue() can be also removed.
This bug is found by my static analysis tool DSAC.
--- drivers/usb/gadget/udc/fotg210-udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/udc/fotg210-udc.c +1 -1
@@ -744,7 +744,7 @@ static void fotg210_get_status(struct fotg210_udc *fotg210, fotg210->ep0_req->length =2 ;spin_unlock (&fotg210->lock); -fotg210_ep_queue (fotg210->gadget.ep0, fotg210->ep0_req,GFP_KERNEL ); +fotg210_ep_queue (fotg210->gadget.ep0, fotg210->ep0_req,GFP_ATOMIC );spin_lock (&fotg210->lock); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 118/159 nl80211: Fix a GET_KEY reply attribute
In reply to Greg Kroah-HartmanFrom: Andrew Zaborowski <[email protected]>
[ Upstream commit efdfce7270de85a8706d1ea051bef3a7486809ff ]
Use the NL80211_KEY_IDX attribute inside the NL80211_ATTR_KEY in NL80211_CMD_GET_KEY responses to comply with nl80211_key_policy. This is unlikely to affect existing userspace.
--- net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/nl80211.c +1 -1
@@ -2879,7 +2879,7 @@ static void get_key_callback(void *c, struct key_params *params) params->cipher))) goto nla_put_failure; -if (nla_put_u8 (cookie->msg,NL80211_ATTR_KEY_IDX , cookie->idx)) +if (nla_put_u8 (cookie->msg,NL80211_KEY_IDX , cookie->idx)) goto nla_put_failure;nla_nest_end (cookie->msg, key);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 119/159 dmaengine: ep93xx: Return proper enum in ep93xx_dma_chan_direction
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
[ Upstream commit 9524d6b265f9b2b9a61fceb2ee2ce1c2a83e39ca ]
Clang warns when implicitly converting from one enumerated type to another. Avoid this by using the equivalent value from the expected type.
In file included from drivers/dma/ep93xx_dma.c:30:./include/linux/platform_data/dma-ep93xx.h:88:10: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion]
return DMA_NONE;
~~~~~~ ^~~~~~~~1 warning generated.
--- include/linux/platform_data/dma-ep93xx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/platform_data/dma-ep93xx.h +1 -1
@@ -84,7 +84,7 @@ static inline enum dma_transfer_direction ep93xx_dma_chan_direction(struct dma_chan *chan) {if (!ep93xx_dma_chan_is_m2p (chan)) -return DMA_NONE ; +return DMA_TRANS_NONE ;/* even channels are for TX, odd for RX */ return (chan->chan_id %2 ==0 ) ?DMA_MEM_TO_DEV :DMA_DEV_TO_MEM ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 120/159 dmaengine: timb_dma: Use proper enum in td_prep_slave_sg
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
[ Upstream commit 5e621f5d538985f010035c6f3e28c22829d36db1 ]
Clang warns when implicitly converting from one enumerated type to another. Avoid this by using the equivalent value from the expected type.
drivers/dma/timb_dma.c:548:27: warning: implicit conversion from enumeration type 'enum dma_transfer_direction' to different enumeration type 'enum dma_data_direction' [-Wenum-conversion]
td_desc->desc_list_len, DMA_MEM_TO_DEV);
^~~~~~~~~~~~~~1 warning generated.
--- drivers/dma/timb_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/timb_dma.c +1 -1
@@ -552,7 +552,7 @@ static struct dma_async_tx_descriptor *td_prep_slave_sg(struct dma_chan *chan, }dma_sync_single_for_device (chan2dmadev (chan), td_desc->txd.phys, - td_desc->desc_list_len,DMA_MEM_TO_DEV ); + td_desc->desc_list_len,DMA_TO_DEVICE );return &td_desc->txd; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 121/159 mei: samples: fix a signedness bug in amt_host_if_call()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 185647813cac080453cb73a2e034a8821049f2a7 ]
"out_buf_sz" needs to be signed for the error handling to work.
--- Documentation/misc-devices/mei/mei-amt-version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/misc-devices/mei/mei-amt-version.c +1 -1
@@ -370,7 +370,7 @@ static uint32_t amt_host_if_call(struct amt_host_if *acmd, unsigned int expected_sz) {uint32_t in_buf_sz; -uint32_t out_buf_sz; +ssize_t out_buf_sz;ssize_t written;uint32_t status;struct amt_host_if_resp_header *msg_hdr;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 122/159 cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
[ Upstream commit 3b0b8f0d9a259f6a428af63e7a77547325f8e081 ]
Clang warns when one enumerated type is implicitly converted to another.
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:303:7: warning: implicit conversion from enumeration type 'enum cxgb4_dcb_state' to different enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
? CXGB4_DCB_STATE_FW_ALLSYNCED
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:304:7: warning: implicit
conversion from enumeration type 'enum cxgb4_dcb_state' to different
enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
: CXGB4_DCB_STATE_FW_INCOMPLETE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~2 warnings generated.
Use the equivalent value of the expected type to silence Clang while resulting in no functional change.
CXGB4_DCB_STATE_FW_INCOMPLETE = CXGB4_DCB_INPUT_FW_INCOMPLETE = 2 CXGB4_DCB_STATE_FW_ALLSYNCED = CXGB4_DCB_INPUT_FW_ALLSYNCED = 3
--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c +2 -2
@@ -266,8 +266,8 @@ void cxgb4_dcb_handle_fw_update(struct adapter *adap,enum cxgb4_dcb_state_input input = ((pcmd->u.dcb.control.all_syncd_pkd &FW_PORT_CMD_ALL_SYNCD_F ) - ?CXGB4_DCB_STATE_FW_ALLSYNCED - :CXGB4_DCB_STATE_FW_INCOMPLETE ); + ?CXGB4_DCB_INPUT_FW_ALLSYNCED + :CXGB4_DCB_INPUT_FW_INCOMPLETE );if (dcb->dcb_version !=FW_PORT_DCB_VER_UNKNOWN ) { dcb_running_version = FW_PORT_CMD_DCB_VERSION_G(
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 123/159 cxgb4: Use proper enum in IEEE_FAUX_SYNC
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
[ Upstream commit 258b6d141878530ba1f8fc44db683822389de914 ]
Clang warns when one enumerated type is implicitly converted to another.
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:390:4: warning: implicit conversion from enumeration type 'enum cxgb4_dcb_state' to different enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
IEEE_FAUX_SYNC(dev, dcb);
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h:70:10: note: expanded
from macro 'IEEE_FAUX_SYNC'
CXGB4_DCB_STATE_FW_ALLSYNCED);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~Use the equivalent value of the expected type to silence Clang while resulting in no functional change.
CXGB4_DCB_STATE_FW_ALLSYNCED = CXGB4_DCB_INPUT_FW_ALLSYNCED = 3
--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h +1 -1
@@ -67,7 +67,7 @@do { \if ((__dcb)->dcb_version ==FW_PORT_DCB_VER_IEEE ) \cxgb4_dcb_state_fsm ((__dev), \ -CXGB4_DCB_STATE_FW_ALLSYNCED ); \ +CXGB4_DCB_INPUT_FW_ALLSYNCED ); \ }while (0 )/* States we can be in for a port's Data Center Bridging.
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 124/159 powerpc/pseries: Fix DTL buffer registration
In reply to Greg Kroah-HartmanFrom: Naveen N. Rao <[email protected]>
[ Upstream commit db787af1b8a6b4be428ee2ea7d409dafcaa4a43c ]
When CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set, we register the DTL buffer for a cpu when the associated file under powerpc/dtl in debugfs is opened. When doing so, we need to set the size of the buffer being registered in the second u32 word of the buffer. This needs to be in big endian, but we are not doing the conversion resulting in the below error showing up in dmesg:
dtl_start: DTL registration for cpu 0 (hw 0) failed with -4
Fix this in the obvious manner.
--- arch/powerpc/platforms/pseries/dtl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/pseries/dtl.c +1 -1
@@ -150,7 +150,7 @@ static int dtl_start(struct dtl *dtl)/* Register our dtl buffer with the hypervisor. The HV expects the * buffer size to be passed in the second word of the buffer */ - ((u32 *)dtl->buf)[1 ] =DISPATCH_LOG_BYTES ; + ((u32 *)dtl->buf)[1 ] =cpu_to_be32 (DISPATCH_LOG_BYTES ); hwcpu =get_hard_smp_processor_id (dtl->cpu); addr =__pa (dtl->buf);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 125/159 powerpc/pseries: Fix how we iterate over the DTL entries
In reply to Greg Kroah-HartmanFrom: Naveen N. Rao <[email protected]>
[ Upstream commit 9258227e9dd1da8feddb07ad9702845546a581c9 ]
When CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set, we look up dtl_idx in the lppaca to determine the number of entries in the buffer. Since lppaca is in big endian, we need to do an endian conversion before using this in our calculation to determine the number of entries in the buffer. Without this, we do not iterate over the existing entries in the DTL buffer properly.
--- arch/powerpc/platforms/pseries/dtl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/pseries/dtl.c +1 -1
@@ -185,7 +185,7 @@ static void dtl_stop(struct dtl *dtl)static u64 dtl_current_index (struct dtl *dtl) { -return lppaca_of (dtl->cpu).dtl_idx; +return be64_to_cpu (lppaca_of (dtl->cpu).dtl_idx); }#endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 126/159 mtd: rawnand: sh_flctl: Use proper enum for flctl_dma_fifo0_transfer
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
[ Upstream commit e2bfa4ca23d9b5a7bdfcf21319fad9b59e38a05c ]
Clang warns when one enumerated type is converted implicitly to another:
drivers/mtd/nand/raw/sh_flctl.c:483:46: warning: implicit conversion from enumeration type 'enum dma_transfer_direction' to different enumeration type 'enum dma_data_direction' [-Wenum-conversion]
flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_DEV_TO_MEM) > 0) ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~drivers/mtd/nand/raw/sh_flctl.c:542:46: warning: implicit conversion from enumeration type 'enum dma_transfer_direction' to different enumeration type 'enum dma_data_direction' [-Wenum-conversion]
flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_MEM_TO_DEV) > 0) ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
2 warnings generated.
Use the proper enums from dma_data_direction to satisfy Clang.
DMA_MEM_TO_DEV = DMA_TO_DEVICE = 1DMA_DEV_TO_MEM = DMA_FROM_DEVICE = 2
--- drivers/mtd/nand/sh_flctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/nand/sh_flctl.c +2 -2
@@ -428,7 +428,7 @@ static void read_fiforeg(struct sh_flctl *flctl, int rlen, int offset)/* initiate DMA transfer */ if (flctl->chan_fifo0_rx && rlen >=32 && -flctl_dma_fifo0_transfer (flctl, buf, rlen,DMA_DEV_TO_MEM ) >0 ) +flctl_dma_fifo0_transfer (flctl, buf, rlen,DMA_FROM_DEVICE ) >0 ) goto convert;/* DMA success */ /* do polling transfer */
@@ -487,7 +487,7 @@ static void write_ec_fiforeg(struct sh_flctl *flctl, int rlen,/* initiate DMA transfer */ if (flctl->chan_fifo0_tx && rlen >=32 && -flctl_dma_fifo0_transfer (flctl, buf, rlen,DMA_MEM_TO_DEV ) >0 ) +flctl_dma_fifo0_transfer (flctl, buf, rlen,DMA_TO_DEVICE ) >0 )return ;/* DMA success */ /* do polling transfer */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 127/159 ixgbe: Fix crash with VFs and flow director on interface flap
In reply to Greg Kroah-HartmanFrom: Radoslaw Tyl <[email protected]>
[ Upstream commit 5d826d209164b0752c883607be4cdbbcf7cab494 ]
This patch fix crash when we have restore flow director filters after reset adapter. In ixgbe_fdir_filter_restore() filter->action is outside of the rx_ring array, as it has a VF identifier in the upper 32 bits.
--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +8 -2
@@ -4532,6 +4532,7 @@ static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter)struct ixgbe_hw *hw = &adapter->hw;struct hlist_node *node2;struct ixgbe_fdir_filter *filter; +u64 action;spin_lock (&adapter->fdir_perfect_lock);
@@ -4540,12 +4541,17 @@ static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter)hlist_for_each_entry_safe (filter, node2, &adapter->fdir_filter_list, fdir_node) { + action = filter->action; +if (action !=IXGBE_FDIR_DROP_QUEUE && action !=0 ) + action = + (action >>ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF ) -1 ; +ixgbe_fdir_write_perfect_filter_82599 (hw, &filter->filter, filter->sw_idx, - (filter->action ==IXGBE_FDIR_DROP_QUEUE ) ? + (action ==IXGBE_FDIR_DROP_QUEUE ) ?IXGBE_FDIR_DROP_QUEUE : - adapter->rx_ring[filter->action]->reg_idx); + adapter->rx_ring[action]->reg_idx); }spin_unlock (&adapter->fdir_perfect_lock);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 128/159 IB/mthca: Fix error return code in __mthca_init_one()
In reply to Greg Kroah-HartmanFrom: Wei Yongjun <[email protected]>
[ Upstream commit 39f2495618c5e980d2873ea3f2d1877dd253e07a ]
Fix to return a negative error code from the mthca_cmd_init() error handling case instead of 0, as done elsewhere in this function.
--- drivers/infiniband/hw/mthca/mthca_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/hw/mthca/mthca_main.c +2 -1
@@ -989,7 +989,8 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type) goto err_free_dev; } -if (mthca_cmd_init (mdev)) { + err =mthca_cmd_init (mdev); +if (err) {mthca_err (mdev,"Failed to init command interface, aborting.\n" ); goto err_free_dev; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 129/159 ata: ep93xx: Use proper enums for directions
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
[ Upstream commit 6adde4a36f1b6a562a1057fbb1065007851050e7 ]
Clang warns when one enumerated type is implicitly converted to another.
drivers/ata/pata_ep93xx.c:662:36: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion]
drv_data->dma_rx_data.direction = DMA_FROM_DEVICE;
~ ^~~~~~~~~~~~~~~
drivers/ata/pata_ep93xx.c:670:36: warning: implicit conversion from
enumeration type 'enum dma_data_direction' to different enumeration type
'enum dma_transfer_direction' [-Wenum-conversion]
drv_data->dma_tx_data.direction = DMA_TO_DEVICE;
~ ^~~~~~~~~~~~~
drivers/ata/pata_ep93xx.c:681:19: warning: implicit conversion from
enumeration type 'enum dma_data_direction' to different enumeration type
'enum dma_transfer_direction' [-Wenum-conversion]
conf.direction = DMA_FROM_DEVICE;
~ ^~~~~~~~~~~~~~~
drivers/ata/pata_ep93xx.c:692:19: warning: implicit conversion from
enumeration type 'enum dma_data_direction' to different enumeration type
'enum dma_transfer_direction' [-Wenum-conversion]
conf.direction = DMA_TO_DEVICE;
~ ^~~~~~~~~~~~~Use the equivalent valued enums from the expected type so that Clang no longer warns about a conversion.
DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1DMA_FROM_DEVICE = DMA_DEV_TO_MEM = 2
--- drivers/ata/pata_ep93xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/ata/pata_ep93xx.c +4 -4
@@ -659,7 +659,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)* start of new transfer. */ drv_data->dma_rx_data.port =EP93XX_DMA_IDE ; - drv_data->dma_rx_data.direction =DMA_FROM_DEVICE ; + drv_data->dma_rx_data.direction =DMA_DEV_TO_MEM ; drv_data->dma_rx_data.name ="ep93xx-pata-rx" ; drv_data->dma_rx_channel =dma_request_channel (mask, ep93xx_pata_dma_filter, &drv_data->dma_rx_data);
@@ -667,7 +667,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)return ; drv_data->dma_tx_data.port =EP93XX_DMA_IDE ; - drv_data->dma_tx_data.direction =DMA_TO_DEVICE ; + drv_data->dma_tx_data.direction =DMA_MEM_TO_DEV ; drv_data->dma_tx_data.name ="ep93xx-pata-tx" ; drv_data->dma_tx_channel =dma_request_channel (mask, ep93xx_pata_dma_filter, &drv_data->dma_tx_data);
@@ -678,7 +678,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)/* Configure receive channel direction and source address */ memset (&conf,0 ,sizeof (conf)); - conf.direction =DMA_FROM_DEVICE ; + conf.direction =DMA_DEV_TO_MEM ; conf.src_addr = drv_data->udma_in_phys; conf.src_addr_width =DMA_SLAVE_BUSWIDTH_4_BYTES ;if (dmaengine_slave_config (drv_data->dma_rx_channel, &conf)) {
@@ -689,7 +689,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)/* Configure transmit channel direction and destination address */ memset (&conf,0 ,sizeof (conf)); - conf.direction =DMA_TO_DEVICE ; + conf.direction =DMA_MEM_TO_DEV ; conf.dst_addr = drv_data->udma_out_phys; conf.dst_addr_width =DMA_SLAVE_BUSWIDTH_4_BYTES ;if (dmaengine_slave_config (drv_data->dma_tx_channel, &conf)) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 130/159 ALSA: hda/sigmatel - Disable automute for Elo VuPoint
In reply to Greg Kroah-HartmanFrom: Michael Pobega <[email protected]>
[ Upstream commit d153135e93a50cdb6f1b52e238909e9965b56056 ]
The Elo VuPoint 15MX has two headphone jacks of which neither work by default. Disabling automute allows ALSA to work normally with the speakers & left headphone jack.
Future pin configuration changes may be required in the future to get the right headphone jack working in tandem.
--- sound/pci/hda/patch_sigmatel.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
sound/pci/hda/patch_sigmatel.c +20 -0
@@ -77,6 +77,7 @@ enum {STAC_DELL_M6_BOTH ,STAC_DELL_EQ ,STAC_ALIENWARE_M17X , +STAC_ELO_VUPOINT_15MX ,STAC_92HD89XX_HP_FRONT_JACK ,STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK , STAC_92HD73XX_ASUS_MOBO,
@@ -1875,6 +1876,18 @@ static void stac92hd73xx_fixup_no_jd(struct hda_codec *codec, codec->no_jack_detect =1 ; } + +static void stac92hd73xx_disable_automute (struct hda_codec *codec, +const struct hda_fixup *fix,int action) +{ +struct sigmatel_spec *spec = codec->spec; + +if (action !=HDA_FIXUP_ACT_PRE_PROBE ) +return ; + + spec->gen.suppress_auto_mute =1 ; +} +static const struct hda_fixup stac92hd73xx_fixups[] = { [STAC_92HD73XX_REF ] = { .type =HDA_FIXUP_FUNC ,
@@ -1900,6 +1913,10 @@ static const struct hda_fixup stac92hd73xx_fixups[] = { .type = HDA_FIXUP_FUNC, .v.func = stac92hd73xx_fixup_alienware_m17x, }, + [STAC_ELO_VUPOINT_15MX] = { + .type = HDA_FIXUP_FUNC, + .v.func = stac92hd73xx_disable_automute, + }, [STAC_92HD73XX_INTEL] = { .type = HDA_FIXUP_PINS, .v.pins = intel_dg45id_pin_configs,
@@ -1938,6 +1955,7 @@ static const struct hda_model_fixup stac92hd73xx_models[] = { { .id = STAC_DELL_M6_BOTH, .name = "dell-m6" }, { .id = STAC_DELL_EQ, .name = "dell-eq" }, { .id = STAC_ALIENWARE_M17X, .name = "alienware" }, + { .id = STAC_ELO_VUPOINT_15MX, .name = "elo-vupoint-15mx" }, { .id = STAC_92HD73XX_ASUS_MOBO, .name = "asus-mobo" }, {} };
@@ -1987,6 +2005,8 @@ static const struct snd_pci_quirk stac92hd73xx_fixup_tbl[] = { "Alienware M17x", STAC_ALIENWARE_M17X),SND_PCI_QUIRK (PCI_VENDOR_ID_DELL ,0x0490 ,"Alienware M17x R3" ,STAC_DELL_EQ ), +SND_PCI_QUIRK (0x1059 ,0x1011 , +"ELO VuPoint 15MX" ,STAC_ELO_VUPOINT_15MX ),SND_PCI_QUIRK (PCI_VENDOR_ID_HP ,0x1927 ,"HP Z1 G2" ,STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK ), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2b17,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 131/159 KVM: PPC: Book3S PR: Exiting split hack mode needs to fixup both PC and LR
In reply to Greg Kroah-HartmanFrom: Cameron Kaiser <[email protected]>
[ Upstream commit 1006284c5e411872333967b1970c2ca46a9e225f ]
When an OS (currently only classic Mac OS) is running in KVM-PR and makes a linked jump from code with split hack addressing enabled into code that does not, LR is not correctly updated and reflects the previously munged PC.
To fix this, this patch undoes the address munge when exiting split hack mode so that code relying on LR being a proper address will now execute. This does not affect OS X or other operating systems running on KVM-PR.
--- arch/powerpc/kvm/book3s.c | 3 +++ 1 file changed, 3 insertions(+)
arch/powerpc/kvm/book3s.c +3 -0
@@ -70,8 +70,11 @@ void kvmppc_unfixup_split_real(struct kvm_vcpu *vcpu) {if (vcpu->arch.hflags &BOOK3S_HFLAG_SPLIT_HACK ) {ulong pc =kvmppc_get_pc (vcpu); +ulong lr =kvmppc_get_lr (vcpu);if ((pc &SPLIT_HACK_MASK ) ==SPLIT_HACK_OFFS )kvmppc_set_pc (vcpu, pc & ~SPLIT_HACK_MASK ); +if ((lr &SPLIT_HACK_MASK ) ==SPLIT_HACK_OFFS ) +kvmppc_set_lr (vcpu, lr & ~SPLIT_HACK_MASK ); vcpu->arch.hflags &= ~BOOK3S_HFLAG_SPLIT_HACK ; } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 132/159 USB: serial: cypress_m8: fix interrupt-out transfer length
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
[ Upstream commit 56445eef55cb5904096fed7a73cf87b755dfffc7 ]
Fix interrupt-out transfer length which was being set to the transfer-buffer length rather than the size of the outgoing packet.
Note that no slab data was leaked as the whole transfer buffer is always cleared before each transfer.
--- drivers/usb/serial/cypress_m8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/cypress_m8.c +1 -1
@@ -773,7 +773,7 @@ static void cypress_send(struct usb_serial_port *port)usb_fill_int_urb (port->interrupt_out_urb, port->serial->dev,usb_sndintpipe (port->serial->dev, port->interrupt_out_endpointAddress), - port->interrupt_out_buffer, port->interrupt_out_size, + port->interrupt_out_buffer, actual_size, cypress_write_int_callback, port, priv->write_urb_interval); result =usb_submit_urb (port->interrupt_out_urb,GFP_ATOMIC );if (result) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 133/159 mtd: physmap_of: Release resources on error
In reply to Greg Kroah-HartmanFrom: Ricardo Ribalda Delgado <[email protected]>
[ Upstream commit ef0de747f7ad179c7698a5b0e28db05f18ecbf57 ]
During probe, if there was an error the memory region and the memory map were not properly released.This can lead a system unusable if deferred probe is in use.
Replace mem_request and map with devm_ioremap_resource
--- drivers/mtd/maps/physmap_of.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-)
drivers/mtd/maps/physmap_of.c +5 -22
@@ -28,7 +28,6 @@struct of_flash_list {struct mtd_info *mtd;struct map_info map; -struct resource *res; };struct of_flash {
@@ -53,18 +52,10 @@ static int of_flash_remove(struct platform_device *dev)mtd_concat_destroy (info->cmtd); } -for (i =0 ; i < info->list_size; i++) { +for (i =0 ; i < info->list_size; i++)if (info->list[i].mtd)map_destroy (info->list[i].mtd); -if (info->list[i].map.virt) -iounmap (info->list[i].map.virt); - -if (info->list[i].res) { -release_resource (info->list[i].res); -kfree (info->list[i].res); - } - }return 0 ; }
@@ -223,10 +214,11 @@ static int of_flash_probe(struct platform_device *dev) err = -EBUSY ; res_size =resource_size (&res); - info->list[i].res =request_mem_region (res.start, res_size, -dev_name (&dev->dev)); -if (!info->list[i].res) + info->list[i].map.virt =devm_ioremap_resource (&dev->dev, &res); +if (IS_ERR (info->list[i].map.virt)) { + err =PTR_ERR (info->list[i].map.virt); goto err_out; + } err = -ENXIO ; width =of_get_property (dp,"bank-width" ,NULL );
@@ -242,15 +234,6 @@ static int of_flash_probe(struct platform_device *dev) info->list[i].map.bankwidth =be32_to_cpup (width); info->list[i].map.device_node = dp; - err = -ENOMEM ; - info->list[i].map.virt =ioremap (info->list[i].map.phys, - info->list[i].map.size); -if (!info->list[i].map.virt) { -dev_err (&dev->dev,"Failed to ioremap() flash" -" region\n" ); - goto err_out; - } -simple_map_init (&info->list[i].map);/*
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 134/159 brcmfmac: fix full timeout waiting for action frame on-channel tx
In reply to Greg Kroah-HartmanFrom: Chung-Hsien Hsu <[email protected]>
[ Upstream commit fbf07000960d9c8a13fdc17c6de0230d681c7543 ]
The driver sends an action frame down and waits for a completion signal triggered by the received BRCMF_E_ACTION_FRAME_OFF_CHAN_COMPLETE event to continue the process. However, the action frame could be transmitted either on the current channel or on an off channel. For the on-channel case, only BRCMF_E_ACTION_FRAME_COMPLETE event will be received when the frame is transmitted, which make the driver always wait a full timeout duration. This patch has the completion signal be triggered by receiving the BRCMF_E_ACTION_FRAME_COMPLETE event for the on-channel case.
This change fixes WFA p2p certification 5.1.19 failure.
--- drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 17 +++++++++++++++-- drivers/net/wireless/brcm80211/brcmfmac/p2p.h | 2 ++ 2 files changed, 17 insertions(+), 2 deletions(-)
drivers/net/wireless/brcm80211/brcmfmac/p2p.c +15 -2
@@ -1469,10 +1469,12 @@ int brcmf_p2p_notify_action_tx_complete(struct brcmf_if *ifp,return 0 ;if (e->event_code ==BRCMF_E_ACTION_FRAME_COMPLETE ) { -if (e->status ==BRCMF_E_STATUS_SUCCESS ) +if (e->status ==BRCMF_E_STATUS_SUCCESS ) {set_bit (BRCMF_P2P_STATUS_ACTION_TX_COMPLETED , &p2p->status); -else { +if (!p2p->wait_for_offchan_complete) +complete (&p2p->send_af_done); + }else {set_bit (BRCMF_P2P_STATUS_ACTION_TX_NOACK , &p2p->status);/* If there is no ack, we don't need to wait for * WLC_E_ACTION_FRAME_OFFCHAN_COMPLETE event
@@ -1523,6 +1525,17 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p, p2p->af_sent_channel =le32_to_cpu (af_params->channel); p2p->af_tx_sent_jiffies = jiffies; +if (test_bit (BRCMF_P2P_STATUS_DISCOVER_LISTEN , &p2p->status) && + p2p->af_sent_channel == +ieee80211_frequency_to_channel (p2p->remain_on_channel.center_freq)) + p2p->wait_for_offchan_complete = false; +else + p2p->wait_for_offchan_complete = true; + +brcmf_dbg (TRACE ,"Waiting for %s tx completion event\n" , + (p2p->wait_for_offchan_complete) ? +"off-channel" :"on-channel" ); + timeout =wait_for_completion_timeout (&p2p->send_af_done,msecs_to_jiffies (P2P_AF_MAX_WAIT_TIME ));
drivers/net/wireless/brcm80211/brcmfmac/p2p.h +2 -0
@@ -125,6 +125,7 @@ struct afx_hdl {* @gon_req_action: about to send go negotiation requets frame. * @block_gon_req_tx: drop tx go negotiation requets frame. * @p2pdev_dynamically: is p2p device if created by module param or supplicant. +* @wait_for_offchan_complete: wait for off-channel tx completion event. */ struct brcmf_p2p_info {struct brcmf_cfg80211_info *cfg;
@@ -146,6 +147,7 @@ struct brcmf_p2p_info {bool gon_req_action;bool block_gon_req_tx;bool p2pdev_dynamically; +bool wait_for_offchan_complete; };s32 brcmf_p2p_attach (struct brcmf_cfg80211_info *cfg,bool p2pdev_forced);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 135/159 NFSv4.x: fix lock recovery during delegation recall
In reply to Greg Kroah-HartmanFrom: Olga Kornievskaia <[email protected]>
[ Upstream commit 44f411c353bf6d98d5a34f8f1b8605d43b2e50b8 ]
Running "./nfstest_delegation --runtest recall26" uncovers that client doesn't recover the lock when we have an appending open, where the initial open got a write delegation.
Instead of checking for the passed in open context against the file lock's open context. Check that the state is the same.
--- fs/nfs/delegation.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
fs/nfs/delegation.c +3 -3
@@ -101,7 +101,7 @@ int nfs4_check_delegation(struct inode *inode, fmode_t flags)return nfs4_do_check_delegation (inode, flags, false); } -static int nfs_delegation_claim_locks (struct nfs_open_context *ctx,struct nfs4_state *state,const nfs4_stateid *stateid) +static int nfs_delegation_claim_locks (struct nfs4_state *state,const nfs4_stateid *stateid) {struct inode *inode = state->inode;struct file_lock *fl;
@@ -116,7 +116,7 @@ static int nfs_delegation_claim_locks(struct nfs_open_context *ctx, struct nfs4_spin_lock (&flctx->flc_lock); restart:list_for_each_entry (fl, list, fl_list) { -if (nfs_file_open_context (fl->fl_file) != ctx) +if (nfs_file_open_context (fl->fl_file)->state != state)continue ;spin_unlock (&flctx->flc_lock); status =nfs4_lock_delegation_recall (fl, state, stateid);
@@ -163,7 +163,7 @@ static int nfs_delegation_claim_opens(struct inode *inode, seq =raw_seqcount_begin (&sp->so_reclaim_seqcount); err =nfs4_open_delegation_recall (ctx, state, stateid, type);if (!err) - err =nfs_delegation_claim_locks (ctx, state, stateid); + err =nfs_delegation_claim_locks (state, stateid);if (!err &&read_seqcount_retry (&sp->so_reclaim_seqcount, seq)) err = -EAGAIN ;mutex_unlock (&sp->so_delegreturn_mutex);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 136/159 dmaengine: ioat: fix prototype of ioat_enumerate_channels
In reply to Greg Kroah-HartmanFrom: Rami Rosen <[email protected]>
[ Upstream commit f4d34aa8c887a8a2d23ef546da0efa10e3f77241 ]
--- drivers/dma/ioat/init.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/dma/ioat/init.c +3 -4
@@ -128,7 +128,7 @@ static void ioat_init_channel(struct ioatdma_device *ioat_dma, struct ioatdma_chan *ioat_chan, int idx);static void ioat_intr_quirk (struct ioatdma_device *ioat_dma); -static int ioat_enumerate_channels (struct ioatdma_device *ioat_dma); +static void ioat_enumerate_channels (struct ioatdma_device *ioat_dma);static int ioat3_dma_self_test (struct ioatdma_device *ioat_dma);static int ioat_dca_enabled =1 ;
@@ -593,7 +593,7 @@ static void ioat_dma_remove(struct ioatdma_device *ioat_dma)* ioat_enumerate_channels - find and initialize the device's channels * @ioat_dma: the ioat dma device to be enumerated */ -static int ioat_enumerate_channels (struct ioatdma_device *ioat_dma) +static void ioat_enumerate_channels (struct ioatdma_device *ioat_dma) {struct ioatdma_chan *ioat_chan;struct device *dev = &ioat_dma->pdev->dev;
@@ -612,7 +612,7 @@ static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma) xfercap_log =readb (ioat_dma->reg_base +IOAT_XFERCAP_OFFSET ); xfercap_log &=0x1f ;/* bits [4:0] valid */ if (xfercap_log ==0 ) -return 0 ; +return ;dev_dbg (dev,"%s: xfercap = %d\n" , __func__,1 << xfercap_log);for (i =0 ; i < dma->chancnt; i++) {
@@ -629,7 +629,6 @@ static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma) } } dma->chancnt = i; -return i; }/**
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 137/159 Input: st1232 - set INPUT_PROP_DIRECT property
In reply to Greg Kroah-HartmanFrom: Martin Kepplinger <[email protected]>
[ Upstream commit 20bbb312079494a406c10c90932e3c80837c9d94 ]
This is how userspace checks for touchscreen devices most reliably.
--- drivers/input/touchscreen/st1232.c | 1 + 1 file changed, 1 insertion(+)
drivers/input/touchscreen/st1232.c +1 -0
@@ -203,6 +203,7 @@ static int st1232_ts_probe(struct i2c_client *client, input_dev->id.bustype =BUS_I2C ; input_dev->dev.parent = &client->dev; +__set_bit (INPUT_PROP_DIRECT , input_dev->propbit);__set_bit (EV_SYN , input_dev->evbit);__set_bit (EV_KEY , input_dev->evbit);__set_bit (EV_ABS , input_dev->evbit);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 138/159 x86/olpc: Fix build error with CONFIG_MFD_CS5535=m
In reply to Greg Kroah-HartmanFrom: Borislav Petkov <[email protected]>
[ Upstream commit fa112cf1e8bc693d5a666b1c479a2859c8b6e0f1 ]
When building a 32-bit config which has the above MFD item as module but OLPC_XO1_PM is enabled =y - which is bool, btw - the kernel fails building with:
ld: arch/x86/platform/olpc/olpc-xo1-pm.o: in function `xo1_pm_remove':
/home/boris/kernel/linux/arch/x86/platform/olpc/olpc-xo1-pm.c:159: undefined reference to `mfd_cell_disable'
ld: arch/x86/platform/olpc/olpc-xo1-pm.o: in function `xo1_pm_probe':
/home/boris/kernel/linux/arch/x86/platform/olpc/olpc-xo1-pm.c:133: undefined reference to `mfd_cell_enable'
make: *** [Makefile:1030: vmlinux] Error 1
Force MFD_CS5535 to y if OLPC_XO1_PM is enabled.
--- arch/x86/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/Kconfig +1 -2
@@ -2526,8 +2526,7 @@ config OLPC config OLPC_XO1_PM bool "OLPC XO-1 Power Management" - depends on OLPC && MFD_CS5535 && PM_SLEEP - select MFD_CORE + depends on OLPC && MFD_CS5535=y && PM_SLEEP ---help--- Add support for poweroff and suspend of the OLPC XO-1 laptop.
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 139/159 crypto: mxs-dcp - Fix SHA null hashes and output length
In reply to Greg Kroah-HartmanFrom: Radu Solea <[email protected]>
[ Upstream commit c709eebaf5c5faa8a0f140355f9cfe67e8f7afb1 ]
DCP writes at least 32 bytes in the output buffer instead of hash length as documented. Add intermediate buffer to prevent write out of bounds.
When requested to produce null hashes DCP fails to produce valid output. Add software workaround to bypass hardware and return valid output.
--- drivers/crypto/mxs-dcp.c | 47 +++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 10 deletions(-)
drivers/crypto/mxs-dcp.c +37 -10
@@ -28,9 +28,24 @@#define DCP_MAX_CHANS 4#define DCP_BUF_SZ PAGE_SIZE +#define DCP_SHA_PAY_SZ 64#define DCP_ALIGNMENT 64 +/* +* Null hashes to align with hw behavior on imx6sl and ull +* these are flipped for consistency with hw output +*/ +const uint8_t sha1_null_hash[] = +"\x09\x07\xd8\xaf\x90\x18\x60\x95\xef\xbf" +"\x55\x32\x0d\x4b\x6b\x5e\xee\xa3\x39\xda" ; + +const uint8_t sha256_null_hash[] = +"\x55\xb8\x52\x78\x1b\x99\x95\xa4" +"\x4c\x93\x9b\x64\xe4\x41\xae\x27" +"\x24\xb9\x6f\x99\xc8\xf4\xfb\x9a" +"\x14\x1c\xfc\x98\x42\xc4\xb0\xe3" ; +/* DCP DMA descriptor. */ struct dcp_dma_desc {uint32_t next_cmd_addr;
@@ -48,6 +63,7 @@ struct dcp_coherent_block {uint8_t aes_in_buf[DCP_BUF_SZ ];uint8_t aes_out_buf[DCP_BUF_SZ ];uint8_t sha_in_buf[DCP_BUF_SZ ]; +uint8_t sha_out_buf[DCP_SHA_PAY_SZ ];uint8_t aes_key[2 *AES_KEYSIZE_128 ];
@@ -518,8 +534,6 @@ static int mxs_dcp_run_sha(struct ahash_request *req)struct crypto_ahash *tfm =crypto_ahash_reqtfm (req);struct dcp_async_ctx *actx =crypto_ahash_ctx (tfm);struct dcp_sha_req_ctx *rctx =ahash_request_ctx (req); -struct hash_alg_common *halg =crypto_hash_alg_common (tfm); -struct dcp_dma_desc *desc = &sdcp->coh->desc[actx->chan];dma_addr_t digest_phys =0 ;
@@ -541,10 +555,23 @@ static int mxs_dcp_run_sha(struct ahash_request *req) desc->payload =0 ; desc->status =0 ; +/* +* Align driver with hw behavior when generating null hashes +*/ +if (rctx->init && rctx->fini && desc->size ==0 ) { +struct hash_alg_common *halg =crypto_hash_alg_common (tfm); +const uint8_t *sha_buf = + (actx->alg ==MXS_DCP_CONTROL1_HASH_SELECT_SHA1 ) ? + sha1_null_hash : sha256_null_hash; +memcpy (sdcp->coh->sha_out_buf, sha_buf, halg->digestsize); + ret =0 ; + goto done_run; + } +/* Set HASH_TERM bit for last transfer block. */ if (rctx->fini) { - digest_phys =dma_map_single (sdcp->dev, req->result, - halg->digestsize,DMA_FROM_DEVICE ); + digest_phys =dma_map_single (sdcp->dev, sdcp->coh->sha_out_buf, +DCP_SHA_PAY_SZ ,DMA_FROM_DEVICE ); desc->control0 |=MXS_DCP_CONTROL0_HASH_TERM ; desc->payload = digest_phys; }
@@ -552,9 +579,10 @@ static int mxs_dcp_run_sha(struct ahash_request *req) ret =mxs_dcp_start_dma (actx);if (rctx->fini) -dma_unmap_single (sdcp->dev, digest_phys, halg->digestsize, +dma_unmap_single (sdcp->dev, digest_phys,DCP_SHA_PAY_SZ ,DMA_FROM_DEVICE ); +done_run:dma_unmap_single (sdcp->dev, buf_phys,DCP_BUF_SZ ,DMA_TO_DEVICE );return ret;
@@ -572,6 +600,7 @@ static int dcp_sha_req_to_buf(struct crypto_async_request *arq)const int nents =sg_nents (req->src);uint8_t *in_buf = sdcp->coh->sha_in_buf; +uint8_t *out_buf = sdcp->coh->sha_out_buf;uint8_t *src_buf;
@@ -626,11 +655,9 @@ static int dcp_sha_req_to_buf(struct crypto_async_request *arq) actx->fill =0 ; -/* For some reason, the result is flipped. */ -for (i =0 ; i < halg->digestsize /2 ; i++) { -swap (req->result[i], - req->result[halg->digestsize - i -1 ]); - } +/* For some reason the result is flipped */ +for (i =0 ; i < halg->digestsize; i++) + req->result[i] = out_buf[halg->digestsize - i -1 ]; }return 0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 140/159 crypto: mxs-dcp - Fix AES issues
In reply to Greg Kroah-HartmanFrom: Radu Solea <[email protected]>
[ Upstream commit fadd7a6e616b89c7f4f7bfa7b824f290bab32c3c ]
The DCP driver does not obey cryptlen, when doing android CTS this results in passing to hardware input stream lengths which are not multiple of block size.
Add a check to prevent future erroneous stream lengths from reaching the hardware and adjust the scatterlist walking code to obey cryptlen.
Also properly copy-out the IV for chaining.
--- drivers/crypto/mxs-dcp.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-)
drivers/crypto/mxs-dcp.c +31 -2
@@ -225,6 +225,12 @@ static int mxs_dcp_run_aes(struct dcp_async_ctx *actx,dma_addr_t dst_phys =dma_map_single (sdcp->dev, sdcp->coh->aes_out_buf,DCP_BUF_SZ ,DMA_FROM_DEVICE ); +if (actx->fill %AES_BLOCK_SIZE ) { +dev_err (sdcp->dev,"Invalid block size!\n" ); + ret = -EINVAL ; + goto aes_done_run; + } +/* Fill in the DMA descriptor. */ desc->control0 =MXS_DCP_CONTROL0_DECR_SEMAPHORE | MXS_DCP_CONTROL0_INTERRUPT |
@@ -254,6 +260,7 @@ static int mxs_dcp_run_aes(struct dcp_async_ctx *actx, ret =mxs_dcp_start_dma (actx); +aes_done_run:dma_unmap_single (sdcp->dev, key_phys,2 *AES_KEYSIZE_128 ,DMA_TO_DEVICE );dma_unmap_single (sdcp->dev, src_phys,DCP_BUF_SZ ,DMA_TO_DEVICE );
@@ -280,13 +287,15 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq)uint8_t *out_tmp, *src_buf, *dst_buf =NULL ;uint32_t dst_off =0 ; +uint32_t last_out_len =0 ;uint8_t *key = sdcp->coh->aes_key;int ret =0 ;int split =0 ; -unsigned int i, len, clen, rem =0 ; +unsigned int i, len, clen, rem =0 , tlen =0 ;int init =0 ; +bool limit_hit = false; actx->fill =0 ;
@@ -305,6 +314,11 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq)for_each_sg (req->src, src, nents, i) { src_buf =sg_virt (src); len =sg_dma_len (src); + tlen += len; + limit_hit = tlen > req->nbytes; + +if (limit_hit) + len = req->nbytes - (tlen - len); do { if (actx->fill + len > out_off)
@@ -321,13 +335,15 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq)* If we filled the buffer or this is the last SG, * submit the buffer. */ -if (actx->fill == out_off ||sg_is_last (src)) { +if (actx->fill == out_off ||sg_is_last (src) || + limit_hit) { ret =mxs_dcp_run_aes (actx, req, init);if (ret)return ret; init =0 ; out_tmp = out_buf; + last_out_len = actx->fill;while (dst && actx->fill) {if (!split) { dst_buf =sg_virt (dst);
@@ -350,6 +366,19 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq) } } }while (len); + +if (limit_hit) +break ; + } + +/* Copy the IV for CBC for chaining */ +if (!rctx->ecb) { +if (rctx->enc) +memcpy (req->info, out_buf+(last_out_len-AES_BLOCK_SIZE ), +AES_BLOCK_SIZE ); +else +memcpy (req->info, in_buf+(last_out_len-AES_BLOCK_SIZE ), +AES_BLOCK_SIZE ); }return ret;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 141/159 ACPI / SBS: Fix rare oops when removing modules
In reply to Greg Kroah-HartmanFrom: Ronald Tschalär <[email protected]>
[ Upstream commit 757c968c442397f1249bb775a7c8c03842e3e0c7 ]
There was a small race when removing the sbshc module where smbus_alarm() had queued acpi_smbus_callback() for deferred execution but it hadn't been run yet, so that when it did run hc had been freed and the module unloaded, resulting in an invalid paging request.
A similar race existed when removing the sbs module with regards to acpi_sbs_callback() (which is called from acpi_smbus_callback()).
We therefore need to ensure no callbacks are pending or executing before the cleanups are done and the modules are removed.
--- drivers/acpi/osl.c | 1 + drivers/acpi/sbshc.c | 2 ++ 2 files changed, 3 insertions(+)
drivers/acpi/osl.c +1 -0
@@ -1186,6 +1186,7 @@ void acpi_os_wait_events_complete(void)flush_workqueue (kacpid_wq);flush_workqueue (kacpi_notify_wq); } +EXPORT_SYMBOL (acpi_os_wait_events_complete);struct acpi_hp_work {struct work_struct work;
drivers/acpi/sbshc.c +2 -0
@@ -196,6 +196,7 @@ int acpi_smbus_unregister_callback(struct acpi_smb_hc *hc) hc->callback =NULL ; hc->context =NULL ;mutex_unlock (&hc->lock); +acpi_os_wait_events_complete ();return 0 ; }
@@ -292,6 +293,7 @@ static int acpi_smbus_hc_remove(struct acpi_device *device) hc =acpi_driver_data (device);acpi_ec_remove_query_handler (hc->ec, hc->query_bit); +acpi_os_wait_events_complete ();kfree (hc); device->driver_data =NULL ;return 0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 142/159 fbdev: sbuslib: use checked version of put_user()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit d8bad911e5e55e228d59c0606ff7e6b8131ca7bf ]
I'm not sure why the code assumes that only the first put_user() needs an access_ok() check. I have made all the put_user() and get_user() calls checked.
--- drivers/video/fbdev/sbuslib.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
drivers/video/fbdev/sbuslib.c +13 -13
@@ -105,11 +105,11 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,struct fbtype __user *f = (struct fbtype __user *) arg;if (put_user (type, &f->fb_type) || -__put_user (info->var.yres, &f->fb_height) || -__put_user (info->var.xres, &f->fb_width) || -__put_user (fb_depth, &f->fb_depth) || -__put_user (0 , &f->fb_cmsize) || -__put_user (fb_size, &f->fb_cmsize)) +put_user (info->var.yres, &f->fb_height) || +put_user (info->var.xres, &f->fb_width) || +put_user (fb_depth, &f->fb_depth) || +put_user (0 , &f->fb_cmsize) || +put_user (fb_size, &f->fb_cmsize))return -EFAULT ;return 0 ; }
@@ -124,10 +124,10 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,unsigned int index, count, i;if (get_user (index, &c->index) || -__get_user (count, &c->count) || -__get_user (ured, &c->red) || -__get_user (ugreen, &c->green) || -__get_user (ublue, &c->blue)) +get_user (count, &c->count) || +get_user (ured, &c->red) || +get_user (ugreen, &c->green) || +get_user (ublue, &c->blue))return -EFAULT ; cmap.len =1 ;
@@ -164,10 +164,10 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,u8 red, green, blue;if (get_user (index, &c->index) || -__get_user (count, &c->count) || -__get_user (ured, &c->red) || -__get_user (ugreen, &c->green) || -__get_user (ublue, &c->blue)) +get_user (count, &c->count) || +get_user (ured, &c->red) || +get_user (ugreen, &c->green) || +get_user (ublue, &c->blue))return -EFAULT ;if (index + count > cmap->len)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 143/159 fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit e5017716adb8aa5c01c52386c1b7470101ffe9c5 ]
The "index + count" addition can overflow. Both come directly from the user. This bug leads to an information leak.
--- drivers/video/fbdev/sbuslib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/sbuslib.c +1 -1
@@ -170,7 +170,7 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, get_user(ublue, &c->blue))return -EFAULT ; -if (index + count > cmap->len) +if (index > cmap->len || count > cmap->len - index)return -EINVAL ;for (i =0 ; i < count; i++) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 144/159 bcache: recal cached_dev_sectors on detach
In reply to Greg Kroah-HartmanFrom: Shenghui Wang <[email protected]>
[ Upstream commit 46010141da6677b81cc77f9b47f8ac62bd1cbfd3 ]
Recal cached_dev_sectors on cached_dev detached, as recal done on cached_dev attached.
Update the cached_dev_sectors before bcache_device_detach called as bcache_device_detach will set bcache_device->c to NULL.
--- drivers/md/bcache/super.c | 1 + 1 file changed, 1 insertion(+)
drivers/md/bcache/super.c +1 -0
@@ -902,6 +902,7 @@ static void cached_dev_detach_finish(struct work_struct *w)bch_write_bdev_super (dc, &cl);closure_sync (&cl); +calc_cached_dev_sectors (dc->disk.c);bcache_device_detach (&dc->disk);list_move (&dc->list, &uncached_devices);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 145/159 proc/vmcore: Fix i386 build error of missing copy_oldmem_page_encrypted()
In reply to Greg Kroah-HartmanFrom: Borislav Petkov <[email protected]>
[ Upstream commit cf089611f4c446285046fcd426d90c18f37d2905 ]
Lianbo reported a build error with a particular 32-bit config, see Link below for details.
Provide a weak copy_oldmem_page_encrypted() function which architectures can override, in the same manner other functionality in that file is supplied.
--- fs/proc/vmcore.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
fs/proc/vmcore.c +10 -0
@@ -164,6 +164,16 @@ int __weak remap_oldmem_pfn_range(struct vm_area_struct *vma,return remap_pfn_range (vma, from, pfn, size, prot); } +/* +* Architectures which support memory encryption override this. +*/ +ssize_t __weak +copy_oldmem_page_encrypted (unsigned long pfn,char *buf,size_t csize, +unsigned long offset,int userbuf) +{ +return copy_oldmem_page (pfn, buf, csize, offset, userbuf); +} +/* * Copy to either kernel or user space */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 146/159 backlight: lm3639: Unconditionally call led_classdev_unregister
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
[ Upstream commit 7cea645ae9c5a54aa7904fddb2cdf250acd63a6c ]
Clang warns that the address of a pointer will always evaluated as true in a boolean context.
drivers/video/backlight/lm3639_bl.c:403:14: warning: address of 'pchip->cdev_torch' will always evaluate to 'true' [-Wpointer-bool-conversion]
if (&pchip->cdev_torch)
~~ ~~~~~~~^~~~~~~~~~
drivers/video/backlight/lm3639_bl.c:405:14: warning: address of
'pchip->cdev_flash' will always evaluate to 'true'
[-Wpointer-bool-conversion]
if (&pchip->cdev_flash)
~~ ~~~~~~~^~~~~~~~~~2 warnings generated.
These statements have been present since 2012, introduced by commit 0f59858d5119 ("backlight: add new lm3639 backlight driver"). Given that they have been called unconditionally since then presumably without any issues, removing the always true if statements to fix the warnings without any real world changes.
--- drivers/video/backlight/lm3639_bl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/video/backlight/lm3639_bl.c +2 -4
@@ -400,10 +400,8 @@ static int lm3639_remove(struct i2c_client *client)regmap_write (pchip->regmap,REG_ENABLE ,0x00 ); -if (&pchip->cdev_torch) -led_classdev_unregister (&pchip->cdev_torch); -if (&pchip->cdev_flash) -led_classdev_unregister (&pchip->cdev_flash); +led_classdev_unregister (&pchip->cdev_torch); +led_classdev_unregister (&pchip->cdev_flash);if (pchip->bled)device_remove_file (&(pchip->bled->dev), &dev_attr_bled_mode);return 0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 147/159 printk: Give error on attempt to set log buffer length to over 2G
In reply to Greg Kroah-HartmanFrom: He Zhe <[email protected]>
[ Upstream commit e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e ]
The current printk() is ready to handle log buffer size up to 2G. Give an explicit error for users who want to use larger log buffer.
Also fix printk formatting to show the 2G as a positive number.
--- kernel/printk/printk.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
kernel/printk/printk.c +12 -6
@@ -279,6 +279,7 @@ static u32 clear_idx;#define LOG_ALIGN __alignof__(struct printk_log)#endif #define __LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT) +#define LOG_BUF_LEN_MAX (u32)(1 << 31)static char __log_buf[__LOG_BUF_LEN]__aligned(LOG_ALIGN) ;static char *log_buf = __log_buf;static u32 log_buf_len = __LOG_BUF_LEN;
@@ -870,18 +871,23 @@ void log_buf_kexec_setup(void)static unsigned long __initdata new_log_buf_len;/* we practice scaling the ring buffer by powers of 2 */ -static void __init log_buf_len_update (unsigned size) +static void __init log_buf_len_update (u64 size) { +if (size > (u64 )LOG_BUF_LEN_MAX ) { + size = (u64 )LOG_BUF_LEN_MAX ; +pr_err ("log_buf over 2G is not supported.\n" ); + } +if (size) size =roundup_pow_of_two (size);if (size > log_buf_len) - new_log_buf_len = size; + new_log_buf_len = (unsigned long )size; }/* save requested log_buf_len since it's too early to process it */ static int __init log_buf_len_setup (char *str) { -unsigned int size; +u64 size;if (!str)return -EINVAL ;
@@ -951,7 +957,7 @@ void __init setup_log_buf(int early) }if (unlikely (!new_log_buf)) { -pr_err ("log_buf_len: %ld bytes not available\n" , +pr_err ("log_buf_len: %lu bytes not available\n" , new_log_buf_len);return ; }
@@ -964,8 +970,8 @@ void __init setup_log_buf(int early)memcpy (log_buf, __log_buf, __LOG_BUF_LEN);raw_spin_unlock_irqrestore (&logbuf_lock, flags); -pr_info ("log_buf_len: %d bytes\n" , log_buf_len); -pr_info ("early log buf free: %d(%d%%)\n" , +pr_info ("log_buf_len: %u bytes\n" , log_buf_len); +pr_info ("early log buf free: %u(%u%%)\n" , free, (free *100 ) / __LOG_BUF_LEN); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 148/159 media: isif: fix a NULL pointer dereference bug
In reply to Greg Kroah-HartmanFrom: Wenwen Wang <[email protected]>
[ Upstream commit a26ac6c1bed951b2066cc4b2257facd919e35c0b ]
In isif_probe(), there is a while loop to get the ISIF base address and linearization table0 and table1 address. In the loop body, the function platform_get_resource() is called to get the resource. If platform_get_resource() returns NULL, the loop is terminated and the execution goes to 'fail_nobase_res'. Suppose the loop is terminated at the first iteration because platform_get_resource() returns NULL and the execution goes to 'fail_nobase_res'. Given that there is another while loop at 'fail_nobase_res' and i equals to 0, one iteration of the second while loop will be executed. However, the second while loop does not check the return value of platform_get_resource(). This can cause a NULL pointer dereference bug if the return value is a NULL pointer.
This patch avoids the above issue by adding a check in the second while loop after the call to platform_get_resource().
--- drivers/media/platform/davinci/isif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/platform/davinci/isif.c +2 -1
@@ -1106,7 +1106,8 @@ static int isif_probe(struct platform_device *pdev)while (i >=0 ) { res =platform_get_resource (pdev,IORESOURCE_MEM , i); -release_mem_region (res->start,resource_size (res)); +if (res) +release_mem_region (res->start,resource_size (res)); i--; }vpfe_unregister_ccdc_device (&isif_hw_dev);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 149/159 GFS2: Flush the GFS2 delete workqueue before stopping the kernel threads
In reply to Greg Kroah-HartmanFrom: Tim Smith <[email protected]>
[ Upstream commit 1eb8d7387908022951792a46fa040ad3942b3b08 ]
Flushing the workqueue can cause operations to happen which might call gfs2_log_reserve(), or get stuck waiting for locks taken by such operations. gfs2_log_reserve() can io_schedule(). If this happens, it will never wake because the only thing which can wake it is gfs2_logd() which was already stopped.
This causes umount of a gfs2 filesystem to wedge permanently if, for example, the umount immediately follows a large delete operation.
When this occured, the following stack trace was obtained from the umount command
[<ffffffff81087968>] flush_workqueue+0x1c8/0x520 [<ffffffffa0666e29>] gfs2_make_fs_ro+0x69/0x160 [gfs2] [<ffffffffa0667279>] gfs2_put_super+0xa9/0x1c0 [gfs2] [<ffffffff811b7edf>] generic_shutdown_super+0x6f/0x100 [<ffffffff811b7ff7>] kill_block_super+0x27/0x70 [<ffffffffa0656a71>] gfs2_kill_sb+0x71/0x80 [gfs2] [<ffffffff811b792b>] deactivate_locked_super+0x3b/0x70 [<ffffffff811b79b9>] deactivate_super+0x59/0x60 [<ffffffff811d2998>] cleanup_mnt+0x58/0x80 [<ffffffff811d2a12>] __cleanup_mnt+0x12/0x20 [<ffffffff8108c87d>] task_work_run+0x7d/0xa0 [<ffffffff8106d7d9>] exit_to_usermode_loop+0x73/0x98 [<ffffffff81003961>] syscall_return_slowpath+0x41/0x50 [<ffffffff815a594c>] int_ret_from_sys_call+0x25/0x8f
[<ffffffffffffffff>] 0xffffffffffffffff
--- fs/gfs2/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/super.c +1 -1
@@ -835,10 +835,10 @@ static int gfs2_make_fs_ro(struct gfs2_sbd *sdp)if (error && !test_bit (SDF_SHUTDOWN , &sdp->sd_flags))return error; +flush_workqueue (gfs2_delete_workqueue);kthread_stop (sdp->sd_quotad_process);kthread_stop (sdp->sd_logd_process); -flush_workqueue (gfs2_delete_workqueue);gfs2_quota_sync (sdp->sd_vfs,0 );gfs2_statfs_sync (sdp->sd_vfs,0 );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 150/159 media: cx231xx: fix potential sign-extension overflow on large shift
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit 32ae592036d7aeaabcccb2b1715373a68639a768 ]
Shifting the u8 value[3] by an int can lead to sign-extension overflow. For example, if value[3] is 0xff and the shift is 24 then it is promoted to int and then the top bit is sign-extended so that all upper 32 bits are set. Fix this by casting value[3] to a u32 before the shift.
Detected by CoverityScan, CID#1016522 ("Unintended sign extension")
--- drivers/media/usb/cx231xx/cx231xx-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/usb/cx231xx/cx231xx-video.c +1 -1
@@ -1346,7 +1346,7 @@ int cx231xx_g_register(struct file *file, void *priv, ret =cx231xx_read_ctrl_reg (dev,VRT_GET_REGISTER , (u16 )reg->reg, value,4 ); reg->val = value[0 ] | value[1 ] <<8 | - value[2 ] <<16 | value[3 ] <<24 ; + value[2 ] <<16 | (u32 )value[3 ] <<24 ; reg->size =4 ;break ;case 1 :/* AFE - read byte */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 151/159 x86/kexec: Correct KEXEC_BACKUP_SRC_END off-by-one error
In reply to Greg Kroah-HartmanFrom: Bjorn Helgaas <[email protected]>
[ Upstream commit 51fbf14f2528a8c6401290e37f1c893a2412f1d3 ]
The only use of KEXEC_BACKUP_SRC_END is as an argument to walk_system_ram_res():
int crash_load_segments(struct kimage *image)
{
...
walk_system_ram_res(KEXEC_BACKUP_SRC_START, KEXEC_BACKUP_SRC_END,
image, determine_backup_region);walk_system_ram_res() expects "start, end" arguments that are inclusive, i.e., the range to be walked includes both the start and end addresses.
KEXEC_BACKUP_SRC_END was previously defined as (640 * 1024UL), which is the first address *past* the desired 0-640KB range.
Define KEXEC_BACKUP_SRC_END as (640 * 1024UL - 1) so the KEXEC_BACKUP_SRC region is [0-0x9ffff], not [0-0xa0000].
--- arch/x86/include/asm/kexec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/kexec.h +1 -1
@@ -66,7 +66,7 @@ struct kimage;/* Memory to backup during crash kdump */ #define KEXEC_BACKUP_SRC_START (0UL) -#define KEXEC_BACKUP_SRC_END (640 * 1024UL)/* 640K */ +#define KEXEC_BACKUP_SRC_END (640 * 1024UL - 1)/* 640K */ /* * CPU does not save ss and sp on stack if execution is already
Signature · 9 lines
2.20.1 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Greg Kroah-Hartman
maintainerPATCH 152/159 gpio: syscon: Fix possible NULL ptr usage
In reply to Greg Kroah-HartmanFrom: Marek Vasut <[email protected]>
[ Upstream commit 70728c29465bc4bfa7a8c14304771eab77e923c7 ]
The priv->data->set can be NULL while flags contains GPIO_SYSCON_FEAT_OUT and chip->set is valid pointer. This happens in case the controller uses the default GPIO setter. Always use chip->set to access the setter to avoid possible NULL pointer dereferencing.
--- drivers/gpio/gpio-syscon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-syscon.c +1 -1
@@ -127,7 +127,7 @@ static int syscon_gpio_dir_out(struct gpio_chip *chip, unsigned offset, int val) BIT(offs % SYSCON_REG_BITS)); } - priv->data->set (chip, offset, val); + chip->set (chip, offset, val);return 0 ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 153/159 spi: spidev: Fix OF tree warning logic
In reply to Greg Kroah-HartmanFrom: Trent Piepho <[email protected]>
[ Upstream commit 605b3bec73cbd74b4ac937b580cd0b47d1300484 ]
spidev will make a big fuss if a device tree node binds a device by using "spidev" as the node's compatible property.
However, the logic for this isn't looking for "spidev" in the compatible, but rather checking that the device is NOT compatible with spidev's list of devices.
This causes a false positive if a device not named "rohm,dh2228fv", etc. binds to spidev, even if a means other than putting "spidev" in the device tree was used. E.g., the sysfs driver_override attribute.
--- drivers/spi/spidev.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/spi/spidev.c +3 -5
@@ -713,11 +713,9 @@ static int spidev_probe(struct spi_device *spi)* compatible string, it is a Linux implementation thing * rather than a description of the hardware. */ -if (spi->dev.of_node && !of_match_device (spidev_dt_ids, &spi->dev)) { -dev_err (&spi->dev,"buggy DT: spidev listed directly in DT\n" ); -WARN_ON (spi->dev.of_node && - !of_match_device (spidev_dt_ids, &spi->dev)); - } +WARN (spi->dev.of_node && +of_device_is_compatible (spi->dev.of_node,"spidev" ), +"%pOF: buggy DT: spidev listed directly in DT\n" , spi->dev.of_node);/* Allocate driver data */ spidev =kzalloc (sizeof (*spidev),GFP_KERNEL );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 154/159 ARM: 8802/1: Call syscall_trace_exit even when system call skipped
In reply to Greg Kroah-HartmanFrom: Timothy E Baldwin <[email protected]>
[ Upstream commit f18aef742c8fbd68e280dff0a63ba0ca6ee8ad85 ]
On at least x86 and ARM64, and as documented in the ptrace man page a skipped system call will still cause a syscall exit ptrace stop.
Previous to this commit 32-bit ARM did not, resulting in strace being confused when seccomp skips system calls.
This change also impacts programs that use ptrace to skip system calls.
--- arch/arm/kernel/entry-common.S | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
arch/arm/kernel/entry-common.S +4 -5
@@ -261,16 +261,15 @@ __sys_trace: cmp scno, #-1 @ skip the syscall? bne 2b add sp, sp, #S_OFF @ restore stack - b ret_slow_syscall -__sys_trace_return: - str r0, [sp, #S_R0 + S_OFF]! @ save returned r0 +__sys_trace_return_nosave: + enable_irq_notrace mov r0, sp bl syscall_trace_exit b ret_slow_syscall -__sys_trace_return_nosave: - enable_irq_notrace +__sys_trace_return: + str r0, [sp, #S_R0 + S_OFF]! @ save returned r0 mov r0, sp bl syscall_trace_exit b ret_slow_syscall
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 155/159 hwmon: (pwm-fan) Silence error on probe deferral
In reply to Greg Kroah-HartmanFrom: Thierry Reding <[email protected]>
[ Upstream commit 9f67f7583e77fe5dc57aab3a6159c2642544eaad ]
Probe deferrals aren't actual errors, so silence the error message in case the PWM cannot yet be acquired.
--- drivers/hwmon/pwm-fan.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/hwmon/pwm-fan.c +6 -2
@@ -227,8 +227,12 @@ static int pwm_fan_probe(struct platform_device *pdev) ctx->pwm =devm_of_pwm_get (&pdev->dev, pdev->dev.of_node,NULL );if (IS_ERR (ctx->pwm)) { -dev_err (&pdev->dev,"Could not get PWM\n" ); -return PTR_ERR (ctx->pwm); + ret =PTR_ERR (ctx->pwm); + +if (ret != -EPROBE_DEFER ) +dev_err (&pdev->dev,"Could not get PWM: %d\n" , ret); + +return ret; }platform_set_drvdata (pdev, ctx);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 156/159 mac80211: minstrel: fix CCK rate group streams value
In reply to Greg Kroah-HartmanFrom: Felix Fietkau <[email protected]>
[ Upstream commit 80df9be67c44cb636bbc92caeddad8caf334c53c ]
Fixes a harmless underflow issue when CCK rates are actively being used
--- net/mac80211/rc80211_minstrel_ht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/mac80211/rc80211_minstrel_ht.c +1 -1
@@ -128,7 +128,7 @@#define CCK_GROUP \ [MINSTREL_CCK_GROUP] = { \ - .streams = 0, \ + .streams = 1, \ .flags = 0, \ .duration = { \ CCK_DURATION_LIST(false), \
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 157/159 spi: rockchip: initialize dma_slave_config properly
In reply to Greg Kroah-HartmanFrom: Huibin Hong <[email protected]>
[ Upstream commit dd8fd2cbc73f8650f651da71fc61a6e4f30c1566 ]
The rxconf and txconf structs are allocated on the stack, so make sure we zero them before filling out the relevant fields.
--- drivers/spi/spi-rockchip.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/spi/spi-rockchip.c +3 -0
@@ -444,6 +444,9 @@ static void rockchip_spi_prepare_dma(struct rockchip_spi *rs)struct dma_slave_config rxconf, txconf;struct dma_async_tx_descriptor *rxdesc, *txdesc; +memset (&rxconf,0 ,sizeof (rxconf)); +memset (&txconf,0 ,sizeof (txconf)); +spin_lock_irqsave (&rs->lock, flags); rs->state &= ~RXBUSY ; rs->state &= ~TXBUSY ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 158/159 ARM: dts: omap5: Fix dual-role mode on Super-Speed port
In reply to Greg Kroah-HartmanFrom: Roger Quadros <[email protected]>
[ Upstream commit a763ecc15d0e37c3a15ff6825183061209832685 ]
OMAP5's Super-Speed USB port has a software mailbox register that needs to be fed with VBUS and ID events from an external VBUS/ID comparator.
Without this, Host role will not work correctly.
--- arch/arm/boot/dts/omap5-board-common.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/omap5-board-common.dtsi +1 -0
@@ -634,6 +634,7 @@ }; &dwc3 { + extcon = <&extcon_usb3>; dr_mode = "otg"; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 159/159 arm64: uaccess: Ensure PAN is re-enabled after unhandled uaccess fault
In reply to Greg Kroah-HartmanFrom: Pavel Tatashin <[email protected]>
commit 94bb804e1e6f0a9a77acf20d7c70ea141c6c821e upstream.
A number of our uaccess routines ('__arch_clear_user()' and '__arch_copy_{in,from,to}_user()') fail to re-enable PAN if they encounter an unhandled fault whilst accessing userspace.
For CPUs implementing both hardware PAN and UAO, this bug has no effect when both extensions are in use by the kernel.
For CPUs implementing hardware PAN but not UAO, this means that a kernel using hardware PAN may execute portions of code with PAN inadvertently disabled, opening us up to potential security vulnerabilities that rely on userspace access from within the kernel which would usually be prevented by this mechanism. In other words, parts of the kernel run the same way as they would on a CPU without PAN implemented/emulated at all.
For CPUs not implementing hardware PAN and instead relying on software emulation via 'CONFIG_ARM64_SW_TTBR0_PAN=y', the impact is unfortunately much worse. Calling 'schedule()' with software PAN disabled means that the next task will execute in the kernel using the page-table and ASID of the previous process even after 'switch_mm()', since the actual hardware switch is deferred until return to userspace. At this point, or if there is a intermediate call to 'uaccess_enable()', the page-table and ASID of the new process are installed. Sadly, due to the changes introduced by KPTI, this is not an atomic operation and there is a very small window (two instructions) where the CPU is configured with the page-table of the old task and the ASID of the new task; a speculative access in this state is disastrous because it would corrupt the TLB entries for the new task with mappings from the previous address space.
As Pavel explains:
| I was able to reproduce memory corruption problem on Broadcom's SoC
| ARMv8-A like this:
|
| Enable software perf-events with PERF_SAMPLE_CALLCHAIN so userland's
| stack is accessed and copied.
|
| The test program performed the following on every CPU and forking
| many processes:
|
| unsigned long *map = mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE,
| MAP_SHARED | MAP_ANONYMOUS, -1, 0);
| map[0] = getpid();
| sched_yield();
| if (map[0] != getpid()) {
| fprintf(stderr, "Corruption detected!");
| }
| munmap(map, PAGE_SIZE);
|
| From time to time I was getting map[0] to contain pid for a
| different process.Ensure that PAN is re-enabled when returning after an unhandled user fault from our uaccess routines.
--- arch/arm64/lib/clear_user.S | 2 ++ arch/arm64/lib/copy_from_user.S | 2 ++ arch/arm64/lib/copy_in_user.S | 2 ++ arch/arm64/lib/copy_to_user.S | 2 ++ 4 files changed, 8 insertions(+)
arch/arm64/lib/clear_user.S +2 -0
@@ -62,5 +62,7 @@ ENDPROC(__clear_user) .section .fixup,"ax" .align 2 9: mov x0, x2 // return the original size +ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \ + CONFIG_ARM64_PAN) ret .previous
arch/arm64/lib/copy_from_user.S +2 -0
@@ -85,5 +85,7 @@ ENDPROC(__copy_from_user) strb wzr, [dst], #1 // zero remaining buffer space cmp dst, end b.lo 9999b +ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \ + CONFIG_ARM64_PAN) ret .previous
arch/arm64/lib/copy_in_user.S +2 -0
@@ -81,5 +81,7 @@ ENDPROC(__copy_in_user) .section .fixup,"ax" .align 2 9998: sub x0, end, dst // bytes not copied +ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \ + CONFIG_ARM64_PAN) ret .previous
arch/arm64/lib/copy_to_user.S +2 -0
@@ -79,5 +79,7 @@ ENDPROC(__copy_to_user) .section .fixup,"ax" .align 2 9998: sub x0, end, dst // bytes not copied +ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \ + CONFIG_ARM64_PAN) ret .previous
Jon Hunter
maintainerQuoted 20 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.203 release. There are 159 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 24 Nov 2019 09:59:19 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.4.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
...
Quoted 2 lines
Marek Szyprowski <[email protected]>
ARM: dts: exynos: Disable pull control for S5M8767 PMIC
The above commit is causing the following build error for ARM ...
Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error FATAL ERROR: Unable to parse input treescripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1
Cheers
Jon
Signature · 1 line
nvpublic
Jon Hunter
maintainerQuoted 28 lines · Jon Hunter
Quoted 20 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.203 release. There are 159 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 24 Nov 2019 09:59:19 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.4.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:...
Quoted 2 lines
Marek Szyprowski <[email protected]>
ARM: dts: exynos: Disable pull control for S5M8767 PMIC
Quoted 6 lines
The above commit is causing the following build error for ARM ...
Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1
FYI ... after reverting the above all the tests are passing for Tegra.
Jon
Signature · 1 line
nvpublic
Greg Kroah-Hartman
maintainerQuoted 28 lines · Jon Hunter
Quoted 20 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.203 release. There are 159 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 24 Nov 2019 09:59:19 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.4.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:...
Quoted 2 lines
Marek Szyprowski <[email protected]>
ARM: dts: exynos: Disable pull control for S5M8767 PMIC
Quoted 6 lines
The above commit is causing the following build error for ARM ...
Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1
Ugh. I'll go drop this from 4.4.y, is it also an issue in the 4.9.y tree?
thanks,
greg k-h
Greg Kroah-Hartman
maintainerQuoted 31 lines · Greg Kroah-Hartman
Quoted 30 lines · Jon Hunter
Quoted 20 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.203 release. There are 159 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 24 Nov 2019 09:59:19 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.4.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:...
Quoted 2 lines
Marek Szyprowski <[email protected]>
ARM: dts: exynos: Disable pull control for S5M8767 PMICThe above commit is causing the following build error for ARM ...
Quoted 7 lines
Quoted 4 lines
Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1Ugh. I'll go drop this from 4.4.y, is it also an issue in the 4.9.y tree?
Ah, I see your other email now, so I'll leave it in 4.9.y and push out a new 4.4.y tree now.
thanks,
greg k-h
Greg Kroah-Hartman
maintainerQuoted 37 lines · Greg Kroah-Hartman
Quoted 36 lines · Greg Kroah-Hartman
Quoted 34 lines · Jon Hunter
Quoted 20 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.203 release. There are 159 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 24 Nov 2019 09:59:19 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.4.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:...
Quoted 2 lines
Marek Szyprowski <[email protected]>
ARM: dts: exynos: Disable pull control for S5M8767 PMICThe above commit is causing the following build error for ARM ...
Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1
Quoted 5 lines
Quoted 2 lines
Ugh. I'll go drop this from 4.4.y, is it also an issue in the 4.9.y tree?
Ah, I see your other email now, so I'll leave it in 4.9.y and push out a new 4.4.y tree now.
-rc2 is out now, with that patch removed, thanks.
greg k-h
Jon Hunter
maintainerQuoted 38 lines · Greg Kroah-Hartman
Quoted 37 lines · Greg Kroah-Hartman
Quoted 36 lines · Greg Kroah-Hartman
Quoted 34 lines · Jon Hunter
Quoted 20 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.203 release. There are 159 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 24 Nov 2019 09:59:19 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.4.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:...
Quoted 2 lines
Marek Szyprowski <[email protected]>
ARM: dts: exynos: Disable pull control for S5M8767 PMICThe above commit is causing the following build error for ARM ...
Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Ugh. I'll go drop this from 4.4.y, is it also an issue in the 4.9.y tree?
Ah, I see your other email now, so I'll leave it in 4.9.y and push out a new 4.4.y tree now.
-rc2 is out now, with that patch removed, thanks.
Thanks. Well this is odd, now I see ...
Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found FATAL ERROR: Syntax error parsing input treescripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/omap5-igep0050.dtb' failed make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1 arch/arm/Makefile:338: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2
This is caused by the following commit ...
commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
Author: H. Nikolaus Schaller <[email protected]> Date: Fri Sep 28 17:54:00 2018 +0200
ARM: dts: omap5: enable OTG role for DWC3 controller
I was wondering why I did not see this before as it was listed in the original email but looking back at the git log of what I tested before, I don't see it ...
$ git log --oneline bc69c961f595..7bbe76363f8f arch/arm/boot b883613d6f68 ARM: tegra: apalis_t30: fix mmc1 cmd pull-up a1496418067c ARM: dts: tegra30: fix xcvr-setup-use-fuses e3c8a2e4d6b6 ARM: dts: ste: Fix SPI controller node names 1c9e00b657ad ARM: dts: ux500: Fix LCDA clock line muxing ec144e236880 ARM: dts: ux500: Correct SCU unit address 98c94b7bce20 ARM: dts: am335x-evm: fix number of cpsw 13b662ab1602 libfdt: Ensure INT_MAX is defined in libfdt_env.h 2b6e4587d0f5 ARM: dts: socfpga: Fix I2C bus unit-address error 1c4b78b0c003 ARM: dts: omap3-gta04: keep vpll2 always on 0c7dc0f3b2c3 ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot 3ecbffc9b6e4 ARM: dts: omap3-gta04: tvout: enable as display1 alias a787cf8ff717 ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files 83264404b9c9 ARM: dts: exynos: Disable pull control for S5M8767 PMIC dbe192b499b7 ARM: dts: pxa: fix power i2c base address f1a2904901ad ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook 9742b4c1d281 ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45
Anyway, not sure what happen there, but looks like the above omap5 commit also needs to be dropped. I think you also need to drop the following as there is a dependency between the two
...
commit 56bfbfd3fd46d250749fa4d5974147eb1e456a5b
Author: Roger Quadros <[email protected]> Date: Wed Dec 5 19:27:44 2018 +0200
ARM: dts: omap5: Fix dual-role mode on Super-Speed port
Cheers
Jon
Signature · 1 line
nvpublic
On 11/22/19 6:48 AM, Jon Hunter wrote:
[ ... ]
Quoted 8 lines
Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found FATAL ERROR: Syntax error parsing input tree
scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/omap5-igep0050.dtb' failed make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1arch/arm/Makefile:338: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2
Quoted 8 lines
This is caused by the following commit ...
commit
d0abc07b3d752cbe2a8d315f662c53c772caed0fAuthor: H. Nikolaus Schaller <[email protected]> Date: Fri Sep 28 17:54:00 2018 +0200ARM: dts: omap5: enable OTG role for DWC3 controller
On top of the breakage caused by this patch, I would also argue that it is not a bug fix and should not have been included in the first place.
The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
Add l4 interconnect hierarchy and ti-sysc data"). Given the size of that patch, I highly doubt that a backport to 4.4 would work.
Guenter
Jon Hunter
maintainerQuoted 23 lines · Guenter Roeck
On 11/22/19 6:48 AM, Jon Hunter wrote:
[ ... ]
Quoted 10 lines
Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found
FATAL ERROR: Syntax error parsing input treescripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1arch/arm/Makefile:338: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2Quoted 8 lines
This is caused by the following commit ...
commit
d0abc07b3d752cbe2a8d315f662c53c772caed0f
Author: H. Nikolaus Schaller <[email protected]> Date: Fri Sep 28 17:54:00 2018 +0200ARM: dts: omap5: enable OTG role for DWC3 controller
Quoted 7 lines
On top of the breakage caused by this patch, I would also argue that it is not a bug fix and should not have been included in the first place.
The dwc3 label was added with commit
4c387984618fe("ARM: dts: omap5:
Add l4 interconnect hierarchy and ti-sysc data"). Given the size of that patch, I highly doubt that a backport to 4.4 would work.
FYI ... I am still seeing a build failure because of this with -rc2 ...
Test results for stable-v4.4:
6 builds: 3 pass, 3 fail
6 boots: 6 pass, 0 fail
11 tests: 11 pass, 0 failLinux version: 4.4.203-rc2-gdbaac4c54573
Boards tested: tegra124-jetson-tk1, tegra20-ventana,
tegra30-cardhu-a04
Cheers
Jon
Signature · 1 line
nvpublic
Greg Kroah-Hartman
maintainerQuoted 25 lines · Jon Hunter
Quoted 23 lines · Guenter Roeck
On 11/22/19 6:48 AM, Jon Hunter wrote:
[ ... ]
Quoted 18 lines
Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found
FATAL ERROR: Syntax error parsing input treescripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1arch/arm/Makefile:338: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2This is caused by the following commit ...
commit
d0abc07b3d752cbe2a8d315f662c53c772caed0f
Author: H. Nikolaus Schaller <[email protected]> Date: Fri Sep 28 17:54:00 2018 +0200ARM: dts: omap5: enable OTG role for DWC3 controller
Quoted 7 lines
Quoted 7 lines
On top of the breakage caused by this patch, I would also argue that it is not a bug fix and should not have been included in the first place.
The dwc3 label was added with commit
4c387984618fe("ARM: dts: omap5:
Add l4 interconnect hierarchy and ti-sysc data"). Given the size of that patch, I highly doubt that a backport to 4.4 would work.
Good catch, I have now dropped both of these patches and pushed out a -rc3
Quoted 1 line
FYI ... I am still seeing a build failure because of this with -rc2 ...
Can you see if -rc3 is also giving you problems?
thanks,
greg k-h
Jon Hunter
maintainerQuoted 34 lines · Greg Kroah-Hartman
Quoted 25 lines · Jon Hunter
Quoted 23 lines · Guenter Roeck
On 11/22/19 6:48 AM, Jon Hunter wrote:
[ ... ]
Quoted 18 lines
Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found
FATAL ERROR: Syntax error parsing input treescripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1arch/arm/Makefile:338: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2This is caused by the following commit ...
commit
d0abc07b3d752cbe2a8d315f662c53c772caed0f
Author: H. Nikolaus Schaller <[email protected]> Date: Fri Sep 28 17:54:00 2018 +0200ARM: dts: omap5: enable OTG role for DWC3 controller
Quoted 7 lines
Quoted 7 lines
On top of the breakage caused by this patch, I would also argue that it is not a bug fix and should not have been included in the first place.
The dwc3 label was added with commit
4c387984618fe("ARM: dts: omap5:
Add l4 interconnect hierarchy and ti-sysc data"). Given the size of that patch, I highly doubt that a backport to 4.4 would work.
Quoted 6 lines
Good catch, I have now dropped both of these patches and pushed out a -rc3
Quoted 1 line
FYI ... I am still seeing a build failure because of this with -rc2 ...
Can you see if -rc3 is also giving you problems?
Better, but I appear to be seeing some random suspend failures with this now on one board. I will try to bisect this.
Test results for stable-v4.4:
6 builds: 6 pass, 0 fail
12 boots: 12 pass, 0 fail
19 tests: 18 pass, 1 failLinux version: 4.4.203-rc3-g2576206c30b5
Boards tested: tegra124-jetson-tk1, tegra20-ventana,
tegra30-cardhu-a04
Cheers
Jon
Signature · 1 line
nvpublic
Greg Kroah-Hartman
maintainerQuoted 46 lines · Jon Hunter
Quoted 34 lines · Greg Kroah-Hartman
Quoted 25 lines · Jon Hunter
Quoted 23 lines · Guenter Roeck
On 11/22/19 6:48 AM, Jon Hunter wrote:
[ ... ]
Quoted 18 lines
Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found
FATAL ERROR: Syntax error parsing input treescripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1arch/arm/Makefile:338: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2This is caused by the following commit ...
commit
d0abc07b3d752cbe2a8d315f662c53c772caed0f
Author: H. Nikolaus Schaller <[email protected]> Date: Fri Sep 28 17:54:00 2018 +0200ARM: dts: omap5: enable OTG role for DWC3 controller
Quoted 7 lines
Quoted 7 lines
On top of the breakage caused by this patch, I would also argue that it is not a bug fix and should not have been included in the first place.
The dwc3 label was added with commit
4c387984618fe("ARM: dts: omap5:
Add l4 interconnect hierarchy and ti-sysc data"). Given the size of that patch, I highly doubt that a backport to 4.4 would work.Quoted 6 lines
Good catch, I have now dropped both of these patches and pushed out a -rc3
Quoted 1 line
FYI ... I am still seeing a build failure because of this with -rc2 ...
Can you see if -rc3 is also giving you problems?
Better, but I appear to be seeing some random suspend failures with this now on one board. I will try to bisect this.
Quoted 8 lines
Test results for stable-v4.4:
6 builds: 6 pass, 0 fail 12 boots: 12 pass, 0 fail 19 tests: 18 pass, 1 failLinux version: 4.4.203-rc3-g2576206c30b5
Boards tested: tegra124-jetson-tk1, tegra20-ventana,tegra30-cardhu-a04
Odd. If you find anything interesting, please let me know.
thanks for testing,
greg k-h
Jon Hunter
maintainerQuoted 52 lines · Greg Kroah-Hartman
Quoted 51 lines · Jon Hunter
Quoted 34 lines · Greg Kroah-Hartman
Quoted 25 lines · Jon Hunter
Quoted 23 lines · Guenter Roeck
On 11/22/19 6:48 AM, Jon Hunter wrote:
[ ... ]
Quoted 18 lines
Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found
FATAL ERROR: Syntax error parsing input treescripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1arch/arm/Makefile:338: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2This is caused by the following commit ...
commit
d0abc07b3d752cbe2a8d315f662c53c772caed0f
Author: H. Nikolaus Schaller <[email protected]> Date: Fri Sep 28 17:54:00 2018 +0200ARM: dts: omap5: enable OTG role for DWC3 controller
Quoted 7 lines
Quoted 7 lines
On top of the breakage caused by this patch, I would also argue that it is not a bug fix and should not have been included in the first place.
The dwc3 label was added with commit
4c387984618fe("ARM: dts: omap5:
Add l4 interconnect hierarchy and ti-sysc data"). Given the size of that patch, I highly doubt that a backport to 4.4 would work.Quoted 6 lines
Good catch, I have now dropped both of these patches and pushed out a -rc3
Quoted 1 line
FYI ... I am still seeing a build failure because of this with -rc2 ...
Can you see if -rc3 is also giving you problems?
Better, but I appear to be seeing some random suspend failures with this now on one board. I will try to bisect this.
Test results for stable-v4.4:
6 builds: 6 pass, 0 fail 12 boots: 12 pass, 0 fail 19 tests: 18 pass, 1 fail
Quoted 5 lines
Quoted 3 lines
Linux version: 4.4.203-rc3-g2576206c30b5
Boards tested: tegra124-jetson-tk1, tegra20-ventana,tegra30-cardhu-a04Odd. If you find anything interesting, please let me know.
Yes will do. Bisect has not found anything yet, so will keeping looking to see if this is a false-positive or not.
Cheers Jon
Signature · 1 line
nvpublic
Jon Hunter
maintainerQuoted 54 lines · Jon Hunter
Quoted 52 lines · Greg Kroah-Hartman
Quoted 51 lines · Jon Hunter
Quoted 34 lines · Greg Kroah-Hartman
Quoted 25 lines · Jon Hunter
Quoted 23 lines · Guenter Roeck
On 11/22/19 6:48 AM, Jon Hunter wrote:
[ ... ]
Quoted 18 lines
Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found
FATAL ERROR: Syntax error parsing input treescripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1arch/arm/Makefile:338: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2This is caused by the following commit ...
commit
d0abc07b3d752cbe2a8d315f662c53c772caed0f
Author: H. Nikolaus Schaller <[email protected]> Date: Fri Sep 28 17:54:00 2018 +0200ARM: dts: omap5: enable OTG role for DWC3 controller
Quoted 7 lines
Quoted 7 lines
On top of the breakage caused by this patch, I would also argue that it is not a bug fix and should not have been included in the first place.
The dwc3 label was added with commit
4c387984618fe("ARM: dts: omap5:
Add l4 interconnect hierarchy and ti-sysc data"). Given the size of that patch, I highly doubt that a backport to 4.4 would work.Quoted 6 lines
Good catch, I have now dropped both of these patches and pushed out a -rc3
Quoted 1 line
FYI ... I am still seeing a build failure because of this with -rc2 ...
Can you see if -rc3 is also giving you problems?
Better, but I appear to be seeing some random suspend failures with this now on one board. I will try to bisect this.
Test results for stable-v4.4:
6 builds: 6 pass, 0 fail 12 boots: 12 pass, 0 fail 19 tests: 18 pass, 1 fail
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Linux version: 4.4.203-rc3-g2576206c30b5
Boards tested: tegra124-jetson-tk1, tegra20-ventana,tegra30-cardhu-a04Odd. If you find anything interesting, please let me know.
Yes will do. Bisect has not found anything yet, so will keeping looking to see if this is a false-positive or not.
I have been doing some more testing and it appears that I see intermittent suspend failures on Tegra124 with linux-4.4.y. Apparently this issue has always been there and appears to be fixed in v4.5. I am still trying to find a way to fix this. The changes in v4.5 that appear to resolve this are too complex for stable (several patches in Tegra clk drivers). Anyway, ignore this for now, I will see how we can fix or workaround for linux-4.4.y.
Jon
Signature · 1 line
nvpublic
Greg Kroah-Hartman
maintainerQuoted 65 lines · Jon Hunter
Quoted 54 lines · Jon Hunter
Quoted 52 lines · Greg Kroah-Hartman
Quoted 51 lines · Jon Hunter
Quoted 34 lines · Greg Kroah-Hartman
Quoted 25 lines · Jon Hunter
Quoted 23 lines · Guenter Roeck
On 11/22/19 6:48 AM, Jon Hunter wrote:
[ ... ]
Quoted 18 lines
Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found
FATAL ERROR: Syntax error parsing input treescripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1arch/arm/Makefile:338: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2This is caused by the following commit ...
commit
d0abc07b3d752cbe2a8d315f662c53c772caed0f
Author: H. Nikolaus Schaller <[email protected]> Date: Fri Sep 28 17:54:00 2018 +0200ARM: dts: omap5: enable OTG role for DWC3 controller
Quoted 7 lines
Quoted 7 lines
On top of the breakage caused by this patch, I would also argue that it is not a bug fix and should not have been included in the first place.
The dwc3 label was added with commit
4c387984618fe("ARM: dts: omap5:
Add l4 interconnect hierarchy and ti-sysc data"). Given the size of that patch, I highly doubt that a backport to 4.4 would work.Quoted 6 lines
Good catch, I have now dropped both of these patches and pushed out a -rc3
Quoted 1 line
FYI ... I am still seeing a build failure because of this with -rc2 ...
Can you see if -rc3 is also giving you problems?
Better, but I appear to be seeing some random suspend failures with this now on one board. I will try to bisect this.
Test results for stable-v4.4:
6 builds: 6 pass, 0 fail 12 boots: 12 pass, 0 fail 19 tests: 18 pass, 1 failQuoted 8 lines
Quoted 5 lines
Quoted 3 lines
Linux version: 4.4.203-rc3-g2576206c30b5
Boards tested: tegra124-jetson-tk1, tegra20-ventana,tegra30-cardhu-a04Odd. If you find anything interesting, please let me know.
Yes will do. Bisect has not found anything yet, so will keeping looking to see if this is a false-positive or not.
Quoted 7 lines
I have been doing some more testing and it appears that I see intermittent suspend failures on Tegra124 with linux-4.4.y. Apparently this issue has always been there and appears to be fixed in v4.5. I am still trying to find a way to fix this. The changes in v4.5 that appear to resolve this are too complex for stable (several patches in Tegra clk drivers). Anyway, ignore this for now, I will see how we can fix or workaround for linux-4.4.y.
Ok, thanks for letting us know and good luck with it.
greg k-h
Quoted 34 lines · Greg Kroah-Hartman
Quoted 25 lines · Jon Hunter
Quoted 23 lines · Guenter Roeck
On 11/22/19 6:48 AM, Jon Hunter wrote:
[ ... ]
Quoted 18 lines
Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found
FATAL ERROR: Syntax error parsing input treescripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1arch/arm/Makefile:338: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2This is caused by the following commit ...
commit
d0abc07b3d752cbe2a8d315f662c53c772caed0f
Author: H. Nikolaus Schaller <[email protected]> Date: Fri Sep 28 17:54:00 2018 +0200ARM: dts: omap5: enable OTG role for DWC3 controller
Quoted 7 lines
Quoted 7 lines
On top of the breakage caused by this patch, I would also argue that it is not a bug fix and should not have been included in the first place.
The dwc3 label was added with commit
4c387984618fe("ARM: dts: omap5:
Add l4 interconnect hierarchy and ti-sysc data"). Given the size of that patch, I highly doubt that a backport to 4.4 would work.
Quoted 7 lines
Good catch, I have now dropped both of these patches and pushed out a -rc3
Quoted 1 line
FYI ... I am still seeing a build failure because of this with -rc2 ...
Can you see if -rc3 is also giving you problems?
For v4.4.202-157-g2576206c30b5:
Build results:
total: 170 pass: 170 fail: 0 Qemu test results: total: 324 pass: 324 fail: 0
Guenter
Greg Kroah-Hartman
maintainerQuoted 43 lines · Guenter Roeck
Quoted 34 lines · Greg Kroah-Hartman
Quoted 25 lines · Jon Hunter
Quoted 23 lines · Guenter Roeck
On 11/22/19 6:48 AM, Jon Hunter wrote:
[ ... ]
Quoted 18 lines
Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found
FATAL ERROR: Syntax error parsing input treescripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1arch/arm/Makefile:338: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2This is caused by the following commit ...
commit
d0abc07b3d752cbe2a8d315f662c53c772caed0f
Author: H. Nikolaus Schaller <[email protected]> Date: Fri Sep 28 17:54:00 2018 +0200ARM: dts: omap5: enable OTG role for DWC3 controller
Quoted 7 lines
Quoted 7 lines
On top of the breakage caused by this patch, I would also argue that it is not a bug fix and should not have been included in the first place.
The dwc3 label was added with commit
4c387984618fe("ARM: dts: omap5:
Add l4 interconnect hierarchy and ti-sysc data"). Given the size of that patch, I highly doubt that a backport to 4.4 would work.Quoted 7 lines
Good catch, I have now dropped both of these patches and pushed out a -rc3
Quoted 1 line
FYI ... I am still seeing a build failure because of this with -rc2 ...
Can you see if -rc3 is also giving you problems?
Quoted 6 lines
For v4.4.202-157-g2576206c30b5:
Build results:
total: 170 pass: 170 fail: 0 Qemu test results: total: 324 pass: 324 fail: 0
Thanks for testing, I'll go with this tree now.
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.203 release. There are 159 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 24 Nov 2019 09:59:19 +0000. Anything received after that time might be too late.
For v4.4.202-159-gdbaac4c54573:
Build results:
total: 170 pass: 168 fail: 2
Failed builds:
arm:allmodconfig
arm:omap2plus_defconfig
Qemu test results:
total: 325 pass: 307 fail: 18
Failed tests:
<many arm tests>
------------
Error log:
Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found FATAL ERROR: Syntax error parsing input tree
Guenter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.203 release. There are 159 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 24 Nov 2019 09:59:19 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.4.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Hello!
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.203 release. There are 159 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 24 Nov 2019 09:59:19 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.4.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Summary
------------------------------------------------------------------------
kernel: 4.4.203-rc2
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.4.y
git commit: dbaac4c54573d428113956f3e4c56f9d94920c28
git describe: v4.4.202-159-gdbaac4c54573
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.4-oe/build/v4.4.202-159-gdbaac4c54573
No regressions (compared to build v4.4.202)
No fixes (compared to build v4.4.202)
Ran 20213 total tests in the following environments and test suites.
Environments
--------------
- i386
- juno-r2 - arm64
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64
Test Suites
-----------
* build
* kselftest
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-open-posix-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* network-basic-tests
* perf
* prep-tmp-disk
* spectre-meltdown-checker-test
* kvm-unit-tests
* v4l2-compliance
* install-android-platform-tools-r2600
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
* ssuite
Summary
------------------------------------------------------------------------
kernel: 4.4.203-rc2
git repo: https://git.linaro.org/lkft/arm64-stable-rc.git
git branch: 4.4.203-rc2-hikey-20191122-613
git commit: fd5ba88e671977887fb59d54fa2697987c38931d
git describe: 4.4.203-rc2-hikey-20191122-613
Test details: https://qa-reports.linaro.org/lkft/linaro-hikey-stable-rc-4.4-oe/build/4.4.203-rc2-hikey-20191122-613
No regressions (compared to build 4.4.202-rc1-hikey-20191115-607)
No fixes (compared to build 4.4.202-rc1-hikey-20191115-607)
Ran 1605 total tests in the following environments and test suites.
Environments
--------------
- hi6220-hikey - arm64
Test Suites
-----------
* build
* install-android-platform-tools-r2600
* kselftest
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* perf
* spectre-meltdown-checker-test
* v4l2-compliance
Greetings!
Daniel Díaz
[email protected]
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org