Linux 4.9.136
Greg KH
maintainerI'm announcing the release of the 4.9.136 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/kernel-parameters.txt | 1 Makefile | 2 arch/arm/boot/compressed/efi-header.S | 4 arch/arm/boot/compressed/head.S | 17 + arch/arm/boot/dts/bcm283x.dtsi | 5 arch/arm/boot/dts/bcm63138.dtsi | 14 - arch/arm/boot/dts/imx53-qsb-common.dtsi | 11 + arch/arm/mm/ioremap.c | 2 arch/mips/include/uapi/asm/inst.h | 2 arch/mips/kernel/process.c | 11 - arch/sparc/Kconfig | 8 arch/sparc/mm/tlb.c | 19 +- arch/x86/events/intel/uncore_snbep.c | 12 - arch/x86/include/asm/fixmap.h | 10 - arch/x86/include/asm/percpu.h | 8 arch/x86/include/asm/pgtable_64.h | 3 arch/x86/kernel/cpu/cyrix.c | 1 arch/x86/kernel/head_64.S | 16 - arch/x86/kernel/paravirt.c | 4 arch/x86/kernel/time.c | 2 arch/x86/mm/pgtable.c | 9 - arch/x86/xen/mmu.c | 8 crypto/shash.c | 2 drivers/acpi/sysfs.c | 26 --- drivers/ata/ahci.c | 5 drivers/ata/libata-core.c | 2 drivers/ata/sata_rcar.c | 15 + drivers/block/nbd.c | 6 drivers/clk/samsung/clk-exynos5420.c | 2 drivers/gpio/gpio-mxs.c | 4 drivers/gpu/drm/bochs/bochs_fbdev.c | 9 - drivers/gpu/drm/drm_edid.c | 3 drivers/gpu/drm/msm/msm_gem.c | 20 +- drivers/gpu/ipu-v3/ipu-common.c | 15 - drivers/i2c/busses/i2c-bcm2835.c | 4 drivers/iio/adc/axp288_adc.c | 32 +++ drivers/iio/pressure/zpa2326.c | 10 - drivers/infiniband/core/ucm.c | 3 drivers/infiniband/core/ucma.c | 3 drivers/infiniband/core/verbs.c | 44 ++++- drivers/infiniband/hw/mlx4/mr.c | 7 drivers/infiniband/hw/mlx5/qp.c | 7 drivers/infiniband/sw/rxe/rxe_pool.c | 16 + drivers/infiniband/sw/rxe/rxe_verbs.c | 9 - drivers/infiniband/ulp/ipoib/ipoib_fs.c | 2 drivers/infiniband/ulp/ipoib/ipoib_ib.c | 20 -- drivers/input/mouse/elan_i2c_core.c | 1 drivers/mtd/spi-nor/spi-nor.c | 6 drivers/net/bonding/bond_main.c | 7 drivers/net/bonding/bond_netlink.c | 3 drivers/net/ethernet/amazon/ena/ena_netdev.c | 9 - drivers/net/ethernet/amd/declance.c | 10 - drivers/net/ethernet/broadcom/bnxt/bnxt.c | 25 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 4 drivers/net/ethernet/cadence/macb.c | 1 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 17 + drivers/net/ethernet/cisco/enic/enic_main.c | 9 - drivers/net/ethernet/freescale/fec_main.c | 8 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 16 + drivers/net/ethernet/freescale/fs_enet/fs_enet.h | 1 drivers/net/ethernet/intel/i40e/i40e_nvm.c | 98 +++++++---- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 2 drivers/net/ethernet/intel/igb/e1000_82575.c | 12 - drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 6 drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c | 6 drivers/net/ethernet/mellanox/mlx5/core/health.c | 5 drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 drivers/net/ethernet/qlogic/qed/qed_hw.c | 7 drivers/net/ethernet/qlogic/qed/qed_roce.c | 15 - drivers/net/ethernet/qlogic/qed/qed_vf.c | 1 drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 26 ++- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 2 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 2 drivers/net/ethernet/realtek/r8169.c | 8 drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c | 6 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 drivers/net/macsec.c | 2 drivers/net/phy/marvell.c | 2 drivers/net/usb/asix_common.c | 3 drivers/net/usb/ax88179_178a.c | 3 drivers/net/usb/cdc_ncm.c | 4 drivers/net/usb/lan78xx.c | 17 - drivers/net/usb/r8152.c | 3 drivers/net/usb/smsc75xx.c | 3 drivers/net/usb/smsc95xx.c | 3 drivers/net/usb/sr9800.c | 3 drivers/net/wireless/ath/ath10k/ahb.c | 2 drivers/net/wireless/ath/ath10k/core.c | 3 drivers/net/wireless/mac80211_hwsim.c | 3 drivers/net/wireless/marvell/libertas/if_sdio.c | 4 drivers/net/xen-netfront.c | 11 - drivers/nvme/host/pci.c | 18 -- drivers/nvme/target/admin-cmd.c | 1 drivers/pci/quirks.c | 2 drivers/platform/x86/acer-wmi.c | 9 - drivers/ptp/ptp_chardev.c | 4 drivers/reset/hisilicon/hi6220_reset.c | 2 drivers/scsi/aacraid/src.c | 2 drivers/scsi/qla2xxx/qla_init.c | 4 drivers/soc/fsl/qbman/qman.c | 3 drivers/soc/fsl/qe/ucc.c | 2 drivers/staging/wilc1000/linux_wlan.c | 3 drivers/usb/class/cdc-acm.c | 14 - drivers/usb/core/devio.c | 4 drivers/usb/dwc3/dwc3-omap.c | 18 -- drivers/usb/gadget/function/f_mass_storage.c | 3 drivers/usb/host/xhci-hub.c | 2 drivers/usb/renesas_usbhs/mod_gadget.c | 7 drivers/vhost/vhost.c | 2 drivers/video/fbdev/efifb.c | 2 drivers/video/fbdev/pxa168fb.c | 6 fs/btrfs/extent_io.c | 124 ++++++++++++++ fs/btrfs/inode.c | 2 fs/btrfs/send.c | 7 fs/cachefiles/namei.c | 2 fs/cifs/inode.c | 2 fs/f2fs/dir.c | 13 - fs/fat/fatent.c | 1 fs/ocfs2/dlmglue.c | 4 fs/ocfs2/xattr.c | 23 +- fs/orangefs/xattr.c | 6 fs/ufs/inode.c | 1 fs/xfs/libxfs/xfs_trans_resv.c | 9 - include/linux/elevator.h | 2 include/linux/iio/buffer-dma.h | 2 include/linux/posix-timers.h | 4 init/main.c | 2 kernel/events/core.c | 7 kernel/futex.c | 12 + kernel/sched/fair.c | 22 ++ kernel/sched/sched.h | 2 kernel/time/posix-cpu-timers.c | 2 kernel/time/posix-timers.c | 29 ++- lib/test_bpf.c | 2 mm/frame_vector.c | 6 mm/memory_hotplug.c | 4 net/bluetooth/mgmt.c | 7 net/bluetooth/smp.c | 29 ++- net/bluetooth/smp.h | 3 net/bridge/br_multicast.c | 9 - net/core/datagram.c | 5 net/core/ethtool.c | 8 net/core/rtnetlink.c | 10 + net/core/skbuff.c | 5 net/ipv4/ip_fragment.c | 12 - net/ipv4/udp.c | 20 ++ net/ipv6/addrconf.c | 6 net/ipv6/af_inet6.c | 6 net/ipv6/ip6_checksum.c | 20 ++ net/ipv6/ip6_tunnel.c | 14 - net/ipv6/mcast.c | 16 - net/ipv6/ndisc.c | 3 net/ipv6/netfilter/nf_conntrack_reasm.c | 2 net/ipv6/route.c | 11 - net/ipv6/xfrm6_output.c | 2 net/l2tp/l2tp_core.c | 14 - net/l2tp/l2tp_core.h | 3 net/l2tp/l2tp_debugfs.c | 4 net/l2tp/l2tp_netlink.c | 3 net/llc/llc_conn.c | 1 net/mac80211/agg-tx.c | 128 ++++++--------- net/mac80211/ht.c | 16 + net/mac80211/ieee80211_i.h | 14 - net/mac80211/iface.c | 11 - net/mac80211/sta_info.h | 2 net/mac80211/status.c | 7 net/mac80211/tdls.c | 8 net/mac80211/tx.c | 2 net/rds/ib_cm.c | 3 net/rxrpc/input.c | 54 +++--- net/sched/sch_gred.c | 2 net/sctp/socket.c | 11 - net/socket.c | 11 - net/tipc/socket.c | 6 net/tipc/subscr.c | 2 net/wireless/nl80211.c | 1 net/wireless/reg.c | 1 net/wireless/scan.c | 58 +++++- net/xfrm/xfrm_user.c | 15 + sound/pci/hda/patch_realtek.c | 5 sound/soc/intel/skylake/skl-topology.c | 2 tools/perf/Makefile | 4 tools/perf/tests/builtin-test.c | 4 tools/perf/tests/task-exit.c | 2 tools/perf/util/annotate.c | 12 + tools/perf/util/evsel.c | 12 + tools/perf/util/probe-event.c | 2 tools/virtio/ringtest/ptr_ring.c | 29 ++- 191 files changed, 1176 insertions(+), 686 deletions(-)
Aditya Shankar (1):
staging: wilc1000: Fix problem with wrong vif index
Al Viro (2):
ufs: we need to sync inode before freeing it
cachefiles: fix the race between cachefiles_bury_object() and rmdir(2)
Alaa Hleihel (1):
IB/ipoib: Do not warn if IPoIB debugfs doesn't exist
Alan Stern (1):
USB: fix the usbfs flag sanitization for control transfers
Alex Estrin (1):
Revert "IB/ipoib: Update broadcast object if PKey value was changed in index 0"
Alex Vesker (1):
IB/ipoib: Fix lockdep issue found on ipoib_ib_dev_heavy_flush
Alexandre Belloni (1):
soc: fsl: qbman: qman: avoid allocating from non existing gen_pool
Andreas Born (1):
bonding: ratelimit failed speed/duplex update warning
Andrei Otcheretianski (2):
mac80211: Always report TX status
cfg80211: reg: Init wiphy_idx in regulatory_hint_core()
Andrzej Pietrasiewicz (1):
clk: samsung: Fix m2m scaler clock on Exynos542x
Anjali Singhai Jain (1):
i40e: avoid NVM acquire deadlock during NVM update
Ard Biesheuvel (2):
ARM: 8677/1: boot/compressed: fix decompressor header layout for v7-M
ahci: don't ignore result code of ahci_reset_controller()
Arnaldo Carvalho de Melo (1):
perf evsel: Fix probing of precise_ip level for default cycles event
Arnd Bergmann (1):
module: fix DEBUG_SET_MODULE_RONX typo
Arthur Kiyanovski (1):
net: ena: fix NULL dereference due to untimely napi initialization
Arvind Yadav (1):
ata: sata_rcar: Handle return value of clk_prepare_enable
Ben Hutchings (2):
scsi: qla2xxx: Avoid double completion of abort command drm/msm: Fix possible null dereference on failure of get_pages()
Bjorn Helgaas (1):
efi/fb: Correct PCI_STD_RESOURCE_END usage
Björn Töpel (1):
perf probe: Fix probe definition for inlined functions
Bjørn Mork (1):
net: cdc_ncm: GetNtbFormat endian fix
Bob Copeland (1):
mac80211: fix pending queue hang due to TX_DROP
Bob Peterson (1):
tipc: Fix tipc_sk_reinit handling of -EAGAIN
Brian Foster (1):
xfs: truncate transaction does not modify the inobt
Chopra, Manish (1):
qlcnic: Fix tunnel offload for 82xx adapters
Christian Grönke (1):
igb: Remove superfluous reset to PHY and page 0 selection
Christian Sünkenberg (1):
x86/cpu/cyrix: Add alternative Device ID of Geode GX1 SoC
Christophe JAILLET (1):
mm/frame_vector.c: release a semaphore in 'get_vaddr_frames()'
Christophe Jaillet (1):
IB/mlx4: Fix an error handling path in 'mlx4_ib_rereg_user_mr()'
Christophe Leroy (1):
net: fs_enet: do not call phy_stop() in interrupts
Colin Ian King (1):
net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value
Cong Wang (2):
llc: set SOCK_RCU_FREE in llc_sap_add_socket()
net: drop skb on failure in ip_check_defrag()
Dag Moxnes (1):
rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp
Dan Carpenter (2):
orangefs: off by ones in xattr size checks
x86/paravirt: Fix some warning messages
Daniel Mack (1):
libertas: call into generic suspend code before turning off power
Daniel Verkamp (1):
nvmet: fix space padding in serial number
David Ahern (1):
net/ipv6: Fix index counter for unicast addresses in in6_dump_addrs
David Howells (2):
rxrpc: Don't check RXRPC_CALL_TX_LAST after calling rxrpc_rotate_tx_window()
rxrpc: Only take the rwind and mtu values from latest ACK
David S. Miller (1):
sparc64: Fix regression in pmdp_invalidate().
Dimitris Michailidis (1):
net: fix pskb_trim_rcsum_slow() with odd trim offset
Dongdong Liu (1):
PCI: Disable MSI for HiSilicon Hip06/Hip07 only in Root Port mode
Doug Ledford (1):
IB/rxe: put the pool on allocation failure
Eric Biggers (1):
elevator: fix truncation of icq_cache_name
Eric Dumazet (1):
ipv6: mcast: fix a use-after-free in inet6_mc_check
Eric Ren (1):
ocfs2: fix deadlock caused by recursive locking in xattr
Filipe Manana (1):
Btrfs: incremental send, fix invalid memory access
Florian Fainelli (8):
ARM: dts: BCM63xx: Fix incorrect interrupt specifiers
asix: Check for supported Wake-on-LAN modes
ax88179_178a: Check for supported Wake-on-LAN modes
lan78xx: Check for supported Wake-on-LAN modes
sr9800: Check for supported Wake-on-LAN modes
r8152: Check for supported Wake-on-LAN Modes
smsc75xx: Check for Wake-on-LAN modes
smsc95xx: Check for Wake-on-LAN modes
Gabriel Krisman Bertazi (1):
drm: bochs: Don't remove uninitialized fbdev framebuffer
Gal Pressman (1):
net/mlx5: Fix driver load error flow when firmware is stuck
Geert Uytterhoeven (2):
iio: pressure: zpa2326: Remove always-true check which confuses gcc
cifs: Use ULL suffix for 64-bit constant
Govindarajulu Varadarajan (1):
enic: do not overwrite error code
Greg Kroah-Hartman (1):
Linux 4.9.136
Gustavo A. R. Silva (4):
ptp: fix Spectre v1 vulnerability RDMA/ucma: Fix Spectre v1 vulnerability IB/ucm: Fix Spectre v1 vulnerability
usb: gadget: storage: Fix Spectre v1 vulnerability
Haishuang Yan (1):
ip6_tunnel: Correct tos value in collect_md mode
Hangbin Liu (1):
bridge: do not add port to router list when receives query with source 0.0.0.0
Hans de Goede (1):
iio: adc: Revert "axp288: Drop bogus AXP288_ADC_TS_PIN_CTRL register modifications"
Heiner Kallweit (1):
r8169: fix NAPI handling under high load
Ido Schimmel (1):
rtnetlink: Disallow FDB configuration for non-Ethernet device
Jakub Kicinski (1):
net: sched: gred: pass the right attribute to gred_change_table_def()
James Chapman (1):
l2tp: remove configurable payload offset
Jane Chu (1):
arch/sparc: increase CONFIG_NODES_SHIFT on SPARC64 to 5
Jason Wang (1):
vhost: Fix Spectre V1 vulnerability
Jeremy Linton (1):
reset: hi6220: Set module license so that it can be loaded
Jia-Ju Bai (2):
rxe: Fix a sleep-in-atomic bug in post_one_send
crypto: shash - Fix a sleep-in-atomic bug in shash_setkey_unaligned
Jiri Olsa (2):
perf/ring_buffer: Prevent concurent ring buffer access perf/core: Fix locking for children siblings group read
Jiri Slaby (1):
futex: futex_wake_op, do not fail on invalid op
Johannes Berg (2):
mac80211: TDLS: fix skb queue/priority assignment
mac80211: fix TX aggregation start/stop callback race
Josef Bacik (1):
nbd: only set MSG_MORE when we have more to send
Jouni Malinen (1):
cfg80211: Address some corner cases in scan result channel updating
Kai-Heng Feng (1):
drm/edid: Add 6 bpc quirk for BOE panel in HP Pavilion 15-n233sl
Kalle Valo (1):
ath10k: convert warning about non-existent OTP board id to debug message
Kan Liang (1):
perf/x86/intel/uncore: Fix PCI BDF address of M3UPI on SKX
Khazhismel Kumykov (1):
fs/fat/fatent.c: add cond_resched() to fat_count_free_clusters()
Kimmo Rautkoski (1):
mtd: spi-nor: Add support for is25wp series chips
Lee, Chun-Yi (1):
platform/x86: acer-wmi: setup accelerometer when ACPI device was found
Linus Walleij (1):
gpio: mxs: Get rid of external API call
Liu Bo (1):
Btrfs: clear EXTENT_DEFRAG bits in finish_ordered_io
Lubomir Rintel (1):
pxa168fb: prepare the clock
Maciej W. Rozycki (1):
declance: Fix continuation with the adapter identification message
Marcelo Ricardo Leitner (1):
sctp: fix race on sctp_id2asoc
Marek Vasut (1):
gpu: ipu-v3: Fix CSI selection for VDIC
Martin Willi (1):
mac80211_hwsim: do not omit multicast announce of first added radio
Masashi Honma (1):
nl80211: Fix possible Spectre-v1 for NL80211_TXRATE_HT
Mathias Nyman (1):
xhci: Fix USB3 NULL pointer dereference at logical disconnect.
Matias Karhumaa (1):
Bluetooth: SMP: fix crash in unpairing
Matt Redfearn (2):
MIPS: microMIPS: Fix decoding of swsp16 instruction
MIPS: Handle non word sized instructions when examining frame
Max Gurtovoy (1):
nvme-pci: fix CMB sysfs file removal in reset path
Michael Chan (1):
bnxt_en: Don't use rtnl lock to protect link change logic in workqueue.
Michael S. Tsirkin (1):
ptr_ring: fix up after recent ptr_ring changes
Michal Simek (1):
net: macb: Clean 64b dma addresses if they are not detected
Mikhail Nikiforov (1):
Input: elan_i2c - add ACPI ID for Lenovo IdeaPad 330-15IGM
Mintz, Yuval (1):
qed: Warn PTT usage by wrong hw-function
Mohammed Shafi Shajakhan (1):
ath10k: fix NAPI enable/disable symmetry for AHB interface
Moshe Shemesh (2):
net/mlx5: Fix command completion after timeout access invalid structure net/mlx5: Fix health work queue spin lock to IRQ safe
Nathan Chancellor (3):
qed: Avoid implicit enum conversion in qed_roce_mode_to_flavor
qed: Avoid constant logical operation warning in qed_vf_pf_acquire x86/time: Correct the attribute on jiffies' definition
Niklas Cassel (1):
net: stmmac: Fix stmmac_mdio_reset() when building stmmac as modules
Nikolay Aleksandrov (1):
net: bridge: remove ipv6 zero address check in mcast queries
Noa Osherovich (2):
IB/core: Fix the validations of a multicast LID in attach or detach operations IB/mlx5: Avoid passing an invalid QP type to firmware
Peter Zijlstra (1):
x86/percpu: Fix this_cpu_read()
Phil Auld (1):
sched/fair: Fix throttle_list starvation with low CFS quota
Phil Elwell (1):
ARM: dts: bcm283x: Reserve first page for firmware
Phil Reid (1):
iio: buffer: fix the function signature to match implementation
Prarit Bhargava (1):
ACPI: sysfs: Make ACPI GPE mask kernel parameter cover all GPEs
Qu Wenruo (1):
btrfs: fiemap: Cache and merge fiemap extent before submit it to user
Raghava Aditya Renukunta (1):
scsi: aacraid: Fix typo in blink status
Rasmus Villemoes (1):
perf tools: Disable parallelism for 'make clean'
Ravi Bangoria (1):
perf symbols: Fix memory corruption because of zero length symbols
Rickard x Andersson (1):
net: fec: fix rare tx timeout
Ross Lagerwall (2):
xen-netfront: Update features after registering netdev
xen-netfront: Fix mismatched rtnl_unlock
Sabrina Dubroca (2):
ipv6: fix cleanup ordering for ip6_mr failure
macsec: fix memory leaks when skb_to_sgvec fails
Sandipan Das (1):
perf tests: Fix indexing when invoking subtests
Sascha Hauer (1):
ARM: dts: imx53-qsb: disable 1.2GHz OPP
Sasha Levin (2):
Revert "netfilter: ipv6: nf_defrag: drop skb dst before queueing" Revert "x86/mm: Expand static page table for fixmap space"
Sean Tranchetti (2):
xfrm: validate template mode
net: udp: fix handling of CHECKSUM_COMPLETE packets
Sheng Yong (1):
f2fs: fix multiple f2fs_add_link() having same name for inline dentry
Shreyas NC (1):
ASoC: Intel: Skylake: Fix to parse consecutive string tkns in manifest
Stefan Wahren (1):
i2c: bcm2835: Avoid possible NULL ptr dereference
Stefano Brivio (2):
ipv6/ndisc: Preserve IPv6 control buffer if protocol error handlers are called
ip6_tunnel: Fix encapsulation layout
Steffen Klassert (1):
xfrm: Validate address prefix lengths in the xfrm selector.
Takashi Iwai (2):
ALSA: hda - No loopback on ALC299 codec
ALSA: hda - Fix incorrect usage of IS_REACHABLE()
Talat Batheesh (1):
net/mlx5e: Fix fixpoint divide exception in mlx5e_am_stats_compare
Tejun Heo (1):
libata: fix error checking in in ata_parse_force_one()
Thadeu Lima de Souza Cascardo (2):
xfrm6: call kfree_skb when skb is toobig
test_bpf: Fix testing with CONFIG_BPF_JIT_ALWAYS_ON=y on other arches
Thomas Gleixner (1):
posix-timers: Sanitize overrun handling
Thomas Petazzoni (1):
ARM: 8799/1: mm: fix pci_ioremap_io() offset check
Thor Thayer (1):
net: ethernet: stmmac: Fix altr_tse_pcs SGMII Initialization
Tobias Herzog (1):
cdc-acm: correct counting of UART states in serial state notification
Tobias Jungel (1):
bonding: fix length of actor system
Vignesh R (1):
usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq
Wenwen Wang (3):
net: cxgb3_main: fix a missing-check bug
net: socket: fix a missing-check bug
ethtool: fix a privilege escalation bug
Xin Long (2):
ipv6: set rt6i_protocol properly in the route when it is installed
sctp: use right member as the param of list_for_each_entry
Ying Xue (1):
tipc: fix a race condition of releasing subscriber object
Yoshihiro Shimoda (2):
usb: renesas_usbhs: gadget: fix spin_lock_init() for &uep->lock
usb: renesas_usbhs: gadget: fix unused-but-set-variable warning
Zhao Qiang (2):
soc: fsl: qe: Fix copy/paste bug in ucc_get_tdm_sync_shift()
net: phy: marvell: Limit 88m1101 autoneg errata to 88E1145 as well.
zhong jiang (1):
mm/memory_hotplug.c: fix overflow in test_pages_in_a_zone()
Greg KH
maintainerDocumentation/kernel-parameters.txt +0 -1
@@ -313,7 +313,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. This facility can be used to prevent such uncontrolled GPE floodings. Format: <int> - Support masking of GPEs numbered from 0x00 to 0x7f. acpi_no_auto_serialize [HW,ACPI] Disable auto-serialization of AML methods
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 135 +SUBLEVEL = 136 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/boot/compressed/efi-header.S +1 -3
@@ -17,14 +17,12 @@ @ there. .inst 'M' | ('Z' << 8) | (0x1310 << 16) @ tstne r0, #0x4d000 #else - mov r0, r0 + W(mov) r0, r0 #endif .endm .macro __EFI_HEADER #ifdef CONFIG_EFI_STUB - b __efi_start - .set start_offset, __efi_start - start .org start + 0x3c @
arch/arm/boot/compressed/head.S +10 -7
@@ -130,19 +130,22 @@ start: .rept 7 __nop .endr - ARM( mov r0, r0 ) - ARM( b 1f ) - THUMB( badr r12, 1f ) - THUMB( bx r12 ) +#ifndef CONFIG_THUMB2_KERNEL + mov r0, r0 +#else + AR_CLASS( sub pc, pc, #3 ) @ A/R: switch to Thumb2 mode + M_CLASS( nop.w ) @ M: already in Thumb2 mode + .thumb +#endif + W(b) 1f .word _magic_sig @ Magic numbers to help the loader .word _magic_start @ absolute load/run zImage address .word _magic_end @ zImage end address .word 0x04030201 @ endianness flag - THUMB( .thumb ) -1: __EFI_HEADER - + __EFI_HEADER +1: ARM_BE8( setend be ) @ go BE8 if compiled for BE8 AR_CLASS( mrs r9, cpsr ) #ifdef CONFIG_ARM_VIRT_EXT
arch/arm/boot/dts/bcm283x.dtsi +5 -0
@@ -3,6 +3,11 @@ #include <dt-bindings/clock/bcm2835-aux.h> #include <dt-bindings/gpio/gpio.h> +/* firmware-provided startup stubs live here, where the secondary CPUs are + * spinning. + */ +/memreserve/ 0x00000000 0x00001000; + /* This include file covers the common peripherals and configuration between * bcm2835 and bcm2836 implementations, leaving the CPU configuration to * bcm2835.dtsi and bcm2836.dtsi.
arch/arm/boot/dts/bcm63138.dtsi +8 -6
@@ -105,21 +105,23 @@ global_timer: timer@1e200 { compatible = "arm,cortex-a9-global-timer"; reg = <0x1e200 0x20>; - interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>; clocks = <&axi_clk>; }; local_timer: local-timer@1e600 { compatible = "arm,cortex-a9-twd-timer"; reg = <0x1e600 0x20>; - interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | + IRQ_TYPE_EDGE_RISING)>; clocks = <&axi_clk>; }; twd_watchdog: watchdog@1e620 { compatible = "arm,cortex-a9-twd-wdt"; reg = <0x1e620 0x20>; - interrupts = <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | + IRQ_TYPE_LEVEL_HIGH)>; }; armpll: armpll {
@@ -157,7 +159,7 @@ serial0: serial@600 { compatible = "brcm,bcm6345-uart"; reg = <0x600 0x1b>; - interrupts = <GIC_SPI 32 0>; + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; clocks = <&periph_clk>; clock-names = "periph"; status = "disabled";
@@ -166,7 +168,7 @@ serial1: serial@620 { compatible = "brcm,bcm6345-uart"; reg = <0x620 0x1b>; - interrupts = <GIC_SPI 33 0>; + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; clocks = <&periph_clk>; clock-names = "periph"; status = "disabled";
@@ -179,7 +181,7 @@ reg = <0x2000 0x600>, <0xf0 0x10>; reg-names = "nand", "nand-int-base"; status = "disabled"; - interrupts = <GIC_SPI 38 0>; + interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "nand"; };
arch/arm/boot/dts/imx53-qsb-common.dtsi +11 -0
@@ -130,6 +130,17 @@ }; }; +&cpu0 { + /* CPU rated to 1GHz, not 1.2GHz as per the default settings */ + operating-points = < + /* kHz uV */ + 166666 850000 + 400000 900000 + 800000 1050000 + 1000000 1200000 + >; +}; + &esdhc1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_esdhc1>;
arch/arm/mm/ioremap.c +1 -1
@@ -473,7 +473,7 @@ void pci_ioremap_set_mem_type(int mem_type)int pci_ioremap_io (unsigned int offset,phys_addr_t phys_addr) { -BUG_ON (offset +SZ_64K >IO_SPACE_LIMIT ); +BUG_ON (offset +SZ_64K -1 >IO_SPACE_LIMIT ); return ioremap_page_range(PCI_IO_VIRT_BASE + offset, PCI_IO_VIRT_BASE + offset + SZ_64K,
arch/mips/include/uapi/asm/inst.h +1 -1
@@ -964,7 +964,7 @@ struct mm16_r3_format { /* Load from global pointer format */ struct mm16_r5_format { /* Load/store from stack pointer format */ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, - __BITFIELD_FIELD(signed int simmediate : 5, + __BITFIELD_FIELD(unsigned int imm : 5, __BITFIELD_FIELD(unsigned int : 16, /* Ignored */ ;)))) };
arch/mips/kernel/process.c +7 -4
@@ -212,7 +212,7 @@ static inline int is_ra_save_ins(union mips_instruction *ip, int *poff)if (ip->mm16_r5_format.rt !=31 )return 0 ; - *poff = ip->mm16_r5_format.simmediate; + *poff = ip->mm16_r5_format.imm; *poff = (*poff <<2 ) /sizeof (ulong);return 1 ;
@@ -346,6 +346,7 @@ static int get_frame_info(struct mips_frame_info *info)bool is_mmips =IS_ENABLED (CONFIG_CPU_MICROMIPS );union mips_instruction insn, *ip, *ip_end;const unsigned int max_insns =128 ; +unsigned int last_insn_size =0 ;unsigned int i; info->pc_offset =-1 ;
@@ -357,15 +358,19 @@ static int get_frame_info(struct mips_frame_info *info) ip_end = (void *)ip + info->func_size; -for (i =0 ; i < max_insns && ip < ip_end; i++, ip++) { +for (i =0 ; i < max_insns && ip < ip_end; i++) { + ip = (void *)ip + last_insn_size;if (is_mmips &&mm_insn_16bit (ip->halfword[0 ])) { insn.halfword[0 ] =0 ; insn.halfword[1 ] = ip->halfword[0 ]; + last_insn_size =2 ; }else if (is_mmips) { insn.halfword[0 ] = ip->halfword[1 ]; insn.halfword[1 ] = ip->halfword[0 ]; + last_insn_size =4 ; }else { insn.word = ip->word; + last_insn_size =4 ; }if (is_jump_ins (&insn))
@@ -387,8 +392,6 @@ static int get_frame_info(struct mips_frame_info *info) tmp = (ip->halfword[0 ] >>1 ); info->frame_size = -(signed short)(tmp & 0xf); } - ip = (void *) &ip->halfword[1 ]; - ip--; } else#endif info->frame_size = - ip->i_format.simmediate;
arch/sparc/Kconfig +6 -2
@@ -290,9 +290,13 @@ config NUMA depends on SPARC64 && SMP config NODES_SHIFT - int - default "4" + int "Maximum NUMA Nodes (as a power of 2)" + range 4 5 if SPARC64 + default "5" depends on NEED_MULTIPLE_NODES + help + Specify the maximum number of NUMA Nodes available on the target + system. Increases memory reserved to accommodate various tables. # Some NUMA nodes have memory ranges that span # other nodes. Even though a pfn is valid and
arch/sparc/mm/tlb.c +13 -6
@@ -163,13 +163,10 @@ static void tlb_batch_pmd_scan(struct mm_struct *mm, unsigned long vaddr,pte_unmap (pte); } -void set_pmd_at (struct mm_struct *mm,unsigned long addr, -pmd_t *pmdp,pmd_t pmd) -{ -pmd_t orig = *pmdp; - - *pmdp = pmd; +static void __set_pmd_acct (struct mm_struct *mm,unsigned long addr, +pmd_t orig,pmd_t pmd) +{if (mm == &init_mm)return ;
@@ -219,6 +216,15 @@ void set_pmd_at(struct mm_struct *mm, unsigned long addr, } } +void set_pmd_at (struct mm_struct *mm,unsigned long addr, +pmd_t *pmdp,pmd_t pmd) +{ +pmd_t orig = *pmdp; + + *pmdp = pmd; +__set_pmd_acct (mm, addr, orig, pmd); +} +static inline pmd_t pmdp_establish (struct vm_area_struct *vma,unsigned long address,pmd_t *pmdp,pmd_t pmd) {
@@ -227,6 +233,7 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma,do { old = *pmdp; }while (cmpxchg64 (&pmdp->pmd, old.pmd, pmd.pmd) != old.pmd); +__set_pmd_acct (vma->vm_mm, address, old, pmd);return old; }
arch/x86/events/intel/uncore_snbep.c +6 -6
@@ -3767,16 +3767,16 @@ static const struct pci_device_id skx_uncore_pci_ids[] = { .driver_data = UNCORE_PCI_DEV_FULL_DATA(21, 5, SKX_PCI_UNCORE_M2PCIE, 3), }, {/* M3UPI0 Link 0 */ - PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x204C), - .driver_data =UNCORE_PCI_DEV_FULL_DATA (18 ,0 ,SKX_PCI_UNCORE_M3UPI ,0 ), + PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x204D), + .driver_data =UNCORE_PCI_DEV_FULL_DATA (18 ,1 ,SKX_PCI_UNCORE_M3UPI ,0 ), }, { /* M3UPI0 Link 1 */ -PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x204D ), - .driver_data = UNCORE_PCI_DEV_FULL_DATA(18, 1, SKX_PCI_UNCORE_M3UPI, 1), +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x204E ), + .driver_data = UNCORE_PCI_DEV_FULL_DATA(18, 2, SKX_PCI_UNCORE_M3UPI, 1), }, { /* M3UPI1 Link 2 */ -PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x204C ), - .driver_data = UNCORE_PCI_DEV_FULL_DATA(18, 4, SKX_PCI_UNCORE_M3UPI, 2), +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x204D ), + .driver_data = UNCORE_PCI_DEV_FULL_DATA(18, 5, SKX_PCI_UNCORE_M3UPI, 2), }, { /* end: all zeroes */ } };
arch/x86/include/asm/fixmap.h +0 -10
@@ -14,16 +14,6 @@#ifndef _ASM_X86_FIXMAP_H#define _ASM_X86_FIXMAP_H -/* -* Exposed to assembly code for setting up initial page tables. Cannot be -* calculated in assembly code (fixmap entries are an enum), but is sanity -* checked in the actual fixmap C code to make sure that the fixmap is -* covered fully. -*/ -#define FIXMAP_PMD_NUM 2 -/* fixmap starts downwards from the 507th entry in level2_fixmap_pgt */ -#define FIXMAP_PMD_TOP 507 -#ifndef __ASSEMBLY__#include <linux/kernel.h> #include <asm/acpi.h>
arch/x86/include/asm/percpu.h +4 -4
@@ -184,22 +184,22 @@ do { \typeof (var) pfo_ret__; \switch (sizeof (var)) { \case 1 : \ - asm(op "b "__percpu_arg(1)",%0" \ + asm volatile(op "b "__percpu_arg(1)",%0"\ : "=q" (pfo_ret__) \ : "m" (var)); \ break; \ case 2: \ - asm(op "w "__percpu_arg(1)",%0" \ + asm volatile(op "w "__percpu_arg(1)",%0"\ : "=r" (pfo_ret__) \ : "m" (var)); \ break; \ case 4: \ - asm(op "l "__percpu_arg(1)",%0" \ + asm volatile(op "l "__percpu_arg(1)",%0"\ : "=r" (pfo_ret__) \ : "m" (var)); \ break; \ case 8: \ - asm(op "q "__percpu_arg(1)",%0" \ + asm volatile(op "q "__percpu_arg(1)",%0"\ : "=r" (pfo_ret__) \: " m" (var)); \ break; \
arch/x86/include/asm/pgtable_64.h +1 -2
@@ -13,14 +13,13 @@#include <asm/processor.h> #include <linux/bitops.h> #include <linux/threads.h> -#include <asm/fixmap.h> extern pud_t level3_kernel_pgt[512 ];extern pud_t level3_ident_pgt[512 ];extern pmd_t level2_kernel_pgt[512 ];extern pmd_t level2_fixmap_pgt[512 ];extern pmd_t level2_ident_pgt[512 ]; -extern pte_t level1_fixmap_pgt[512 *FIXMAP_PMD_NUM ]; +extern pte_t level1_fixmap_pgt[512 ];extern pgd_t init_level4_pgt[];#define swapper_pg_dir init_level4_pgt
arch/x86/kernel/cpu/cyrix.c +1 -0
@@ -253,6 +253,7 @@ static void init_cyrix(struct cpuinfo_x86 *c)break ;case 4 :/* MediaGX/GXm or Geode GXM/GXLV/GX1 */ +case 11 :/* GX1 with inverted Device ID */ #ifdef CONFIG_PCI {u32 vendor, device;
arch/x86/kernel/head_64.S +4 -12
@@ -23,7 +23,6 @@ #include "../entry/calling.h" #include <asm/export.h> #include <asm/nospec-branch.h> -#include <asm/fixmap.h> #ifdef CONFIG_PARAVIRT #include <asm/asm-offsets.h>
@@ -494,20 +493,13 @@ NEXT_PAGE(level2_kernel_pgt) KERNEL_IMAGE_SIZE/PMD_SIZE) NEXT_PAGE(level2_fixmap_pgt) - .fill (512 - 4 - FIXMAP_PMD_NUM),8,0 - pgtno = 0 - .rept (FIXMAP_PMD_NUM) - .quad level1_fixmap_pgt + (pgtno << PAGE_SHIFT) - __START_KERNEL_map \ - + _PAGE_TABLE; - pgtno = pgtno + 1 - .endr - /* 6 MB reserved space + a 2MB hole */ - .fill 4,8,0 + .fill 506,8,0 + .quad level1_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE + /* 8MB reserved for vsyscalls + a 2MB hole = 4 + 1 entries */ + .fill 5,8,0 NEXT_PAGE(level1_fixmap_pgt) - .rept (FIXMAP_PMD_NUM) .fill 512,8,0 - .endr #undef PMDS
arch/x86/kernel/paravirt.c +2 -2
@@ -90,7 +90,7 @@ unsigned paravirt_patch_call(void *insnbuf,if (len <5 ) {#ifdef CONFIG_RETPOLINE -WARN_ONCE ("Failing to patch indirect CALL in %ps\n" , (void *)addr); +WARN_ONCE (1 ,"Failing to patch indirect CALL in %ps\n" , (void *)addr);#endif return len;/* call too long for patch site */ }
@@ -110,7 +110,7 @@ unsigned paravirt_patch_jmp(void *insnbuf, const void *target,if (len <5 ) {#ifdef CONFIG_RETPOLINE -WARN_ONCE ("Failing to patch indirect JMP in %ps\n" , (void *)addr); +WARN_ONCE (1 ,"Failing to patch indirect JMP in %ps\n" , (void *)addr);#endif return len;/* call too long for patch site */ }
arch/x86/kernel/time.c +1 -1
@@ -24,7 +24,7 @@#include <asm/time.h> #ifdef CONFIG_X86_64 -__visible volatile unsigned long jiffies __cacheline_aligned = INITIAL_JIFFIES; +__visible volatile unsigned long jiffies __cacheline_aligned_in_smp = INITIAL_JIFFIES;#endif unsigned long profile_pc (struct pt_regs *regs)
arch/x86/mm/pgtable.c +0 -9
@@ -536,15 +536,6 @@ void __native_set_fixmap(enum fixed_addresses idx, pte_t pte) {unsigned long address =__fix_to_virt (idx); -#ifdef CONFIG_X86_64 -/* -* Ensure that the static initial page tables are covering the -* fixmap completely. -*/ -BUILD_BUG_ON (__end_of_permanent_fixed_addresses > - (FIXMAP_PMD_NUM *PTRS_PER_PTE )); -#endif -if (idx >= __end_of_fixed_addresses) {BUG ();return ;
arch/x86/xen/mmu.c +2 -6
@@ -1936,7 +1936,7 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)* L3_k[511] -> level2_fixmap_pgt */ convert_pfn_mfn (level3_kernel_pgt); -/* L3_k[511][508-FIXMAP_PMD_NUM ... 507] -> level1_fixmap_pgt */ +/* L3_k[511][506] -> level1_fixmap_pgt */ convert_pfn_mfn (level2_fixmap_pgt); }/* We get [511][511] and have Xen's version of level2_kernel_pgt */
@@ -1970,11 +1970,7 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)set_page_prot (level2_ident_pgt,PAGE_KERNEL_RO );set_page_prot (level2_kernel_pgt,PAGE_KERNEL_RO );set_page_prot (level2_fixmap_pgt,PAGE_KERNEL_RO ); - -for (i =0 ; i <FIXMAP_PMD_NUM ; i++) { -set_page_prot (level1_fixmap_pgt + i *PTRS_PER_PTE , -PAGE_KERNEL_RO ); - } +set_page_prot (level1_fixmap_pgt,PAGE_KERNEL_RO );/* Pin down new L4 */ pin_pagetable_pfn(MMUEXT_PIN_L4_TABLE,
crypto/shash.c +1 -1
@@ -41,7 +41,7 @@ static int shash_setkey_unaligned(struct crypto_shash *tfm, const u8 *key,int err; absize = keylen + (alignmask & ~(crypto_tfm_ctx_alignment () -1 )); - buffer =kmalloc (absize,GFP_KERNEL ); + buffer =kmalloc (absize,GFP_ATOMIC );if (!buffer)return -ENOMEM ;
drivers/acpi/sysfs.c +8 -18
@@ -724,14 +724,8 @@ static ssize_t counter_set(struct kobject *kobj,* interface: * echo unmask > /sys/firmware/acpi/interrupts/gpe00 */ - -/* -* Currently, the GPE flooding prevention only supports to mask the GPEs -* numbered from 00 to 7f. -*/ -#define ACPI_MASKABLE_GPE_MAX 0x80 - -static u64 __initdata acpi_masked_gpes; +#define ACPI_MASKABLE_GPE_MAX 0xFF +static DECLARE_BITMAP(acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) __initdata;static int __init acpi_gpe_set_masked_gpes (char *val) {
@@ -739,7 +733,7 @@ static int __init acpi_gpe_set_masked_gpes(char *val)if (kstrtou8 (val,0 , &gpe) || gpe >ACPI_MASKABLE_GPE_MAX )return -EINVAL ; - acpi_masked_gpes |= ((u64 )1 <<gpe); +set_bit (gpe, acpi_masked_gpes_map);return 1 ; }
@@ -751,15 +745,11 @@ void __init acpi_gpe_apply_masked_gpes(void)acpi_status status;u8 gpe; -for (gpe =0 ; - gpe <min_t (u8,ACPI_MASKABLE_GPE_MAX , acpi_current_gpe_count); - gpe++) { -if (acpi_masked_gpes & ((u64 )1 <<gpe)) { - status =acpi_get_gpe_device (gpe, &handle); -if (ACPI_SUCCESS (status)) { -pr_info ("Masking GPE 0x%x.\n" , gpe); - (void )acpi_mask_gpe (handle, gpe, TRUE); - } +for_each_set_bit (gpe, acpi_masked_gpes_map,ACPI_MASKABLE_GPE_MAX ) { + status =acpi_get_gpe_device (gpe, &handle); +if (ACPI_SUCCESS (status)) { +pr_info ("Masking GPE 0x%x.\n" , gpe); + (void )acpi_mask_gpe (handle, gpe, TRUE); } } }
drivers/ata/ahci.c +4 -1
@@ -624,8 +624,11 @@ static void ahci_pci_save_initial_config(struct pci_dev *pdev,static int ahci_pci_reset_controller (struct ata_host *host) {struct pci_dev *pdev =to_pci_dev (host->dev); +int rc; -ahci_reset_controller (host); + rc =ahci_reset_controller (host); +if (rc) +return rc;if (pdev->vendor ==PCI_VENDOR_ID_INTEL ) {struct ahci_host_priv *hpriv = host->private_data;
drivers/ata/libata-core.c +1 -1
@@ -6781,7 +6781,7 @@ static int __init ata_parse_force_one(char **cur, } force_ent->port =simple_strtoul (id, &endp,10 ); -if (p == endp || *endp !='\0' ) { +if (id == endp || *endp !='\0' ) { *reason ="invalid port/link" ;return -EINVAL ; }
drivers/ata/sata_rcar.c +12 -3
@@ -890,7 +890,10 @@ static int sata_rcar_probe(struct platform_device *pdev)dev_err (&pdev->dev,"failed to get access to sata clock\n" );return PTR_ERR (priv->clk); } -clk_prepare_enable (priv->clk); + + ret =clk_prepare_enable (priv->clk); +if (ret) +return ret; host =ata_host_alloc (&pdev->dev,1 );if (!host) {
@@ -970,8 +973,11 @@ static int sata_rcar_resume(struct device *dev)struct ata_host *host =dev_get_drvdata (dev);struct sata_rcar_priv *priv = host->private_data;void __iomem *base = priv->base; +int ret; -clk_prepare_enable (priv->clk); + ret =clk_prepare_enable (priv->clk); +if (ret) +return ret;/* ack and mask */ iowrite32 (0 , base +SATAINTSTAT_REG );
@@ -988,8 +994,11 @@ static int sata_rcar_restore(struct device *dev) {struct ata_host *host =dev_get_drvdata (dev);struct sata_rcar_priv *priv = host->private_data; +int ret; -clk_prepare_enable (priv->clk); + ret =clk_prepare_enable (priv->clk); +if (ret) +return ret;sata_rcar_setup_port (host);
drivers/block/nbd.c +2 -4
@@ -269,7 +269,7 @@ static inline int sock_send_bvec(struct nbd_device *nbd, struct bio_vec *bvec,static int nbd_send_cmd (struct nbd_device *nbd,struct nbd_cmd *cmd) {struct request *req =blk_mq_rq_from_pdu (cmd); -int result, flags; +int result;struct nbd_request request;unsigned long size =blk_rq_bytes (req);struct bio *bio;
@@ -309,7 +309,6 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd)if (type !=NBD_CMD_WRITE )return 0 ; - flags =0 ; bio = req->bio;while (bio) {struct bio *next = bio->bi_next;
@@ -318,9 +317,8 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd)bio_for_each_segment (bvec, bio, iter) {bool is_last = !next &&bio_iter_last (bvec, iter); +int flags = is_last ?0 :MSG_MORE ; -if (is_last) - flags =MSG_MORE ;dev_dbg (nbd_to_dev (nbd),"request %p: sending %d bytes data\n" , cmd, bvec.bv_len); result =sock_send_bvec (nbd, &bvec, flags);
drivers/clk/samsung/clk-exynos5420.c +1 -1
@@ -987,7 +987,7 @@ static const struct samsung_gate_clock exynos5x_gate_clks[] __initconst = {GATE (0 ,"aclk400_isp" ,"mout_user_aclk400_isp" ,GATE_BUS_TOP ,16 ,0 ,0 ),GATE (0 ,"aclk400_mscl" ,"mout_user_aclk400_mscl" , -GATE_BUS_TOP ,17 ,0 ,0 ), +GATE_BUS_TOP ,17 ,CLK_IS_CRITICAL ,0 ),GATE (0 ,"aclk200_disp1" ,"mout_user_aclk200_disp1" ,GATE_BUS_TOP ,18 ,CLK_IS_CRITICAL ,0 ), GATE(CLK_SCLK_MPHY_IXTAL24, "sclk_mphy_ixtal24", "mphy_refclk_ixtal24",
drivers/gpio/gpio-mxs.c +1 -3
@@ -32,8 +32,6 @@#include <linux/platform_device.h> #include <linux/slab.h> #include <linux/gpio/driver.h> -/* FIXME: for gpio_get_value(), replace this by direct register read */ -#include <linux/gpio.h> #include <linux/module.h> #define MXS_SET 0x4
@@ -94,7 +92,7 @@ static int mxs_gpio_set_irq_type(struct irq_data *d, unsigned int type) port->both_edges &= ~pin_mask;switch (type) {case IRQ_TYPE_EDGE_BOTH : - val =gpio_get_value (port->gc.base + d->hwirq); + val = port->gc.get (&port->gc, d->hwirq);if (val) edge =GPIO_INT_FALL_EDGE ;else
drivers/gpu/drm/bochs/bochs_fbdev.c +4 -5
@@ -138,6 +138,7 @@ static int bochsfb_create(struct drm_fb_helper *helper, info->fix.smem_start =0 ; info->fix.smem_len = size; + bochs->fb.initialized = true;return 0 ; }
@@ -155,7 +156,6 @@ static int bochs_fbdev_destroy(struct bochs_device *bochs) gfb->obj =NULL ; } -drm_fb_helper_fini (&bochs->fb.helper);drm_framebuffer_unregister_private (&gfb->base);drm_framebuffer_cleanup (&gfb->base);
@@ -188,7 +188,6 @@ int bochs_fbdev_init(struct bochs_device *bochs)if (ret) goto fini; - bochs->fb.initialized = true;return 0 ; fini:
@@ -198,9 +197,9 @@ int bochs_fbdev_init(struct bochs_device *bochs)void bochs_fbdev_fini (struct bochs_device *bochs) { -if (!bochs->fb.initialized) -return ; +if (bochs->fb.initialized) +bochs_fbdev_destroy (bochs); -bochs_fbdev_destroy (bochs); +drm_fb_helper_fini (&bochs->fb.helper); bochs->fb.initialized = false; }
drivers/gpu/drm/drm_edid.c +3 -0
@@ -107,6 +107,9 @@ static const struct edid_quirk {/* AEO model 0 reports 8 bpc, but is a 6 bpc panel */ { "AEO", 0, EDID_QUIRK_FORCE_6BPC }, +/* BOE model on HP Pavilion 15-n233sl reports 8 bpc, but is a 6 bpc panel */ + { "BOE", 0x78b, EDID_QUIRK_FORCE_6BPC }, +/* CPT panel of Asus UX303LA reports 8 bpc, but is a 6 bpc panel */ { "CPT", 0x17df, EDID_QUIRK_FORCE_6BPC },
drivers/gpu/drm/msm/msm_gem.c +11 -9
@@ -118,17 +118,19 @@ static void put_pages(struct drm_gem_object *obj)struct msm_gem_object *msm_obj =to_msm_bo (obj);if (msm_obj->pages) { -/* For non-cached buffers, ensure the new pages are clean -* because display controller, GPU, etc. are not coherent: -*/ -if (msm_obj->flags & (MSM_BO_WC |MSM_BO_UNCACHED )) -dma_unmap_sg (obj->dev->dev, msm_obj->sgt->sgl, - msm_obj->sgt->nents,DMA_BIDIRECTIONAL ); +if (msm_obj->sgt) { +/* For non-cached buffers, ensure the new +* pages are clean because display controller, +* GPU, etc. are not coherent: +*/ +if (msm_obj->flags & (MSM_BO_WC |MSM_BO_UNCACHED )) +dma_unmap_sg (obj->dev->dev, msm_obj->sgt->sgl, + msm_obj->sgt->nents, +DMA_BIDIRECTIONAL ); -if (msm_obj->sgt)sg_free_table (msm_obj->sgt); - -kfree (msm_obj->sgt); +kfree (msm_obj->sgt); + }if (use_pages (obj))drm_gem_put_pages (obj, msm_obj->pages, true, false);
drivers/gpu/ipu-v3/ipu-common.c +8 -7
@@ -715,15 +715,16 @@ void ipu_set_ic_src_mux(struct ipu_soc *ipu, int csi_id, bool vdi)spin_lock_irqsave (&ipu->lock, flags); val =ipu_cm_read (ipu,IPU_CONF ); -if (vdi) { +if (vdi) val |=IPU_CONF_IC_INPUT ; - }else { +else val &= ~IPU_CONF_IC_INPUT ; -if (csi_id ==1 ) - val |=IPU_CONF_CSI_SEL ; -else - val &= ~IPU_CONF_CSI_SEL ; - } + +if (csi_id ==1 ) + val |=IPU_CONF_CSI_SEL ; +else + val &= ~IPU_CONF_CSI_SEL ; +ipu_cm_write (ipu, val,IPU_CONF );spin_unlock_irqrestore (&ipu->lock, flags);
drivers/i2c/busses/i2c-bcm2835.c +3 -1
@@ -128,7 +128,9 @@ static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data) }if (val &BCM2835_I2C_S_DONE ) { -if (i2c_dev->curr_msg->flags &I2C_M_RD ) { +if (!i2c_dev->curr_msg) { +dev_err (i2c_dev->dev,"Got unexpected interrupt (from firmware?)\n" ); + }else if (i2c_dev->curr_msg->flags &I2C_M_RD ) {bcm2835_drain_rxfifo (i2c_dev); val =bcm2835_i2c_readl (i2c_dev,BCM2835_I2C_S ); }
drivers/iio/adc/axp288_adc.c +31 -1
@@ -28,6 +28,8 @@#include <linux/iio/driver.h> #define AXP288_ADC_EN_MASK 0xF1 +#define AXP288_ADC_TS_PIN_GPADC 0xF2 +#define AXP288_ADC_TS_PIN_ON 0xF3enum axp288_adc_id {AXP288_ADC_TS ,
@@ -121,6 +123,16 @@ static int axp288_adc_read_channel(int *val, unsigned long address,return IIO_VAL_INT ; } +static int axp288_adc_set_ts (struct regmap *regmap,unsigned int mode, +unsigned long address) +{ +/* channels other than GPADC do not need to switch TS pin */ +if (address !=AXP288_GP_ADC_H ) +return 0 ; + +return regmap_write (regmap,AXP288_ADC_TS_PIN_CTRL , mode); +} +static int axp288_adc_read_raw (struct iio_dev *indio_dev,struct iio_chan_spec const *chan,int *val,int *val2,long mask)
@@ -131,7 +143,16 @@ static int axp288_adc_read_raw(struct iio_dev *indio_dev,mutex_lock (&indio_dev->mlock);switch (mask) {case IIO_CHAN_INFO_RAW : +if (axp288_adc_set_ts (info->regmap,AXP288_ADC_TS_PIN_GPADC , + chan->address)) { +dev_err (&indio_dev->dev,"GPADC mode\n" ); + ret = -EINVAL ; +break ; + } ret =axp288_adc_read_channel (val, chan->address, info->regmap); +if (axp288_adc_set_ts (info->regmap,AXP288_ADC_TS_PIN_ON , + chan->address)) +dev_err (&indio_dev->dev,"TS pin restore\n" );break ;default : ret = -EINVAL ;
@@ -141,6 +162,15 @@ static int axp288_adc_read_raw(struct iio_dev *indio_dev,return ret; } +static int axp288_adc_set_state (struct regmap *regmap) +{ +/* ADC should be always enabled for internal FG to function */ +if (regmap_write (regmap,AXP288_ADC_TS_PIN_CTRL ,AXP288_ADC_TS_PIN_ON )) +return -EIO ; + +return regmap_write (regmap,AXP20X_ADC_EN1 ,AXP288_ADC_EN_MASK ); +} +static const struct iio_info axp288_adc_iio_info = { .read_raw = &axp288_adc_read_raw, .driver_module =THIS_MODULE ,
@@ -169,7 +199,7 @@ static int axp288_adc_probe(struct platform_device *pdev)* Set ADC to enabled state at all time, including system suspend. * otherwise internal fuel gauge functionality may be affected. */ - ret =regmap_write (info->regmap,AXP20X_ADC_EN1 ,AXP288_ADC_EN_MASK ); + ret =axp288_adc_set_state (axp20x->regmap);if (ret) {dev_err (&pdev->dev,"unable to enable ADC device\n" );return ret;
drivers/iio/pressure/zpa2326.c +3 -7
@@ -869,7 +869,6 @@ static irqreturn_t zpa2326_handle_threaded_irq(int irq, void *data)static int zpa2326_wait_oneshot_completion (const struct iio_dev *indio_dev,struct zpa2326_private *private) { -int ret;unsigned int val;long timeout;
@@ -891,14 +890,11 @@ static int zpa2326_wait_oneshot_completion(const struct iio_dev *indio_dev,/* Timed out. */ zpa2326_warn (indio_dev,"no one shot interrupt occurred (%ld)" , timeout); - ret = -ETIME ; - }else if (timeout <0 ) { -zpa2326_warn (indio_dev, -"wait for one shot interrupt cancelled" ); - ret = -ERESTARTSYS ; +return -ETIME ; } -return ret; +zpa2326_warn (indio_dev,"wait for one shot interrupt cancelled" ); +return -ERESTARTSYS ; } static int zpa2326_init_managed_irq(struct device *parent,
drivers/infiniband/core/ucm.c +3 -0
@@ -46,6 +46,8 @@#include <linux/mutex.h> #include <linux/slab.h> +#include <linux/nospec.h> +#include <asm/uaccess.h> #include <rdma/ib.h>
@@ -1115,6 +1117,7 @@ static ssize_t ib_ucm_write(struct file *filp, const char __user *buf,if (hdr.cmd >=ARRAY_SIZE (ucm_cmd_table))return -EINVAL ; + hdr.cmd =array_index_nospec (hdr.cmd,ARRAY_SIZE (ucm_cmd_table));if (hdr.in +sizeof (hdr) > len)return -EINVAL ;
drivers/infiniband/core/ucma.c +3 -0
@@ -44,6 +44,8 @@#include <linux/module.h> #include <linux/nsproxy.h> +#include <linux/nospec.h> +#include <rdma/rdma_user_cm.h> #include <rdma/ib_marshall.h> #include <rdma/rdma_cm.h>
@@ -1637,6 +1639,7 @@ static ssize_t ucma_write(struct file *filp, const char __user *buf,if (hdr.cmd >=ARRAY_SIZE (ucma_cmd_table))return -EINVAL ; + hdr.cmd =array_index_nospec (hdr.cmd,ARRAY_SIZE (ucma_cmd_table));if (hdr.in +sizeof (hdr) > len)return -EINVAL ;
drivers/infiniband/core/verbs.c +40 -4
62 lines not on this page · raw message
drivers/infiniband/hw/mlx4/mr.c +5 -2
@@ -247,8 +247,11 @@ int mlx4_ib_rereg_user_mr(struct ib_mr *mr, int flags, }if (flags &IB_MR_REREG_ACCESS ) { -if (ib_access_writable (mr_access_flags) && !mmr->umem->writable) -return -EPERM ; +if (ib_access_writable (mr_access_flags) && + !mmr->umem->writable) { + err = -EPERM ; + goto release_mpt_entry; + } err =mlx4_mr_hw_change_access (dev->dev, *pmpt_entry,convert_access (mr_access_flags));
drivers/infiniband/hw/mlx5/qp.c +6 -1
@@ -1523,6 +1523,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,u32 uidx =MLX5_IB_DEFAULT_UIDX ;struct mlx5_ib_create_qp ucmd;struct mlx5_ib_qp_base *base; +int mlx5_st;void *qpc;u32 *in;int err;
@@ -1538,6 +1539,10 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,spin_lock_init (&qp->sq.lock);spin_lock_init (&qp->rq.lock); + mlx5_st =to_mlx5_st (init_attr->qp_type); +if (mlx5_st <0 ) +return -EINVAL ; +if (init_attr->rwq_ind_tbl) {if (!udata)return -ENOSYS ;
@@ -1665,7 +1670,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd, qpc =MLX5_ADDR_OF (create_qp_in, in, qpc); -MLX5_SET (qpc, qpc, st,to_mlx5_st (init_attr->qp_type)); +MLX5_SET (qpc, qpc, st, mlx5_st);MLX5_SET (qpc, qpc, pm_state,MLX5_QP_PM_MIGRATED );if (init_attr->qp_type !=MLX5_IB_QPT_REG_UMR )
drivers/infiniband/sw/rxe/rxe_pool.c +9 -7
@@ -402,23 +402,25 @@ void *rxe_alloc(struct rxe_pool *pool)kref_get (&pool->rxe->ref_cnt); -if (atomic_inc_return (&pool->num_elem) > pool->max_elem) { -atomic_dec (&pool->num_elem); -rxe_dev_put (pool->rxe); -rxe_pool_put (pool); -return NULL ; - } +if (atomic_inc_return (&pool->num_elem) > pool->max_elem) + goto out_put_pool; elem =kmem_cache_zalloc (pool_cache (pool), (pool->flags &RXE_POOL_ATOMIC ) ?GFP_ATOMIC :GFP_KERNEL );if (!elem) -return NULL ; + goto out_put_pool; elem->pool = pool;kref_init (&elem->ref_cnt);return elem; + +out_put_pool: +atomic_dec (&pool->num_elem); +rxe_dev_put (pool->rxe); +rxe_pool_put (pool); +return NULL ; }void rxe_elem_release (struct kref *kref)
drivers/infiniband/sw/rxe/rxe_verbs.c +2 -7
@@ -729,13 +729,8 @@ static int init_send_wqe(struct rxe_qp *qp, struct ib_send_wr *ibwr, sge = ibwr->sg_list;for (i =0 ; i < num_sge; i++, sge++) { -if (qp->is_user &©_from_user (p, (__user void *) - (uintptr_t )sge->addr, sge->length)) -return -EFAULT ; - -else if (!qp->is_user) -memcpy (p, (void *)(uintptr_t )sge->addr, - sge->length); +memcpy (p, (void *)(uintptr_t )sge->addr, + sge->length); p += sge->length; }
drivers/infiniband/ulp/ipoib/ipoib_fs.c +0 -2
@@ -281,8 +281,6 @@ void ipoib_delete_debug_files(struct net_device *dev) {struct ipoib_dev_priv *priv =netdev_priv (dev); -WARN_ONCE (!priv->mcg_dentry,"null mcg debug file\n" ); -WARN_ONCE (!priv->path_dentry,"null path debug file\n" );debugfs_remove (priv->mcg_dentry);debugfs_remove (priv->path_dentry); priv->mcg_dentry = priv->path_dentry =NULL ;
drivers/infiniband/ulp/ipoib/ipoib_ib.c +3 -17
@@ -974,19 +974,6 @@ static inline int update_parent_pkey(struct ipoib_dev_priv *priv)*/ priv->dev->broadcast[8 ] = priv->pkey >>8 ; priv->dev->broadcast[9 ] = priv->pkey &0xff ; - -/* -* Update the broadcast address in the priv->broadcast object, -* in case it already exists, otherwise no one will do that. -*/ -if (priv->broadcast) { -spin_lock_irq (&priv->lock); -memcpy (priv->broadcast->mcmember.mgid.raw, - priv->dev->broadcast +4 , -sizeof (union ib_gid )); -spin_unlock_irq (&priv->lock); - } -return 0 ; }
@@ -1190,13 +1177,10 @@ static void __ipoib_ib_dev_flush(struct ipoib_dev_priv *priv,ipoib_ib_dev_down (dev);if (level ==IPOIB_FLUSH_HEAVY ) { -rtnl_lock ();if (test_bit (IPOIB_FLAG_INITIALIZED , &priv->flags))ipoib_ib_dev_stop (dev); - result =ipoib_ib_dev_open (dev); -rtnl_unlock (); -if (result) +if (ipoib_ib_dev_open (dev))return ;if (netif_queue_stopped (dev))
@@ -1236,7 +1220,9 @@ void ipoib_ib_dev_flush_heavy(struct work_struct *work)struct ipoib_dev_priv *priv = container_of(work, struct ipoib_dev_priv, flush_heavy); +rtnl_lock ();__ipoib_ib_dev_flush (priv,IPOIB_FLUSH_HEAVY ,0 ); +rtnl_unlock (); }void ipoib_ib_dev_cleanup (struct net_device *dev)
drivers/input/mouse/elan_i2c_core.c +1 -0
@@ -1251,6 +1251,7 @@ static const struct acpi_device_id elan_acpi_id[] = { { "ELAN0611", 0 }, { "ELAN0612", 0 }, { "ELAN0618", 0 }, + { "ELAN061C", 0 }, { "ELAN061D", 0 }, { "ELAN0622", 0 }, { "ELAN1000", 0 },
drivers/mtd/spi-nor/spi-nor.c +6 -0
@@ -858,6 +858,12 @@ static const struct flash_info spi_nor_ids[] = {/* ISSI */ { "is25cd512", INFO(0x7f9d20, 0, 32 * 1024, 2, SECT_4K) }, + { "is25wp032", INFO(0x9d7016, 0, 64 * 1024, 64, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { "is25wp064", INFO(0x9d7017, 0, 64 * 1024, 128, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { "is25wp128", INFO(0x9d7018, 0, 64 * 1024, 256, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },/* Macronix */ { "mx25l512e", INFO(0xc22010, 0, 64 * 1024, 1, SECT_4K) },
drivers/net/bonding/bond_main.c +4 -3
@@ -2132,9 +2132,10 @@ static void bond_miimon_commit(struct bonding *bond)if (bond_update_speed_duplex (slave) &&bond_needs_speed_duplex (bond)) { slave->link =BOND_LINK_DOWN ; -netdev_warn (bond->dev, -"failed to get link speed/duplex for %s\n" , - slave->dev->name); +if (net_ratelimit ()) +netdev_warn (bond->dev, +"failed to get link speed/duplex for %s\n" , + slave->dev->name);continue ; } bond_set_slave_link_state(slave, BOND_LINK_UP,
drivers/net/bonding/bond_netlink.c +1 -2
@@ -628,8 +628,7 @@ static int bond_fill_info(struct sk_buff *skb, goto nla_put_failure;if (nla_put (skb,IFLA_BOND_AD_ACTOR_SYSTEM , -sizeof (bond->params.ad_actor_system), - &bond->params.ad_actor_system)) +ETH_ALEN , &bond->params.ad_actor_system)) goto nla_put_failure; }if (!bond_3ad_get_active_agg_info (bond, &info)) {
drivers/net/ethernet/amazon/ena/ena_netdev.c +7 -2
@@ -1482,8 +1482,6 @@ static int ena_up_complete(struct ena_adapter *adapter)if (rc)return rc; -ena_init_napi (adapter); -ena_change_mtu (adapter->netdev, adapter->netdev->mtu);ena_refill_all_rx_bufs (adapter);
@@ -1643,6 +1641,13 @@ static int ena_up(struct ena_adapter *adapter)ena_setup_io_intr (adapter); +/* napi poll functions should be initialized before running +* request_irq(), to handle a rare condition where there is a pending +* interrupt, causing the ISR to fire immediately while the poll +* function wasn't set yet, causing a null dereference +*/ +ena_init_napi (adapter); + rc =ena_request_io_irq (adapter);if (rc) goto err_req_irq;
drivers/net/ethernet/amd/declance.c +6 -4
@@ -1030,6 +1030,7 @@ static int dec_lance_probe(struct device *bdev, const int type)int i, ret;unsigned long esar_base;unsigned char *esar; +const char *desc;if (dec_lance_debug && version_printed++ ==0 )printk (version);
@@ -1215,19 +1216,20 @@ static int dec_lance_probe(struct device *bdev, const int type)*/ switch (type) {case ASIC_LANCE : -printk ("%s: IOASIC onboard LANCE" , name); + desc ="IOASIC onboard LANCE" ;break ;case PMAD_LANCE : -printk ("%s: PMAD-AA" , name); + desc ="PMAD-AA" ;break ;case PMAX_LANCE : -printk ("%s: PMAX onboard LANCE" , name); + desc ="PMAX onboard LANCE" ;break ; }for (i =0 ; i <6 ; i++) dev->dev_addr[i] = esar[i *4 ]; -printk (", addr = %pM, irq = %d\n" , dev->dev_addr, dev->irq); +printk ("%s: %s, addr = %pM, irq = %d\n" , + name, desc, dev->dev_addr, dev->irq); dev->netdev_ops = &lance_netdev_ops; dev->watchdog_timeo =5 *HZ ;
drivers/net/ethernet/broadcom/bnxt/bnxt.c +13 -12
@@ -5580,7 +5580,9 @@ static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init) }if (link_re_init) { +mutex_lock (&bp->link_lock); rc =bnxt_update_phy_setting (bp); +mutex_unlock (&bp->link_lock);if (rc)netdev_warn (bp->dev,"failed to update phy settings\n" ); }
@@ -6230,30 +6232,28 @@ static void bnxt_sp_task(struct work_struct *work)if (test_and_clear_bit (BNXT_PERIODIC_STATS_SP_EVENT , &bp->sp_event))bnxt_hwrm_port_qstats (bp); -/* These functions below will clear BNXT_STATE_IN_SP_TASK. They -* must be the last functions to be called before exiting. -*/ if (test_and_clear_bit (BNXT_LINK_CHNG_SP_EVENT , &bp->sp_event)) { -int rc =0 ; +int rc; +mutex_lock (&bp->link_lock);if (test_and_clear_bit (BNXT_LINK_SPEED_CHNG_SP_EVENT , &bp->sp_event))bnxt_hwrm_phy_qcaps (bp); -bnxt_rtnl_lock_sp (bp); -if (test_bit (BNXT_STATE_OPEN , &bp->state)) - rc =bnxt_update_link (bp, true); -bnxt_rtnl_unlock_sp (bp); + rc =bnxt_update_link (bp, true); +mutex_unlock (&bp->link_lock);if (rc)netdev_err (bp->dev,"SP task can't update link (rc: %x)\n" , rc); }if (test_and_clear_bit (BNXT_HWRM_PORT_MODULE_SP_EVENT , &bp->sp_event)) { -bnxt_rtnl_lock_sp (bp); -if (test_bit (BNXT_STATE_OPEN , &bp->state)) -bnxt_get_port_module_status (bp); -bnxt_rtnl_unlock_sp (bp); +mutex_lock (&bp->link_lock); +bnxt_get_port_module_status (bp); +mutex_unlock (&bp->link_lock); } +/* These functions below will clear BNXT_STATE_IN_SP_TASK. They +* must be the last functions to be called before exiting. +*/ if (test_and_clear_bit (BNXT_RESET_TASK_SP_EVENT , &bp->sp_event))bnxt_reset (bp, false);
@@ -6788,6 +6788,7 @@ static int bnxt_probe_phy(struct bnxt *bp) rc);return rc; } +mutex_init (&bp->link_lock); rc =bnxt_update_link (bp, false);if (rc) {
drivers/net/ethernet/broadcom/bnxt/bnxt.h +4 -0
@@ -1109,6 +1109,10 @@ struct bnxt {unsigned long *ntp_fltr_bmap;int ntp_fltr_count; +/* To protect link related settings during link changes and +* ethtool settings changes. +*/ +struct mutex link_lock;struct bnxt_link_info link_info;struct ethtool_eee eee;u32 lpi_tmr_lo;
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +4 -0
@@ -793,6 +793,7 @@ static int bnxt_get_link_ksettings(struct net_device *dev,u32 ethtool_speed;ethtool_link_ksettings_zero_link_mode (lk_ksettings, supported); +mutex_lock (&bp->link_lock);bnxt_fw_to_ethtool_support_spds (link_info, lk_ksettings);ethtool_link_ksettings_zero_link_mode (lk_ksettings, advertising);
@@ -840,6 +841,7 @@ static int bnxt_get_link_ksettings(struct net_device *dev, base->port =PORT_FIBRE ; } base->phy_address = link_info->phy_addr; +mutex_unlock (&bp->link_lock);return 0 ; }
@@ -926,6 +928,7 @@ static int bnxt_set_link_ksettings(struct net_device *dev,if (!BNXT_SINGLE_PF (bp))return -EOPNOTSUPP ; +mutex_lock (&bp->link_lock);if (base->autoneg ==AUTONEG_ENABLE ) {BNXT_ETHTOOL_TO_FW_SPDS (fw_advertising, lk_ksettings, advertising);
@@ -970,6 +973,7 @@ static int bnxt_set_link_ksettings(struct net_device *dev, rc =bnxt_hwrm_set_link_setting (bp, set_pause, false); set_setting_exit: +mutex_unlock (&bp->link_lock);return rc; }
drivers/net/ethernet/cadence/macb.c +1 -0
@@ -1737,6 +1737,7 @@ static void macb_configure_dma(struct macb *bp)else dmacfg &= ~GEM_BIT (TXCOEN ); + dmacfg &= ~GEM_BIT (ADDR64 );#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT dmacfg |=GEM_BIT (ADDR64 );#endif
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +17 -0
@@ -2150,6 +2150,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EPERM ;if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_SET_QSET_PARAMS ) +return -EINVAL ;if (t.qset_idx >=SGE_QSETS )return -EINVAL ; if (!in_range(t.intr_lat, 0, M_NEWTIMER) ||
@@ -2249,6 +2251,9 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_GET_QSET_PARAMS ) +return -EINVAL ; +/* Display qsets for all ports when offload enabled */ if (test_bit (OFFLOAD_DEVMAP_BIT , &adapter->open_device_map)) { q1 =0 ;
@@ -2294,6 +2299,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EBUSY ;if (copy_from_user (&edata, useraddr,sizeof (edata)))return -EFAULT ; +if (edata.cmd !=CHELSIO_SET_QSET_NUM ) +return -EINVAL ;if (edata.val <1 || (edata.val >1 && !(adapter->flags &USING_MSIX )))return -EINVAL ;
@@ -2334,6 +2341,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EPERM ;if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_LOAD_FW ) +return -EINVAL ;/* Check t.len sanity ? */ fw_data =memdup_user (useraddr +sizeof (t), t.len);if (IS_ERR (fw_data))
@@ -2357,6 +2366,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EBUSY ;if (copy_from_user (&m, useraddr,sizeof (m)))return -EFAULT ; +if (m.cmd !=CHELSIO_SETMTUTAB ) +return -EINVAL ;if (m.nmtus !=NMTUS )return -EINVAL ;if (m.mtus[0 ] <81 )/* accommodate SACK */
@@ -2398,6 +2409,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EBUSY ;if (copy_from_user (&m, useraddr,sizeof (m)))return -EFAULT ; +if (m.cmd !=CHELSIO_SET_PM ) +return -EINVAL ;if (!is_power_of_2 (m.rx_pg_sz) || !is_power_of_2 (m.tx_pg_sz))return -EINVAL ;/* not power of 2 */
@@ -2431,6 +2444,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EIO ;/* need the memory controllers */ if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_GET_MEM ) +return -EINVAL ;if ((t.addr &7 ) || (t.len &7 ))return -EINVAL ;if (t.mem_id ==MEM_CM )
@@ -2483,6 +2498,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EAGAIN ;if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_SET_TRACE_FILTER ) +return -EINVAL ; tp = (const struct trace_params *)&t.sip;if (t.config_tx)
drivers/net/ethernet/cisco/enic/enic_main.c +4 -5
@@ -1708,7 +1708,7 @@ static int enic_open(struct net_device *netdev) {struct enic *enic =netdev_priv (netdev);unsigned int i; -int err; +int err, ret; err =enic_request_intr (enic);if (err) {
@@ -1766,10 +1766,9 @@ static int enic_open(struct net_device *netdev) err_out_free_rq:for (i =0 ; i < enic->rq_count; i++) { - err =vnic_rq_disable (&enic->rq[i]); -if (err) -return err; -vnic_rq_clean (&enic->rq[i], enic_free_rq_buf); + ret =vnic_rq_disable (&enic->rq[i]); +if (!ret) +vnic_rq_clean (&enic->rq[i], enic_free_rq_buf); }enic_dev_notify_unset (enic); err_out_free_intr:
drivers/net/ethernet/freescale/fec_main.c +4 -4
@@ -1152,7 +1152,7 @@ static void fec_enet_timeout_work(struct work_struct *work)napi_disable (&fep->napi);netif_tx_lock_bh (ndev);fec_restart (ndev); -netif_wake_queue (ndev); +netif_tx_wake_all_queues (ndev);netif_tx_unlock_bh (ndev);napi_enable (&fep->napi); }
@@ -1267,7 +1267,7 @@ fec_enet_tx_queue(struct net_device *ndev, u16 queue_id)/* Since we have freed up a buffer, the ring is no longer full */ -if (netif_queue_stopped (ndev)) { +if (netif_tx_queue_stopped (nq)) { entries_free =fec_enet_get_free_txdesc_num (txq);if (entries_free >= txq->tx_wake_threshold)netif_tx_wake_queue (nq);
@@ -1744,7 +1744,7 @@ static void fec_enet_adjust_link(struct net_device *ndev)napi_disable (&fep->napi);netif_tx_lock_bh (ndev);fec_restart (ndev); -netif_wake_queue (ndev); +netif_tx_wake_all_queues (ndev);netif_tx_unlock_bh (ndev);napi_enable (&fep->napi); }
@@ -2247,7 +2247,7 @@ static int fec_enet_set_pauseparam(struct net_device *ndev,napi_disable (&fep->napi);netif_tx_lock_bh (ndev);fec_restart (ndev); -netif_wake_queue (ndev); +netif_tx_wake_all_queues (ndev);netif_tx_unlock_bh (ndev);napi_enable (&fep->napi); }
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +13 -3
@@ -613,9 +613,11 @@ static int fs_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)return NETDEV_TX_OK ; } -static void fs_timeout (struct net_device *dev) +static void fs_timeout_work (struct work_struct *work) { -struct fs_enet_private *fep =netdev_priv (dev); + struct fs_enet_private *fep = container_of(work, struct fs_enet_private, + timeout_work); +struct net_device *dev = fep->ndev;unsigned long flags;int wake =0 ;
@@ -627,7 +629,6 @@ static void fs_timeout(struct net_device *dev)phy_stop (dev->phydev); (*fep->ops->stop)(dev); (*fep->ops->restart)(dev); -phy_start (dev->phydev); }phy_start (dev->phydev);
@@ -639,6 +640,13 @@ static void fs_timeout(struct net_device *dev)netif_wake_queue (dev); } +static void fs_timeout (struct net_device *dev) +{ +struct fs_enet_private *fep =netdev_priv (dev); + +schedule_work (&fep->timeout_work); +} +/*----------------------------------------------------------------------------- * generic link-change handler - should be sufficient for most cases *-----------------------------------------------------------------------------*/
@@ -759,6 +767,7 @@ static int fs_enet_close(struct net_device *dev)netif_stop_queue (dev);netif_carrier_off (dev);napi_disable (&fep->napi); +cancel_work_sync (&fep->timeout_work);phy_stop (dev->phydev);spin_lock_irqsave (&fep->lock, flags);
@@ -1033,6 +1042,7 @@ static int fs_enet_probe(struct platform_device *ofdev) ndev->netdev_ops = &fs_enet_netdev_ops; ndev->watchdog_timeo =2 *HZ ; +INIT_WORK (&fep->timeout_work, fs_timeout_work);netif_napi_add (ndev, &fep->napi, fs_enet_napi, fpi->napi_weight); ndev->ethtool_ops = &fs_ethtool_ops;
drivers/net/ethernet/freescale/fs_enet/fs_enet.h +1 -0
@@ -124,6 +124,7 @@ struct fs_enet_private {spinlock_t lock;/* during all ops except TX pckt processing */ spinlock_t tx_lock;/* during fs_start_xmit and fs_tx */ struct fs_platform_info *fpi; +struct work_struct timeout_work;const struct fs_ops *ops;int rx_ring, tx_ring;dma_addr_t ring_mem_addr;
drivers/net/ethernet/intel/i40e/i40e_nvm.c +60 -38
180 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_prototype.h +0 -2
@@ -311,8 +311,6 @@ i40e_status i40e_acquire_nvm(struct i40e_hw *hw,void i40e_release_nvm (struct i40e_hw *hw);i40e_status i40e_read_nvm_word (struct i40e_hw *hw,u16 offset,u16 *data); -i40e_status i40e_read_nvm_buffer (struct i40e_hw *hw,u16 offset, -u16 *words,u16 *data);i40e_status i40e_update_nvm_checksum (struct i40e_hw *hw);i40e_status i40e_validate_nvm_checksum (struct i40e_hw *hw,u16 *checksum);
drivers/net/ethernet/intel/igb/e1000_82575.c +0 -12
@@ -245,19 +245,7 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw) hw->bus.func = (rd32 (E1000_STATUS ) &E1000_STATUS_FUNC_MASK ) >>E1000_STATUS_FUNC_SHIFT ; -/* Make sure the PHY is in a good state. Several people have reported -* firmware leaving the PHY's page select register set to something -* other than the default of zero, which causes the PHY ID read to -* access something other than the intended register. -*/ - ret_val = hw->phy.ops.reset (hw); -if (ret_val) { -hw_dbg ("Error resetting the PHY.\n" ); - goto out; - } -/* Set phy->phy_addr and phy->id. */ -igb_write_phy_reg_82580 (hw,I347AT4_PAGE_SELECT ,0 ); ret_val =igb_get_phy_id_82575 (hw);if (ret_val)return ret_val;
drivers/net/ethernet/mellanox/mlx5/core/cmd.c +4 -2
@@ -965,7 +965,7 @@ static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *in, err =wait_func (dev, ent);if (err == -ETIMEDOUT ) - goto out_free; + goto out; ds = ent->ts2 - ent->ts1; op =MLX5_GET (mbox_in, in->first.data, opcode);
@@ -1428,6 +1428,7 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec, bool forced)mlx5_core_err (dev,"Command completion arrived after timeout (entry idx = %d).\n" , ent->idx);free_ent (cmd, ent->idx); +free_cmd (ent); }continue ; }
@@ -1486,7 +1487,8 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec, bool forced)free_msg (dev, ent->in); err = err ? err : ent->status; -free_cmd (ent); +if (!forced) +free_cmd (ent);callback (err, context); }else {complete (&ent->done);
drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c +6 -0
@@ -197,9 +197,15 @@ static int mlx5e_am_stats_compare(struct mlx5e_rx_am_stats *curr,return (curr->bpms > prev->bpms) ?MLX5E_AM_STATS_BETTER :MLX5E_AM_STATS_WORSE ; +if (!prev->ppms) +return curr->ppms ?MLX5E_AM_STATS_BETTER : +MLX5E_AM_STATS_SAME ; +if (IS_SIGNIFICANT_DIFF (curr->ppms, prev->ppms))return (curr->ppms > prev->ppms) ?MLX5E_AM_STATS_BETTER :MLX5E_AM_STATS_WORSE ; +if (!prev->epms) +return MLX5E_AM_STATS_SAME ;if (IS_SIGNIFICANT_DIFF (curr->epms, prev->epms)) return (curr->epms < prev->epms) ? MLX5E_AM_STATS_BETTER :
drivers/net/ethernet/mellanox/mlx5/core/health.c +3 -2
@@ -369,10 +369,11 @@ void mlx5_drain_health_wq(struct mlx5_core_dev *dev)void mlx5_drain_health_recovery (struct mlx5_core_dev *dev) {struct mlx5_core_health *health = &dev->priv.health; +unsigned long flags; -spin_lock (&health->wq_lock); +spin_lock_irqsave (&health->wq_lock, flags);set_bit (MLX5_DROP_NEW_RECOVERY_WORK , &health->flags); -spin_unlock (&health->wq_lock); +spin_unlock_irqrestore (&health->wq_lock, flags);cancel_delayed_work_sync (&dev->priv.health.recover_work); }
drivers/net/ethernet/mellanox/mlx5/core/main.c +1 -1
@@ -957,7 +957,7 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv,if (err) {dev_err (&dev->pdev->dev,"Firmware over %d MS in pre-initializing state, aborting\n" ,FW_PRE_INIT_TIMEOUT_MILI ); - goto out; + goto out_err; } err =mlx5_cmd_init (dev);
drivers/net/ethernet/qlogic/qed/qed_hw.c +7 -0
@@ -34,6 +34,7 @@ struct qed_ptt {struct list_head list_entry;unsigned int idx;struct pxp_ptt_entry pxp; +u8 hwfn_id; };struct qed_ptt_pool {
@@ -55,6 +56,7 @@ int qed_ptt_pool_alloc(struct qed_hwfn *p_hwfn) p_pool->ptts[i].idx = i; p_pool->ptts[i].pxp.offset =QED_BAR_INVALID_OFFSET ; p_pool->ptts[i].pxp.pretend.control =0 ; + p_pool->ptts[i].hwfn_id = p_hwfn->my_id;if (i >=RESERVED_PTT_MAX )list_add (&p_pool->ptts[i].list_entry, &p_pool->free_list);
@@ -169,6 +171,11 @@ static u32 qed_set_ptt(struct qed_hwfn *p_hwfn, offset = hw_addr - win_hw_addr; +if (p_ptt->hwfn_id != p_hwfn->my_id) +DP_NOTICE (p_hwfn, +"ptt[%d] of hwfn[%02x] is used by hwfn[%02x]!\n" , + p_ptt->idx, p_ptt->hwfn_id, p_hwfn->my_id); +/* Verify the address is within the window */ if (hw_addr < win_hw_addr || offset >=PXP_EXTERNAL_BAR_PF_WINDOW_SINGLE_SIZE ) {
drivers/net/ethernet/qlogic/qed/qed_roce.c +4 -11
@@ -1059,23 +1059,16 @@ static void qed_rdma_copy_gids(struct qed_rdma_qp *qp, __le32 *src_gid,static enum roce_flavor qed_roce_mode_to_flavor (enum roce_mode roce_mode) { -enum roce_flavor flavor; -switch (roce_mode) {case ROCE_V1 : - flavor =PLAIN_ROCE ; -break ; +return PLAIN_ROCE ;case ROCE_V2_IPV4 : - flavor =RROCE_IPV4 ; -break ; +return RROCE_IPV4 ;case ROCE_V2_IPV6 : - flavor =ROCE_V2_IPV6 ; -break ; +return RROCE_IPV6 ;default : - flavor =MAX_ROCE_MODE ; -break ; +return MAX_ROCE_FLAVOR ; } -return flavor; }static int qed_roce_alloc_cid (struct qed_hwfn *p_hwfn,u16 *cid)
drivers/net/ethernet/qlogic/qed/qed_vf.c +0 -1
@@ -295,7 +295,6 @@ static int qed_vf_pf_acquire(struct qed_hwfn *p_hwfn) }if (!p_iov->b_pre_fp_hsi && -ETH_HSI_VER_MINOR && (resp->pfdev_info.minor_fp_hsi <ETH_HSI_VER_MINOR )) { DP_INFO(p_hwfn, "PF is using older fastpath HSI; %02x.%02x is configured\n",
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +24 -2
@@ -1825,22 +1825,44 @@ struct qlcnic_hardware_ops {u32 (*get_cap_size)(void *,int );void (*set_sys_info)(void *,int ,u32 );void (*store_cap_mask)(void *,u32 ); +bool (*encap_rx_offload) (struct qlcnic_adapter *adapter); +bool (*encap_tx_offload) (struct qlcnic_adapter *adapter); };extern struct qlcnic_nic_template qlcnic_vf_ops; -static inline bool qlcnic_encap_tx_offload (struct qlcnic_adapter *adapter) +static inline bool qlcnic_83xx_encap_tx_offload (struct qlcnic_adapter *adapter) {return adapter->ahw->extra_capability[0 ] &QLCNIC_83XX_FW_CAPAB_ENCAP_TX_OFFLOAD ; } -static inline bool qlcnic_encap_rx_offload (struct qlcnic_adapter *adapter) +static inline bool qlcnic_83xx_encap_rx_offload (struct qlcnic_adapter *adapter) {return adapter->ahw->extra_capability[0 ] &QLCNIC_83XX_FW_CAPAB_ENCAP_RX_OFFLOAD ; } +static inline bool qlcnic_82xx_encap_tx_offload (struct qlcnic_adapter *adapter) +{ +return false; +} + +static inline bool qlcnic_82xx_encap_rx_offload (struct qlcnic_adapter *adapter) +{ +return false; +} + +static inline bool qlcnic_encap_rx_offload (struct qlcnic_adapter *adapter) +{ +return adapter->ahw->hw_ops->encap_rx_offload (adapter); +} + +static inline bool qlcnic_encap_tx_offload (struct qlcnic_adapter *adapter) +{ +return adapter->ahw->hw_ops->encap_tx_offload (adapter); +} +static inline int qlcnic_start_firmware (struct qlcnic_adapter *adapter) {return adapter->nic_ops->start_firmware (adapter);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +2 -0
@@ -242,6 +242,8 @@ static struct qlcnic_hardware_ops qlcnic_83xx_hw_ops = { .get_cap_size = qlcnic_83xx_get_cap_size, .set_sys_info = qlcnic_83xx_set_sys_info, .store_cap_mask = qlcnic_83xx_store_cap_mask, + .encap_rx_offload = qlcnic_83xx_encap_rx_offload, + .encap_tx_offload = qlcnic_83xx_encap_tx_offload, };static struct qlcnic_nic_template qlcnic_83xx_ops = {
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +2 -0
@@ -632,6 +632,8 @@ static struct qlcnic_hardware_ops qlcnic_hw_ops = { .get_cap_size = qlcnic_82xx_get_cap_size, .set_sys_info = qlcnic_82xx_set_sys_info, .store_cap_mask = qlcnic_82xx_store_cap_mask, + .encap_rx_offload = qlcnic_82xx_encap_rx_offload, + .encap_tx_offload = qlcnic_82xx_encap_tx_offload, };static int qlcnic_check_multi_tx_capability (struct qlcnic_adapter *adapter)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c +2 -0
@@ -77,6 +77,8 @@ static struct qlcnic_hardware_ops qlcnic_sriov_vf_hw_ops = { .free_mac_list = qlcnic_sriov_vf_free_mac_list, .enable_sds_intr = qlcnic_83xx_enable_sds_intr, .disable_sds_intr = qlcnic_83xx_disable_sds_intr, + .encap_rx_offload = qlcnic_83xx_encap_rx_offload, + .encap_tx_offload = qlcnic_83xx_encap_tx_offload, };static struct qlcnic_nic_template qlcnic_sriov_vf_ops = {
drivers/net/ethernet/realtek/r8169.c +3 -5
@@ -7559,17 +7559,15 @@ static int rtl8169_poll(struct napi_struct *napi, int budget) struct rtl8169_private *tp = container_of(napi, struct rtl8169_private, napi);struct net_device *dev = tp->dev;u16 enable_mask =RTL_EVENT_NAPI | tp->event_slow; -int work_done=0 ; +int work_done;u16 status; status =rtl_get_events (tp);rtl_ack_events (tp, status & ~tp->event_slow); -if (status &RTL_EVENT_NAPI_RX ) - work_done =rtl_rx (dev, tp, (u32 ) budget); + work_done =rtl_rx (dev, tp, (u32 ) budget); -if (status &RTL_EVENT_NAPI_TX ) -rtl_tx (dev, tp); +rtl_tx (dev, tp);if (status & tp->event_slow) { enable_mask &= ~tp->event_slow;
drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c +5 -1
@@ -37,6 +37,7 @@#define TSE_PCS_CONTROL_AN_EN_MASK BIT(12)#define TSE_PCS_CONTROL_REG 0x00#define TSE_PCS_CONTROL_RESTART_AN_MASK BIT(9) +#define TSE_PCS_CTRL_AUTONEG_SGMII 0x1140#define TSE_PCS_IF_MODE_REG 0x28#define TSE_PCS_LINK_TIMER_0_REG 0x24#define TSE_PCS_LINK_TIMER_1_REG 0x26
@@ -65,6 +66,7 @@#define TSE_PCS_SW_RESET_TIMEOUT 100#define TSE_PCS_USE_SGMII_AN_MASK BIT(1)#define TSE_PCS_USE_SGMII_ENA BIT(0) +#define TSE_PCS_IF_USE_SGMII 0x03#define SGMII_ADAPTER_CTRL_REG 0x00#define SGMII_ADAPTER_DISABLE 0x0001
@@ -101,7 +103,9 @@ int tse_pcs_init(void __iomem *base, struct tse_pcs *pcs) {int ret =0 ; -writew (TSE_PCS_USE_SGMII_ENA , base +TSE_PCS_IF_MODE_REG ); +writew (TSE_PCS_IF_USE_SGMII , base +TSE_PCS_IF_MODE_REG ); + +writew (TSE_PCS_CTRL_AUTONEG_SGMII , base +TSE_PCS_CONTROL_REG );writew (TSE_PCS_SGMII_LINK_TIMER_0 , base +TSE_PCS_LINK_TIMER_0_REG );writew (TSE_PCS_SGMII_LINK_TIMER_1 , base +TSE_PCS_LINK_TIMER_1_REG );
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +2 -1
@@ -2199,7 +2199,8 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)unsigned int nopaged_len =skb_headlen (skb);int i, csum_insertion =0 , is_jumbo =0 ;int nfrags =skb_shinfo (skb)->nr_frags; -unsigned int entry, first_entry; +int entry; +unsigned int first_entry;struct dma_desc *desc, *first;unsigned int enh_desc;unsigned int des;
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +1 -1
@@ -216,7 +216,7 @@ static int stmmac_mdio_write_gmac4(struct mii_bus *bus, int phyaddr, int phyreg,*/ int stmmac_mdio_reset (struct mii_bus *bus) { -#if defined(CONFIG_STMMAC_PLATFORM ) +#if IS_ENABLED (CONFIG_STMMAC_PLATFORM )struct net_device *ndev = bus->priv;struct stmmac_priv *priv =netdev_priv (ndev);unsigned int mii_address = priv->hw->mii.addr;
drivers/net/macsec.c +2 -0
@@ -744,6 +744,7 @@ static struct sk_buff *macsec_encrypt(struct sk_buff *skb,sg_init_table (sg, ret); ret =skb_to_sgvec (skb, sg,0 , skb->len);if (unlikely (ret <0 )) { +aead_request_free (req);macsec_txsa_put (tx_sa);kfree_skb (skb);return ERR_PTR (ret);
@@ -956,6 +957,7 @@ static struct sk_buff *macsec_decrypt(struct sk_buff *skb,sg_init_table (sg, ret); ret =skb_to_sgvec (skb, sg,0 , skb->len);if (unlikely (ret <0 )) { +aead_request_free (req);kfree_skb (skb);return ERR_PTR (ret); }
drivers/net/phy/marvell.c +1 -1
@@ -1610,7 +1610,7 @@ static struct phy_driver marvell_drivers[] = { .flags = PHY_HAS_INTERRUPT, .probe = marvell_probe, .config_init = &m88e1145_config_init, - .config_aneg = &marvell_config_aneg, + .config_aneg = &m88e1101_config_aneg, .read_status = &genphy_read_status, .ack_interrupt = &marvell_ack_interrupt, .config_intr = &marvell_config_intr,
drivers/net/usb/asix_common.c +3 -0
@@ -575,6 +575,9 @@ int asix_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)struct usbnet *dev =netdev_priv (net);u8 opt =0 ; +if (wolinfo->wolopts & ~(WAKE_PHY |WAKE_MAGIC )) +return -EINVAL ; +if (wolinfo->wolopts &WAKE_PHY ) opt |=AX_MONITOR_LINK ;if (wolinfo->wolopts &WAKE_MAGIC )
drivers/net/usb/ax88179_178a.c +3 -0
@@ -566,6 +566,9 @@ ax88179_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)struct usbnet *dev =netdev_priv (net);u8 opt =0 ; +if (wolinfo->wolopts & ~(WAKE_PHY |WAKE_MAGIC )) +return -EINVAL ; +if (wolinfo->wolopts &WAKE_PHY ) opt |=AX_MONITOR_MODE_RWLC ;if (wolinfo->wolopts &WAKE_MAGIC )
drivers/net/usb/cdc_ncm.c +2 -2
@@ -772,7 +772,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_int err;u8 iface_no;struct usb_cdc_parsed_header hdr; -u16 curr_ntb_format; +__le16 curr_ntb_format; ctx =kzalloc (sizeof (*ctx),GFP_KERNEL );if (!ctx)
@@ -890,7 +890,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ goto error2; } -if (curr_ntb_format ==USB_CDC_NCM_NTB32_FORMAT ) { +if (curr_ntb_format ==cpu_to_le16 (USB_CDC_NCM_NTB32_FORMAT )) {dev_info (&intf->dev,"resetting NTB format to 16-bit" ); err =usbnet_write_cmd (dev,USB_CDC_SET_NTB_FORMAT , USB_TYPE_CLASS | USB_DIR_OUT
drivers/net/usb/lan78xx.c +4 -13
@@ -1311,19 +1311,10 @@ static int lan78xx_set_wol(struct net_device *netdev,if (ret <0 )return ret; - pdata->wol =0 ; -if (wol->wolopts &WAKE_UCAST ) - pdata->wol |=WAKE_UCAST ; -if (wol->wolopts &WAKE_MCAST ) - pdata->wol |=WAKE_MCAST ; -if (wol->wolopts &WAKE_BCAST ) - pdata->wol |=WAKE_BCAST ; -if (wol->wolopts &WAKE_MAGIC ) - pdata->wol |=WAKE_MAGIC ; -if (wol->wolopts &WAKE_PHY ) - pdata->wol |=WAKE_PHY ; -if (wol->wolopts &WAKE_ARP ) - pdata->wol |=WAKE_ARP ; +if (wol->wolopts & ~WAKE_ALL ) +return -EINVAL ; + + pdata->wol = wol->wolopts;device_set_wakeup_enable (&dev->udev->dev, (bool )wol->wolopts);
drivers/net/usb/r8152.c +3 -0
@@ -3776,6 +3776,9 @@ static int rtl8152_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)if (!rtl_can_wakeup (tp))return -EOPNOTSUPP ; +if (wol->wolopts & ~WAKE_ANY ) +return -EINVAL ; + ret =usb_autopm_get_interface (tp->intf);if (ret <0 ) goto out_set_wol;
drivers/net/usb/smsc75xx.c +3 -0
@@ -731,6 +731,9 @@ static int smsc75xx_ethtool_set_wol(struct net_device *net,struct smsc75xx_priv *pdata = (struct smsc75xx_priv *)(dev->data[0 ]);int ret; +if (wolinfo->wolopts & ~SUPPORTED_WAKE ) +return -EINVAL ; + pdata->wolopts = wolinfo->wolopts &SUPPORTED_WAKE ; ret =device_set_wakeup_enable (&dev->udev->dev, pdata->wolopts);
drivers/net/usb/smsc95xx.c +3 -0
@@ -775,6 +775,9 @@ static int smsc95xx_ethtool_set_wol(struct net_device *net,struct smsc95xx_priv *pdata = (struct smsc95xx_priv *)(dev->data[0 ]);int ret; +if (wolinfo->wolopts & ~SUPPORTED_WAKE ) +return -EINVAL ; + pdata->wolopts = wolinfo->wolopts &SUPPORTED_WAKE ; ret =device_set_wakeup_enable (&dev->udev->dev, pdata->wolopts);
drivers/net/usb/sr9800.c +3 -0
@@ -421,6 +421,9 @@ sr_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)struct usbnet *dev =netdev_priv (net);u8 opt =0 ; +if (wolinfo->wolopts & ~(WAKE_PHY |WAKE_MAGIC )) +return -EINVAL ; +if (wolinfo->wolopts &WAKE_PHY ) opt |=SR_MONITOR_LINK ;if (wolinfo->wolopts &WAKE_MAGIC )
drivers/net/wireless/ath/ath10k/ahb.c +1 -1
@@ -640,6 +640,7 @@ static int ath10k_ahb_hif_start(struct ath10k *ar) {ath10k_dbg (ar,ATH10K_DBG_BOOT ,"boot ahb hif start\n" ); +napi_enable (&ar->napi);ath10k_ce_enable_interrupts (ar);ath10k_pci_enable_legacy_irq (ar);
@@ -692,7 +693,6 @@ static int ath10k_ahb_hif_power_up(struct ath10k *ar)ath10k_err (ar,"could not wake up target CPU: %d\n" , ret); goto err_ce_deinit; } -napi_enable (&ar->napi);return 0 ;
drivers/net/wireless/ath/ath10k/core.c +2 -1
@@ -698,7 +698,8 @@ static int ath10k_core_get_board_id_from_otp(struct ath10k *ar)if ((result &ATH10K_BMI_BOARD_ID_STATUS_MASK ) !=0 || (board_id ==0 )) { -ath10k_warn (ar,"board id is not exist in otp, ignore it\n" ); +ath10k_dbg (ar,ATH10K_DBG_BOOT , +"board id does not exist in otp, ignore it\n" );return -EOPNOTSUPP ; }
drivers/net/wireless/mac80211_hwsim.c +1 -2
@@ -2665,8 +2665,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,list_add_tail (&data->list, &hwsim_radios);spin_unlock_bh (&hwsim_radio_lock); -if (idx >0 ) -hwsim_mcast_new_radio (idx, info, param); +hwsim_mcast_new_radio (idx, info, param);return idx;
drivers/net/wireless/marvell/libertas/if_sdio.c +4 -0
@@ -1368,6 +1368,10 @@ static int if_sdio_suspend(struct device *dev)if (priv->wol_criteria ==EHS_REMOVE_WAKEUP ) {dev_info (dev,"Suspend without wake params -- powering down card\n" );if (priv->fw_ready) { + ret =lbs_suspend (priv); +if (ret) +return ret; + priv->power_up_on_resume = true;if_sdio_power_off (card); }
drivers/net/xen-netfront.c +6 -5
@@ -1848,7 +1848,7 @@ static int talk_to_netback(struct xenbus_device *dev, err =xen_net_read_mac (dev, info->netdev->dev_addr);if (err) {xenbus_dev_fatal (dev, err,"parsing %s/mac" , dev->nodename); - goto out; + goto out_unlocked; }rtnl_lock ();
@@ -1963,6 +1963,7 @@ static int talk_to_netback(struct xenbus_device *dev,xennet_destroy_queues (info); out:rtnl_unlock (); +out_unlocked:device_unregister (&dev->dev);return err; }
@@ -1994,10 +1995,6 @@ static int xennet_connect(struct net_device *dev)/* talk_to_netback() sets the correct number of queues */ num_queues = dev->real_num_tx_queues; -rtnl_lock (); -netdev_update_features (dev); -rtnl_unlock (); -if (dev->reg_state ==NETREG_UNINITIALIZED ) { err =register_netdev (dev);if (err) {
@@ -2007,6 +2004,10 @@ static int xennet_connect(struct net_device *dev) } } +rtnl_lock (); +netdev_update_features (dev); +rtnl_unlock (); +/* * All public and private state should now be sane. Get * ready to start sending and receiving packets and give the driver
drivers/nvme/host/pci.c +7 -11
@@ -1393,11 +1393,9 @@ static inline void nvme_release_cmb(struct nvme_dev *dev)if (dev->cmb) {iounmap (dev->cmb); dev->cmb =NULL ; -if (dev->cmbsz) { -sysfs_remove_file_from_group (&dev->ctrl.device->kobj, - &dev_attr_cmb.attr,NULL ); - dev->cmbsz =0 ; - } +sysfs_remove_file_from_group (&dev->ctrl.device->kobj, + &dev_attr_cmb.attr,NULL ); + dev->cmbsz =0 ; } }
@@ -1632,16 +1630,14 @@ static int nvme_pci_enable(struct nvme_dev *dev)/* * CMBs can currently only exist on >=1.2 PCIe devices. We only -* populate sysfs if a CMB is implemented. Note that we add the -* CMB attribute to the nvme_ctrl kobj which removes the need to remove -* it on exit. Since nvme_dev_attrs_group has no name we can pass -* NULL as final argument to sysfs_add_file_to_group. +* populate sysfs if a CMB is implemented. Since nvme_dev_attrs_group +* has no name we can pass NULL as final argument to +* sysfs_add_file_to_group. */ if (readl (dev->bar +NVME_REG_VS ) >=NVME_VS (1 ,2 ,0 )) { dev->cmb =nvme_map_cmb (dev); - -if (dev->cmbsz) { +if (dev->cmb) {if (sysfs_add_file_to_group (&dev->ctrl.device->kobj, &dev_attr_cmb.attr,NULL )) dev_warn(dev->dev,
drivers/nvme/target/admin-cmd.c +1 -0
@@ -192,6 +192,7 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req) id->vid =0 ; id->ssvid =0 ; +memset (id->sn,' ' ,sizeof (id->sn));bin2hex (id->sn, &ctrl->subsys->serial,min (sizeof (ctrl->subsys->serial),sizeof (id->sn) /2 ));copy_and_pad (id->mn,sizeof (id->mn), model,sizeof (model) -1 );
drivers/pci/quirks.c +1 -1
@@ -1634,8 +1634,8 @@ static void quirk_pcie_mch(struct pci_dev *pdev)DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_E7520_MCH , quirk_pcie_mch);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_E7320_MCH , quirk_pcie_mch);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_E7525_MCH , quirk_pcie_mch); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_HUAWEI ,0x1610 , quirk_pcie_mch); +DECLARE_PCI_FIXUP_CLASS_FINAL (PCI_VENDOR_ID_HUAWEI ,0x1610 ,PCI_CLASS_BRIDGE_PCI ,8 , quirk_pcie_mch);/* * It's possible for the MSI to get corrupted if shpc and acpi
drivers/platform/x86/acer-wmi.c +4 -5
@@ -1856,7 +1856,7 @@ static acpi_status __init acer_wmi_get_handle_cb(acpi_handle ah, u32 level,if (!strcmp (ctx,"SENR" )) {if (acpi_bus_get_device (ah, &dev))return AE_OK ; -if (!strcmp (ACER_WMID_ACCEL_HID ,acpi_device_hid (dev))) +if (strcmp (ACER_WMID_ACCEL_HID ,acpi_device_hid (dev)))return AE_OK ; }else return AE_OK ;
@@ -1877,8 +1877,7 @@ static int __init acer_wmi_get_handle(const char *name, const char *prop, handle =NULL ; status =acpi_get_devices (prop, acer_wmi_get_handle_cb, (void *)name, &handle); - -if (ACPI_SUCCESS (status)) { +if (ACPI_SUCCESS (status) && handle) { *ah = handle;return 0 ; }else {
@@ -2247,8 +2246,8 @@ static int __init acer_wmi_init(void)if (err)return err; err =acer_wmi_accel_setup (); -if (err) -return err; +if (err && err != -ENODEV ) +pr_warn ("Cannot enable accelerometer\n" ); } err =platform_driver_register (&acer_platform_driver);
drivers/ptp/ptp_chardev.c +4 -0
@@ -24,6 +24,8 @@#include <linux/slab.h> #include <linux/timekeeping.h> +#include <linux/nospec.h> +#include "ptp_private.h" static int ptp_disable_pinfunc(struct ptp_clock_info *ops,
@@ -248,6 +250,7 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg) err = -EINVAL ;break ; } + pin_index =array_index_nospec (pin_index, ops->n_pins);if (mutex_lock_interruptible (&ptp->pincfg_mux))return -ERESTARTSYS ; pd = ops->pin_config[pin_index];
@@ -266,6 +269,7 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg) err = -EINVAL ;break ; } + pin_index =array_index_nospec (pin_index, ops->n_pins);if (mutex_lock_interruptible (&ptp->pincfg_mux))return -ERESTARTSYS ; err =ptp_set_pinfunc (ptp, pin_index, pd.func, pd.chan);
drivers/reset/hisilicon/hi6220_reset.c +2 -0
@@ -155,3 +155,5 @@ static int __init hi6220_reset_init(void) }postcore_initcall (hi6220_reset_init); + +MODULE_LICENSE ("GPL v2" );
drivers/scsi/aacraid/src.c +1 -1
@@ -445,7 +445,7 @@ static int aac_src_check_health(struct aac_dev *dev)return -1 ; err_blink: -return (status >16 ) &0xFF ; +return (status >>16 ) &0xFF ; }/**
drivers/scsi/qla2xxx/qla_init.c +2 -2
@@ -368,8 +368,8 @@ qla24xx_abort_sp_done(void *data, void *ptr, int res)srb_t *sp = (srb_t *)ptr;struct srb_iocb *abt = &sp->u.iocb_cmd; -del_timer (&sp->u.iocb_cmd.timer); -complete (&abt->u.abt.comp); +if (del_timer (&sp->u.iocb_cmd.timer)) +complete (&abt->u.abt.comp); } static int
drivers/soc/fsl/qbman/qman.c +3 -0
@@ -2713,6 +2713,9 @@ static int qman_alloc_range(struct gen_pool *p, u32 *result, u32 cnt) {unsigned long addr; +if (!p) +return -ENODEV ; + addr =gen_pool_alloc (p, cnt);if (!addr)return -ENOMEM ;
drivers/soc/fsl/qe/ucc.c +1 -1
@@ -626,7 +626,7 @@ static u32 ucc_get_tdm_sync_shift(enum comm_dir mode, u32 tdm_num) {u32 shift; - shift = (mode ==COMM_DIR_RX ) ?RX_SYNC_SHIFT_BASE :RX_SYNC_SHIFT_BASE ; + shift = (mode ==COMM_DIR_RX ) ?RX_SYNC_SHIFT_BASE :TX_SYNC_SHIFT_BASE ; shift -= tdm_num *2 ;return shift;
drivers/staging/wilc1000/linux_wlan.c +2 -1
@@ -1260,11 +1260,12 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type,else strcpy (ndev->name,"p2p%d" ); - vif->idx = wl->vif_num; vif->wilc = *wilc; vif->ndev = ndev; wl->vif[i] = vif; wl->vif_num = i; + vif->idx = wl->vif_num; + ndev->netdev_ops = &wilc_netdev_ops; {
drivers/usb/class/cdc-acm.c +7 -7
@@ -333,17 +333,17 @@ static void acm_ctrl_irq(struct urb *urb)if (difference &ACM_CTRL_DSR ) acm->iocount.dsr++; -if (difference &ACM_CTRL_BRK ) - acm->iocount.brk++; -if (difference &ACM_CTRL_RI ) - acm->iocount.rng++;if (difference &ACM_CTRL_DCD ) acm->iocount.dcd++; -if (difference &ACM_CTRL_FRAMING ) +if (newctrl &ACM_CTRL_BRK ) + acm->iocount.brk++; +if (newctrl &ACM_CTRL_RI ) + acm->iocount.rng++; +if (newctrl &ACM_CTRL_FRAMING ) acm->iocount.frame++; -if (difference &ACM_CTRL_PARITY ) +if (newctrl &ACM_CTRL_PARITY ) acm->iocount.parity++; -if (difference &ACM_CTRL_OVERRUN ) +if (newctrl &ACM_CTRL_OVERRUN ) acm->iocount.overrun++;spin_unlock (&acm->read_lock);
drivers/usb/core/devio.c +2 -2
@@ -1490,8 +1490,6 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb u =0 ;switch (uurb->type) {case USBDEVFS_URB_TYPE_CONTROL : -if (is_in) - allow_short = true;if (!usb_endpoint_xfer_control (&ep->desc))return -EINVAL ;/* min 8 byte setup packet */
@@ -1521,6 +1519,8 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb is_in =0 ; uurb->endpoint &= ~USB_DIR_IN ; } +if (is_in) + allow_short = true; snoop(&ps->dev->dev, "control urb: bRequestType=%02x " "bRequest=%02x wValue=%04x " "wIndex=%04x wLength=%04x\n",
drivers/usb/dwc3/dwc3-omap.c +8 -10
@@ -512,15 +512,6 @@ static int dwc3_omap_probe(struct platform_device *pdev)/* check the DMA Status */ reg =dwc3_omap_readl (omap->base,USBOTGSS_SYSCONFIG ); -irq_set_status_flags (omap->irq,IRQ_NOAUTOEN ); - ret =devm_request_threaded_irq (dev, omap->irq, dwc3_omap_interrupt, - dwc3_omap_interrupt_thread,IRQF_SHARED , -"dwc3-omap" , omap); -if (ret) { -dev_err (dev,"failed to request IRQ #%d --> %d\n" , - omap->irq, ret); - goto err1; - } ret =dwc3_omap_extcon_register (omap);if (ret <0 )
@@ -532,8 +523,15 @@ static int dwc3_omap_probe(struct platform_device *pdev) goto err2; } + ret =devm_request_threaded_irq (dev, omap->irq, dwc3_omap_interrupt, + dwc3_omap_interrupt_thread,IRQF_SHARED , +"dwc3-omap" , omap); +if (ret) { +dev_err (dev,"failed to request IRQ #%d --> %d\n" , + omap->irq, ret); + goto err1; + }dwc3_omap_enable_irqs (omap); -enable_irq (omap->irq);return 0 ; err2:
drivers/usb/gadget/function/f_mass_storage.c +3 -0
@@ -220,6 +220,8 @@#include <linux/usb/gadget.h> #include <linux/usb/composite.h> +#include <linux/nospec.h> +#include "configfs.h"
@@ -3260,6 +3262,7 @@ static struct config_group *fsg_lun_make(struct config_group *group, fsg_opts =to_fsg_opts (&group->cg_item);if (num >=FSG_MAX_LUNS )return ERR_PTR (-ERANGE ); + num =array_index_nospec (num,FSG_MAX_LUNS );mutex_lock (&fsg_opts->lock);if (fsg_opts->refcnt || fsg_opts->common->luns[num]) {
drivers/usb/host/xhci-hub.c +1 -1
@@ -366,7 +366,7 @@ int xhci_find_slot_id_by_port(struct usb_hcd *hcd, struct xhci_hcd *xhci, slot_id =0 ;for (i =0 ; i <MAX_HC_SLOTS ; i++) { -if (!xhci->devs[i]) +if (!xhci->devs[i] || !xhci->devs[i]->udev)continue ; speed = xhci->devs[i]->udev->speed; if (((speed >= USB_SPEED_SUPER) == (hcd->speed >= HCD_USB3))
drivers/usb/renesas_usbhs/mod_gadget.c +2 -5
@@ -639,14 +639,11 @@ static int usbhsg_ep_disable(struct usb_ep *ep)struct usbhsg_uep *uep =usbhsg_ep_to_uep (ep);struct usbhs_pipe *pipe;unsigned long flags; -int ret =0 ;spin_lock_irqsave (&uep->lock, flags); pipe =usbhsg_uep_to_pipe (uep); -if (!pipe) { - ret = -EINVAL ; +if (!pipe) goto out; - }usbhsg_pipe_disable (uep);usbhs_pipe_free (pipe);
@@ -1085,7 +1082,6 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv) ret = -ENOMEM ; goto usbhs_mod_gadget_probe_err_gpriv; } -spin_lock_init (&uep->lock); gpriv->transceiver =usb_get_phy (USB_PHY_TYPE_UNDEFINED ); dev_info(dev, "%stransceiver found\n",
@@ -1135,6 +1131,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv) uep->ep.name = uep->ep_name; uep->ep.ops = &usbhsg_ep_ops;INIT_LIST_HEAD (&uep->ep.ep_list); +spin_lock_init (&uep->lock);/* init DCP */ if (usbhsg_is_dcp (uep)) {
drivers/vhost/vhost.c +2 -0
@@ -28,6 +28,7 @@#include <linux/module.h> #include <linux/sort.h> #include <linux/interval_tree_generic.h> +#include <linux/nospec.h> #include "vhost.h"
@@ -1289,6 +1290,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)if (idx >= d->nvqs)return -ENOBUFS ; + idx =array_index_nospec (idx, d->nvqs); vq = d->vqs[idx];mutex_lock (&vq->mutex);
drivers/video/fbdev/efifb.c +1 -1
@@ -375,7 +375,7 @@ static void efifb_fixup_resources(struct pci_dev *dev)if (!base)return ; -for (i =0 ; i <PCI_STD_RESOURCE_END ; i++) { +for (i =0 ; i <=PCI_STD_RESOURCE_END ; i++) {struct resource *res = &dev->resource[i];if (!(res->flags &IORESOURCE_MEM ))
drivers/video/fbdev/pxa168fb.c +3 -3
@@ -712,7 +712,7 @@ static int pxa168fb_probe(struct platform_device *pdev)/* * enable controller clock */ -clk_enable (fbi->clk); +clk_prepare_enable (fbi->clk);pxa168fb_set_par (info);
@@ -767,7 +767,7 @@ static int pxa168fb_probe(struct platform_device *pdev) failed_free_cmap:fb_dealloc_cmap (&info->cmap); failed_free_clk: -clk_disable (fbi->clk); +clk_disable_unprepare (fbi->clk); failed_free_fbmem:dma_free_coherent (fbi->dev, info->fix.smem_len, info->screen_base, fbi->fb_start_dma);
@@ -807,7 +807,7 @@ static int pxa168fb_remove(struct platform_device *pdev)dma_free_wc (fbi->dev,PAGE_ALIGN (info->fix.smem_len), info->screen_base, info->fix.smem_start); -clk_disable (fbi->clk); +clk_disable_unprepare (fbi->clk);framebuffer_release (info);
fs/btrfs/extent_io.c +122 -2
148 lines not on this page · raw message
fs/btrfs/inode.c +1 -1
@@ -2966,7 +2966,7 @@ static int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent) ret =test_range_bit (io_tree, ordered_extent->file_offset, ordered_extent->file_offset + ordered_extent->len -1 , -EXTENT_DEFRAG ,1 , cached_state); +EXTENT_DEFRAG ,0 , cached_state);if (ret) {u64 last_snapshot =btrfs_root_last_snapshot (&root->root_item);if (0 && last_snapshot >=BTRFS_I (inode)->generation)
fs/btrfs/send.c +4 -3
@@ -5165,15 +5165,12 @@ static int is_extent_unchanged(struct send_ctx *sctx, goto out; } - right_disknr =btrfs_file_extent_disk_bytenr (eb, ei);if (right_type ==BTRFS_FILE_EXTENT_INLINE ) { right_len =btrfs_file_extent_inline_len (eb, slot, ei); right_len =PAGE_ALIGN (right_len); }else { right_len =btrfs_file_extent_num_bytes (eb, ei); } - right_offset =btrfs_file_extent_offset (eb, ei); - right_gen =btrfs_file_extent_generation (eb, ei);/* * Are we at extent 8? If yes, we know the extent is changed.
@@ -5198,6 +5195,10 @@ static int is_extent_unchanged(struct send_ctx *sctx, goto out; } + right_disknr =btrfs_file_extent_disk_bytenr (eb, ei); + right_offset =btrfs_file_extent_offset (eb, ei); + right_gen =btrfs_file_extent_generation (eb, ei); + left_offset_fixed = left_offset;if (key.offset < ekey->offset) {/* Fix the right offset for 2a and 7. */
fs/cachefiles/namei.c +1 -1
@@ -340,7 +340,7 @@ static int cachefiles_bury_object(struct cachefiles_cache *cache, trap =lock_rename (cache->graveyard, dir);/* do some checks before getting the grave dentry */ -if (rep->d_parent != dir) { +if (rep->d_parent != dir ||IS_DEADDIR (d_inode (rep))) {/* the entry was probably culled when we dropped the parent dir * lock */ unlock_rename (cache->graveyard, dir);
fs/cifs/inode.c +1 -1
@@ -704,7 +704,7 @@ cifs_get_file_info(struct file *filp)/* Simple function to return a 64 bit hash of string. Rarely called */ static __u64 simple_hashstr (const char *str) { -const __u64 hash_mult =1125899906842597L ;/* a big enough prime */ +const __u64 hash_mult =1125899906842597ULL ;/* a big enough prime */ __u64 hash =0 ;while (*str)
fs/f2fs/dir.c +6 -7
@@ -212,13 +212,9 @@ static struct f2fs_dir_entry *find_in_level(struct inode *dir,f2fs_put_page (dentry_page,0 ); } -/* This is to increase the speed of f2fs_create */ -if (!de && room) { -F2FS_I (dir)->task = current; -if (F2FS_I (dir)->chash != namehash) { -F2FS_I (dir)->chash = namehash; -F2FS_I (dir)->clevel = level; - } +if (!de && room &&F2FS_I (dir)->chash != namehash) { +F2FS_I (dir)->chash = namehash; +F2FS_I (dir)->clevel = level; }return de;
@@ -259,6 +255,9 @@ struct f2fs_dir_entry *__f2fs_find_entry(struct inode *dir,break ; } out: +/* This is to increase the speed of f2fs_create */ +if (!de) +F2FS_I (dir)->task = current;return de; }
fs/fat/fatent.c +1 -0
@@ -681,6 +681,7 @@ int fat_count_free_clusters(struct super_block *sb)if (ops->ent_get (&fatent) ==FAT_ENT_FREE ) free++; }while (fat_ent_next (sbi, &fatent)); +cond_resched (); } sbi->free_clusters = free; sbi->free_clus_valid =1 ;
fs/ocfs2/dlmglue.c +4 -0
@@ -2599,6 +2599,10 @@ void ocfs2_inode_unlock_tracker(struct inode *inode,struct ocfs2_lock_res *lockres; lockres = &OCFS2_I (inode)->ip_inode_lockres; +/* had_lock means that the currect process already takes the cluster +* lock previously. If had_lock is 1, we have nothing to do here, and +* it will get unlocked where we got the lock. +*/ if (!had_lock) {ocfs2_remove_holder (lockres, oh);ocfs2_inode_unlock (inode, ex);
fs/ocfs2/xattr.c +13 -10
@@ -1330,20 +1330,21 @@ static int ocfs2_xattr_get(struct inode *inode,void *buffer, size_t buffer_size) { - int ret; + int ret, had_lock;struct buffer_head *di_bh =NULL ; +struct ocfs2_lock_holder oh; - ret =ocfs2_inode_lock (inode, &di_bh,0 ); -if (ret <0 ) { -mlog_errno (ret); -return ret; + had_lock =ocfs2_inode_lock_tracker (inode, &di_bh,0 , &oh); +if (had_lock <0 ) { +mlog_errno (had_lock); +return had_lock; }down_read (&OCFS2_I (inode)->ip_xattr_sem); ret =ocfs2_xattr_get_nolock (inode, di_bh, name_index, name, buffer, buffer_size);up_read (&OCFS2_I (inode)->ip_xattr_sem); -ocfs2_inode_unlock (inode,0 ); +ocfs2_inode_unlock_tracker (inode,0 , &oh, had_lock);brelse (di_bh);
@@ -3539,11 +3540,12 @@ int ocfs2_xattr_set(struct inode *inode, {struct buffer_head *di_bh =NULL ;struct ocfs2_dinode *di; -int ret, credits, ref_meta =0 , ref_credits =0 ; +int ret, credits, had_lock, ref_meta =0 , ref_credits =0 ;struct ocfs2_super *osb =OCFS2_SB (inode->i_sb);struct inode *tl_inode = osb->osb_tl_inode;struct ocfs2_xattr_set_ctxt ctxt = {NULL ,NULL ,NULL , };struct ocfs2_refcount_tree *ref_tree =NULL ; +struct ocfs2_lock_holder oh;struct ocfs2_xattr_info xi = { .xi_name_index = name_index,
@@ -3574,8 +3576,9 @@ int ocfs2_xattr_set(struct inode *inode,return -ENOMEM ; } - ret =ocfs2_inode_lock (inode, &di_bh,1 ); -if (ret <0 ) { + had_lock =ocfs2_inode_lock_tracker (inode, &di_bh,1 , &oh); +if (had_lock <0 ) { + ret = had_lock;mlog_errno (ret); goto cleanup_nolock; }
@@ -3672,7 +3675,7 @@ int ocfs2_xattr_set(struct inode *inode,if (ret)mlog_errno (ret); } -ocfs2_inode_unlock (inode,1 ); +ocfs2_inode_unlock_tracker (inode,1 , &oh, had_lock); cleanup_nolock:brelse (di_bh);brelse (xbs.xattr_bh);
fs/orangefs/xattr.c +3 -3
@@ -76,7 +76,7 @@ ssize_t orangefs_inode_getxattr(struct inode *inode, const char *name,if (S_ISLNK (inode->i_mode))return -EOPNOTSUPP ; -if (strlen (name) >ORANGEFS_MAX_XATTR_NAMELEN ) +if (strlen (name) >=ORANGEFS_MAX_XATTR_NAMELEN )return -EINVAL ; fsuid =from_kuid (&init_user_ns,current_fsuid ());
@@ -169,7 +169,7 @@ static int orangefs_inode_removexattr(struct inode *inode, const char *name,struct orangefs_kernel_op_s *new_op =NULL ;int ret = -ENOMEM ; -if (strlen (name) >ORANGEFS_MAX_XATTR_NAMELEN ) +if (strlen (name) >=ORANGEFS_MAX_XATTR_NAMELEN )return -EINVAL ;down_write (&orangefs_inode->xattr_sem);
@@ -233,7 +233,7 @@ int orangefs_inode_setxattr(struct inode *inode, const char *name,if (size >ORANGEFS_MAX_XATTR_VALUELEN )return -EINVAL ; -if (strlen (name) >ORANGEFS_MAX_XATTR_NAMELEN ) +if (strlen (name) >=ORANGEFS_MAX_XATTR_NAMELEN )return -EINVAL ; internal_flag =convert_to_internal_xattr_flags (flags);
fs/ufs/inode.c +1 -0
@@ -846,6 +846,7 @@ void ufs_evict_inode(struct inode * inode) inode->i_size =0 ;if (inode->i_blocks)ufs_truncate_blocks (inode); +ufs_update_inode (inode,inode_needs_sync (inode)); }invalidate_inode_buffers (inode);
fs/xfs/libxfs/xfs_trans_resv.c +1 -8
@@ -232,8 +232,6 @@ xfs_calc_write_reservation(* the super block to reflect the freed blocks: sector size * worst case split in allocation btrees per extent assuming 4 extents: * 4 exts * 2 trees * (2 * max depth - 1) * block size -* the inode btree: max depth * blocksize -* the allocation btrees: 2 trees * (max depth - 1) * block size */ STATIC uint xfs_calc_itruncate_reservation(
@@ -245,12 +243,7 @@ xfs_calc_itruncate_reservation( XFS_FSB_TO_B(mp, 1))), (xfs_calc_buf_res (9 , mp->m_sb.sb_sectsize) +xfs_calc_buf_res (xfs_allocfree_log_count (mp,4 ), -XFS_FSB_TO_B (mp,1 )) + -xfs_calc_buf_res (5 ,0 ) + -xfs_calc_buf_res (xfs_allocfree_log_count (mp,1 ), -XFS_FSB_TO_B (mp,1 )) + -xfs_calc_buf_res (2 + mp->m_ialloc_blks + - mp->m_in_maxlevels, 0))); + XFS_FSB_TO_B(mp, 1)))); }/*
include/linux/elevator.h +1 -1
@@ -102,7 +102,7 @@ struct elevator_typestruct module *elevator_owner;/* managed by elevator core */ -char icq_cache_name[ELV_NAME_MAX +5 ];/* elvname + "_io_cq" */ +char icq_cache_name[ELV_NAME_MAX +6 ];/* elvname + "_io_cq" */ struct list_head list; };
include/linux/iio/buffer-dma.h +1 -1
@@ -141,7 +141,7 @@ int iio_dma_buffer_read(struct iio_buffer *buffer, size_t n, char __user *user_buffer);size_t iio_dma_buffer_data_available (struct iio_buffer *buffer);int iio_dma_buffer_set_bytes_per_datum (struct iio_buffer *buffer,size_t bpd); -int iio_dma_buffer_set_length (struct iio_buffer *buffer,int length); +int iio_dma_buffer_set_length (struct iio_buffer *buffer,unsigned int length);int iio_dma_buffer_request_update (struct iio_buffer *buffer); int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue,
include/linux/posix-timers.h +2 -2
@@ -65,8 +65,8 @@ struct k_itimer {spinlock_t it_lock;clockid_t it_clock;/* which timer type */ timer_t it_id;/* timer id */ -int it_overrun;/* overrun on pending signal */ -int it_overrun_last;/* overrun on last delivered signal */ +s64 it_overrun;/* overrun on pending signal */ +s64 it_overrun_last;/* overrun on last delivered signal */ int it_requeue_pending;/* waiting to requeue this timer */ #define REQUEUE_PENDING 1int it_sigev_notify;/* notify word of sigevent struct */
init/main.c +1 -1
@@ -915,7 +915,7 @@ static int try_to_run_init_process(const char *init_filename) static noinline void __init kernel_init_freeable(void); -#if defined(CONFIG_DEBUG_RODATA ) || defined(CONFIG_SET_MODULE_RONX ) +#if defined(CONFIG_DEBUG_RODATA ) || defined(CONFIG_DEBUG_SET_MODULE_RONX )bool rodata_enabled__ro_after_init = true;static int __init set_debug_rodata (char *str) {
kernel/events/core.c +7 -0
@@ -4331,7 +4331,9 @@ EXPORT_SYMBOL_GPL(perf_event_read_value);static int __perf_read_group_add (struct perf_event *leader,u64 read_format,u64 *values) { +struct perf_event_context *ctx = leader->ctx;struct perf_event *sub; +unsigned long flags;int n =1 ;/* skip @nr */ int ret;
@@ -4361,12 +4363,15 @@ static int __perf_read_group_add(struct perf_event *leader,if (read_format &PERF_FORMAT_ID ) values[n++] =primary_event_id (leader); +raw_spin_lock_irqsave (&ctx->lock, flags); +list_for_each_entry (sub, &leader->sibling_list, group_entry) { values[n++] +=perf_event_count (sub);if (read_format &PERF_FORMAT_ID ) values[n++] =primary_event_id (sub); } +raw_spin_unlock_irqrestore (&ctx->lock, flags);return 0 ; }
@@ -7737,6 +7742,8 @@ void perf_tp_event(u16 event_type, u64 count, void *record, int entry_size, goto unlock;list_for_each_entry_rcu (event, &ctx->event_list, event_entry) { +if (event->cpu !=smp_processor_id ()) +continue ;if (event->attr.type !=PERF_TYPE_TRACEPOINT )continue ;if (event->attr.config != entry->type)
kernel/futex.c +10 -2
@@ -1467,8 +1467,16 @@ static int futex_atomic_op_inuser(unsigned int encoded_op, u32 __user *uaddr)int oldval, ret;if (encoded_op & (FUTEX_OP_OPARG_SHIFT <<28 )) { -if (oparg <0 || oparg >31 ) -return -EINVAL ; +if (oparg <0 || oparg >31 ) { +char comm[sizeof (current->comm)]; +/* +* kill this print and return -EINVAL when userspace +* is sane again +*/ +pr_info_ratelimited ("futex_wake_op: %s tries to shift op by %d; fix this program\n" , +get_task_comm (comm, current), oparg); + oparg &=31 ; + } oparg =1 << oparg; }
kernel/sched/fair.c +19 -3
@@ -3976,9 +3976,13 @@ static void throttle_cfs_rq(struct cfs_rq *cfs_rq)/* * Add to the _head_ of the list, so that an already-started -* distribute_cfs_runtime will not see us +* distribute_cfs_runtime will not see us. If disribute_cfs_runtime is +* not running add to the tail so that later runqueues don't get starved. */ -list_add_rcu (&cfs_rq->throttled_list, &cfs_b->throttled_cfs_rq); +if (cfs_b->distribute_running) +list_add_rcu (&cfs_rq->throttled_list, &cfs_b->throttled_cfs_rq); +else +list_add_tail_rcu (&cfs_rq->throttled_list, &cfs_b->throttled_cfs_rq);/* * If we're the first throttled task, make sure the bandwidth
@@ -4121,14 +4125,16 @@ static int do_sched_cfs_period_timer(struct cfs_bandwidth *cfs_b, int overrun)* in us over-using our runtime if it is all used during this loop, but * only by limited amounts in that extreme case. */ -while (throttled && cfs_b->runtime >0 ) { +while (throttled && cfs_b->runtime >0 && !cfs_b->distribute_running) { runtime = cfs_b->runtime; + cfs_b->distribute_running =1 ;raw_spin_unlock (&cfs_b->lock);/* we can't nest cfs_b->lock while distributing bandwidth */ runtime =distribute_cfs_runtime (cfs_b, runtime, runtime_expires);raw_spin_lock (&cfs_b->lock); + cfs_b->distribute_running =0 ; throttled = !list_empty (&cfs_b->throttled_cfs_rq); cfs_b->runtime -=min (runtime, cfs_b->runtime);
@@ -4239,6 +4245,11 @@ static void do_sched_cfs_slack_timer(struct cfs_bandwidth *cfs_b)/* confirm we're still not at a refresh boundary */ raw_spin_lock (&cfs_b->lock); +if (cfs_b->distribute_running) { +raw_spin_unlock (&cfs_b->lock); +return ; + } +if (runtime_refresh_within (cfs_b, min_bandwidth_expiration)) {raw_spin_unlock (&cfs_b->lock);return ;
@@ -4248,6 +4259,9 @@ static void do_sched_cfs_slack_timer(struct cfs_bandwidth *cfs_b) runtime = cfs_b->runtime; expires = cfs_b->runtime_expires; +if (runtime) + cfs_b->distribute_running =1 ; +raw_spin_unlock (&cfs_b->lock);if (!runtime)
@@ -4258,6 +4272,7 @@ static void do_sched_cfs_slack_timer(struct cfs_bandwidth *cfs_b)raw_spin_lock (&cfs_b->lock);if (expires == cfs_b->runtime_expires) cfs_b->runtime -=min (runtime, cfs_b->runtime); + cfs_b->distribute_running =0 ;raw_spin_unlock (&cfs_b->lock); }
@@ -4366,6 +4381,7 @@ void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) cfs_b->period_timer.function = sched_cfs_period_timer;hrtimer_init (&cfs_b->slack_timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); cfs_b->slack_timer.function = sched_cfs_slack_timer; + cfs_b->distribute_running =0 ; }static void init_cfs_rq_runtime (struct cfs_rq *cfs_rq)
kernel/sched/sched.h +2 -0
@@ -255,6 +255,8 @@ struct cfs_bandwidth {/* statistics */ int nr_periods, nr_throttled;u64 throttled_time; + +bool distribute_running;#endif };
kernel/time/posix-cpu-timers.c +1 -1
@@ -103,7 +103,7 @@ static void bump_cpu_timer(struct k_itimer *timer,continue ; timer->it.cpu.expires += incr; - timer->it_overrun +=1 << i; + timer->it_overrun +=1LL << i; delta -= incr; } }
kernel/time/posix-timers.c +19 -10
@@ -355,6 +355,17 @@ static __init int init_posix_timers(void)__initcall (init_posix_timers); +/* +* The siginfo si_overrun field and the return value of timer_getoverrun(2) +* are of type int. Clamp the overrun value to INT_MAX +*/ +static inline int timer_overrun_to_int (struct k_itimer *timr,int baseval) +{ +s64 sum = timr->it_overrun_last + (s64 )baseval; + +return sum > (s64 )INT_MAX ?INT_MAX : (int )sum; +} +static void schedule_next_timer (struct k_itimer *timr) {struct hrtimer *timer = &timr->it.real.timer;
@@ -362,12 +373,11 @@ static void schedule_next_timer(struct k_itimer *timr)if (timr->it.real.interval.tv64 ==0 )return ; - timr->it_overrun += (unsigned int )hrtimer_forward (timer, - timer->base->get_time (), - timr->it.real.interval); + timr->it_overrun +=hrtimer_forward (timer, timer->base->get_time (), + timr->it.real.interval); timr->it_overrun_last = timr->it_overrun; - timr->it_overrun =-1 ; + timr->it_overrun =-1LL ; ++timr->it_requeue_pending;hrtimer_restart (timer); }
@@ -396,7 +406,7 @@ void do_schedule_next_timer(struct siginfo *info)else schedule_next_timer (timr); - info->si_overrun += timr->it_overrun_last; + info->si_overrun =timer_overrun_to_int (timr, info->si_overrun); }if (timr)
@@ -491,8 +501,7 @@ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer) now = ktime_add(now, kj); }#endif - timr->it_overrun += (unsigned int ) -hrtimer_forward (timer, now, + timr->it_overrun +=hrtimer_forward (timer, now, timr->it.real.interval); ret =HRTIMER_RESTART ; ++timr->it_requeue_pending;
@@ -633,7 +642,7 @@ SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock, it_id_set =IT_ID_SET ; new_timer->it_id = (timer_t ) new_timer_id; new_timer->it_clock = which_clock; - new_timer->it_overrun =-1 ; + new_timer->it_overrun =-1LL ;if (timer_event_spec) {if (copy_from_user (&event, timer_event_spec,sizeof (event))) {
@@ -762,7 +771,7 @@ common_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting)*/ if (iv.tv64 && (timr->it_requeue_pending &REQUEUE_PENDING || timr->it_sigev_notify ==SIGEV_NONE )) - timr->it_overrun += (unsigned int )hrtimer_forward (timer, now, iv); + timr->it_overrun +=hrtimer_forward (timer, now, iv); remaining =__hrtimer_expires_remaining_adjusted (timer, now);/* Return 0 only, when the timer is expired and not pending */
@@ -824,7 +833,7 @@ SYSCALL_DEFINE1(timer_getoverrun, timer_t, timer_id)if (!timr)return -EINVAL ; - overrun = timr->it_overrun_last; + overrun =timer_overrun_to_int (timr,0 );unlock_timer (timr, flags);return overrun;
lib/test_bpf.c +1 -1
@@ -4874,7 +4874,7 @@ static struct bpf_test tests[] = { { "BPF_MAXINSNS: Jump, gap, jump, ...", { }, -#ifdef CONFIG_BPF_JIT_ALWAYS_ON +#if defined(CONFIG_BPF_JIT_ALWAYS_ON ) && defined(CONFIG_X86 )CLASSIC |FLAG_NO_DATA |FLAG_EXPECTED_FAIL , #else CLASSIC | FLAG_NO_DATA,
mm/frame_vector.c +4 -2
@@ -61,8 +61,10 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames,* get_user_pages_longterm() and disallow it for filesystem-dax * mappings. */ -if (vma_is_fsdax (vma)) -return -EOPNOTSUPP ; +if (vma_is_fsdax (vma)) { + ret = -EOPNOTSUPP ; + goto out; + }if (!(vma->vm_flags & (VM_IO |VM_PFNMAP ))) { vec->got_ref = true;
mm/memory_hotplug.c +2 -2
@@ -1508,7 +1508,7 @@ int test_pages_in_a_zone(unsigned long start_pfn, unsigned long end_pfn,while ((i <MAX_ORDER_NR_PAGES ) && !pfn_valid_within (pfn + i)) i++; -if (i ==MAX_ORDER_NR_PAGES ) +if (i ==MAX_ORDER_NR_PAGES || pfn + i >= end_pfn)continue ; page =pfn_to_page (pfn + i);if (zone &&page_zone (page) != zone)
@@ -1522,7 +1522,7 @@ int test_pages_in_a_zone(unsigned long start_pfn, unsigned long end_pfn,if (zone) { *valid_start = start; - *valid_end = end; + *valid_end =min (end, end_pfn);return 1 ; }else {return 0 ;
net/bluetooth/mgmt.c +2 -5
@@ -2298,9 +2298,8 @@ static int unpair_device(struct sock *sk, struct hci_dev *hdev, void *data,/* LE address type */ addr_type =le_addr_type (cp->addr.type); -hci_remove_irk (hdev, &cp->addr.bdaddr, addr_type); - - err =hci_remove_ltk (hdev, &cp->addr.bdaddr, addr_type); +/* Abort any ongoing SMP pairing. Removes ltk and irk if they exist. */ + err =smp_cancel_and_remove_pairing (hdev, &cp->addr.bdaddr, addr_type);if (err <0 ) { err = mgmt_cmd_complete(sk, hdev->id, MGMT_OP_UNPAIR_DEVICE, MGMT_STATUS_NOT_PAIRED, &rp,
@@ -2314,8 +2313,6 @@ static int unpair_device(struct sock *sk, struct hci_dev *hdev, void *data, goto done; } -/* Abort any ongoing SMP pairing */ -smp_cancel_pairing (conn);/* Defer clearing up the connection parameters until closing to * give a chance of keeping them if a repairing happens.
net/bluetooth/smp.c +25 -4
@@ -2353,30 +2353,51 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level)return ret; } -void smp_cancel_pairing (struct hci_conn *hcon) +int smp_cancel_and_remove_pairing (struct hci_dev *hdev,bdaddr_t *bdaddr, +u8 addr_type) { -struct l2cap_conn *conn = hcon->l2cap_data; +struct hci_conn *hcon; +struct l2cap_conn *conn;struct l2cap_chan *chan;struct smp_chan *smp; +int err; + + err =hci_remove_ltk (hdev, bdaddr, addr_type); +hci_remove_irk (hdev, bdaddr, addr_type); + + hcon =hci_conn_hash_lookup_le (hdev, bdaddr, addr_type); +if (!hcon) + goto done; + conn = hcon->l2cap_data;if (!conn)
Lines of this file are not shown. View the raw message.
net/ipv6/netfilter/nf_conntrack_reasm.c +0 -2
Lines of this file are not shown. View the raw message.
net/mac80211/agg-tx.c +52 -76
128 lines not on this page · raw message
net/rxrpc/input.c +29 -25
54 lines not on this page · raw message
net/wireless/scan.c +49 -9
58 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.