Linux 4.9.241
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.9.241 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:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/networking/ip-sysctl.txt | 4 Makefile | 2 arch/arm/mm/cache-l2x0.c | 16 + arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 4 arch/powerpc/include/asm/reg.h | 2 arch/powerpc/kernel/tau_6xx.c | 82 ++----- arch/powerpc/perf/hv-gpci-requests.h | 6 arch/powerpc/perf/isa207-common.c | 10 arch/powerpc/platforms/Kconfig | 9 arch/powerpc/platforms/powernv/opal-dump.c | 41 ++- arch/powerpc/platforms/pseries/rng.c | 1 arch/powerpc/sysdev/xics/icp-hv.c | 1 arch/x86/kvm/emulate.c | 2 arch/x86/kvm/mmu.c | 1 crypto/algif_aead.c | 4 drivers/clk/at91/clk-main.c | 11 - drivers/clk/bcm/clk-bcm2835.c | 4 drivers/cpufreq/powernv-cpufreq.c | 9 drivers/crypto/ccp/ccp-ops.c | 2 drivers/crypto/ixp4xx_crypto.c | 2 drivers/crypto/omap-sham.c | 3 drivers/edac/i5100_edac.c | 11 - drivers/gpu/drm/gma500/cdv_intel_dp.c | 2 drivers/gpu/drm/virtio/virtgpu_kms.c | 2 drivers/gpu/drm/virtio/virtgpu_vq.c | 10 drivers/hid/hid-roccat-kone.c | 23 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 drivers/infiniband/hw/mlx4/cm.c | 3 drivers/infiniband/hw/mlx4/mad.c | 34 ++- drivers/infiniband/hw/mlx4/mlx4_ib.h | 2 drivers/infiniband/hw/qedr/main.c | 2 drivers/infiniband/sw/rdmavt/vt.c | 4 drivers/input/keyboard/ep93xx_keypad.c | 4 drivers/input/keyboard/omap4-keypad.c | 6 drivers/input/keyboard/twl4030_keypad.c | 8 drivers/input/serio/sun4i-ps2.c | 9 drivers/input/touchscreen/imx6ul_tsc.c | 27 +- drivers/media/firewire/firedtv-fw.c | 6 drivers/media/i2c/m5mols/m5mols_core.c | 3 drivers/media/i2c/tc358743.c | 2 drivers/media/pci/bt8xx/bttv-driver.c | 13 - drivers/media/pci/saa7134/saa7134-tvaudio.c | 3 drivers/media/platform/exynos4-is/fimc-isp.c | 4 drivers/media/platform/exynos4-is/fimc-lite.c | 2 drivers/media/platform/exynos4-is/media-dev.c | 8 drivers/media/platform/exynos4-is/mipi-csis.c | 4 drivers/media/platform/omap3isp/isp.c | 6 drivers/media/platform/rcar-fcp.c | 4 drivers/media/platform/s3c-camif/camif-core.c | 5 drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 3 drivers/media/platform/sti/hva/hva-hw.c | 2 drivers/media/platform/ti-vpe/vpe.c | 2 drivers/media/platform/vsp1/vsp1_drv.c | 11 - drivers/media/rc/ati_remote.c | 4 drivers/media/usb/uvc/uvc_v4l2.c | 30 ++ drivers/memory/fsl-corenet-cf.c | 6 drivers/memory/omap-gpmc.c | 4 drivers/mfd/rtsx_pcr.c | 4 drivers/mfd/sm501.c | 8 drivers/misc/eeprom/at25.c | 2 drivers/misc/mic/scif/scif_rma.c | 4 drivers/misc/mic/vop/vop_main.c | 2 drivers/misc/mic/vop/vop_vringh.c | 24 +- drivers/misc/vmw_vmci/vmci_queue_pair.c | 10 drivers/mmc/core/sdio_cis.c | 3 drivers/mtd/lpddr/lpddr2_nvm.c | 35 +-- drivers/mtd/mtdoops.c | 11 - drivers/net/ethernet/cisco/enic/enic.h | 1 drivers/net/ethernet/cisco/enic/enic_api.c | 6 drivers/net/ethernet/cisco/enic/enic_main.c | 27 +- drivers/net/ethernet/ibm/ibmveth.c | 13 + drivers/net/ethernet/korina.c | 3 drivers/net/ethernet/realtek/r8169.c | 108 +++++----- drivers/net/wan/hdlc.c | 10 drivers/net/wan/hdlc_raw_eth.c | 1 drivers/net/wireless/ath/ath10k/htt_rx.c | 8 drivers/net/wireless/ath/ath10k/mac.c | 2 drivers/net/wireless/ath/ath6kl/main.c | 3 drivers/net/wireless/ath/ath6kl/wmi.c | 5 drivers/net/wireless/ath/ath9k/hif_usb.c | 19 + drivers/net/wireless/ath/ath9k/htc_hst.c | 2 drivers/net/wireless/ath/wcn36xx/main.c | 2 drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 2 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c | 4 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 9 drivers/net/wireless/marvell/mwifiex/scan.c | 2 drivers/net/wireless/marvell/mwifiex/sdio.c | 2 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 10 drivers/ntb/hw/amd/ntb_hw_amd.c | 1 drivers/nvme/target/core.c | 3 drivers/rapidio/devices/rio_mport_cdev.c | 18 + drivers/regulator/core.c | 21 + drivers/scsi/be2iscsi/be_main.c | 4 drivers/scsi/csiostor/csio_hw.c | 2 drivers/scsi/ibmvscsi/ibmvfc.c | 1 drivers/scsi/mvumi.c | 1 drivers/scsi/qla4xxx/ql4_os.c | 2 drivers/tty/hvc/hvcs.c | 14 - drivers/tty/ipwireless/network.c | 4 drivers/tty/ipwireless/tty.c | 2 drivers/tty/pty.c | 2 drivers/tty/serial/Kconfig | 1 drivers/usb/class/cdc-acm.c | 23 ++ drivers/usb/class/cdc-wdm.c | 72 +++++- drivers/usb/core/urb.c | 89 +++++--- drivers/usb/gadget/function/f_ncm.c | 8 drivers/usb/gadget/function/f_printer.c | 16 + drivers/usb/gadget/function/u_ether.c | 2 drivers/usb/host/ohci-hcd.c | 16 - drivers/vfio/pci/vfio_pci_intrs.c | 4 drivers/video/backlight/sky81452-backlight.c | 1 drivers/video/fbdev/sis/init.c | 11 - drivers/video/fbdev/vga16fb.c | 14 - drivers/virt/fsl_hypervisor.c | 17 - fs/cifs/asn1.c | 16 - fs/dlm/config.c | 3 fs/ntfs/inode.c | 6 fs/quota/quota_v2.c | 1 fs/reiserfs/inode.c | 3 fs/reiserfs/super.c | 8 fs/udf/inode.c | 25 +- fs/udf/super.c | 6 fs/xfs/xfs_rtalloc.c | 11 + include/linux/overflow.h | 1 include/net/ip.h | 6 include/scsi/scsi_common.h | 7 include/trace/events/target.h | 12 - kernel/debug/kdb/kdb_io.c | 8 kernel/power/hibernate.c | 11 - lib/crc32.c | 2 net/bluetooth/l2cap_sock.c | 7 net/ipv4/icmp.c | 7 net/ipv4/tcp_input.c | 2 net/netfilter/ipvs/ip_vs_ctl.c | 7 net/nfc/netlink.c | 2 net/tipc/msg.c | 3 net/wireless/nl80211.c | 5 samples/mic/mpssd/mpssd.c | 4 security/integrity/ima/ima_crypto.c | 2 sound/core/seq/oss/seq_oss.c | 7 sound/firewire/bebob/bebob_hwdep.c | 3 sound/soc/qcom/lpass-platform.c | 3 tools/perf/util/intel-pt.c | 8 144 files changed, 890 insertions(+), 477 deletions(-)
Abhishek Pandit-Subedi (1):
Bluetooth: Only mark socket zapped after unlocking
Adam Goode (1):
media: uvcvideo: Ensure all probed info is returned to v4l2
Adrian Hunter (1):
perf intel-pt: Fix "context_switch event has no tid" error
Alex Dewar (1):
VMCI: check return value of get_user_pages_fast() for errors
Alex Williamson (1):
vfio/pci: Clear token on bypass registration failure
Alexander Aring (1):
fs: dlm: fix configfs memory leak
Arnd Bergmann (1):
mtd: lpddr: fix excessive stack usage with clang
Artem Savkov (1):
pty: do tty_flip_buffer_push without port->lock in pty_write
Athira Rajeev (1):
powerpc/perf: Exclude pmc5/6 from the irrelevant PMU group constraints
Brooke Basile (1):
ath9k: hif_usb: fix race condition between usb_get_urb() and usb_kill_anchored_urbs()
Bryan O'Donoghue (1):
wcn36xx: Fix reported 802.11n rx_highest rate wcn3660/wcn3680
Chris Chiu (1):
rtl8xxxu: prevent potential memory leak
Christian Eggers (1):
eeprom: at25: set minimum read/write access stride to 1
Christoph Hellwig (1):
PM: hibernate: remove the bogus call to get_gendisk() in software_resume()
Christophe JAILLET (3):
crypto: ixp4xx - Fix the size used in a 'dma_free_coherent()' call
mwifiex: Do not use GFP_KERNEL in atomic context
scsi: qla4xxx: Fix an error handling path in 'qla4xxx_get_host_stats()'
Claudiu Beznea (1):
clk: at91: clk-main: update key before writing AT91_CKGR_MOR
Colin Ian King (2):
video: fbdev: vga16fb: fix setting of pixclock because a pass-by-value error IB/rdmavt: Fix sizeof mismatch
Cong Wang (1):
tipc: fix the skb_unshare() in tipc_buf_append()
Dan Carpenter (10):
ALSA: bebob: potential info leak in hwdep_read()
cifs: remove bogus debug code
ath6kl: prevent potential array overflow in ath6kl_add_new_sta()
ath9k: Fix potential out of bounds in ath9k_htc_txcompletion_cb()
HID: roccat: add bounds checking in kone_sysfs_write_settings()
ath6kl: wmi: prevent a shift wrapping bug in ath6kl_wmi_delete_pstream_cmd()
mfd: sm501: Fix leaks in probe()
scsi: be2iscsi: Fix a theoretical leak in beiscsi_create_eqs()
Input: imx6ul_tsc - clean up some errors in imx6ul_tsc_resume()
memory: omap-gpmc: Fix a couple off by ones
Daniel Thompson (1):
kdb: Fix pager search for multi-line strings
Darrick J. Wong (1):
xfs: make sure the rt allocator doesn't run off the end
David Wilder (1):
ibmveth: Identify ingress large send packets.
Defang Bo (1):
nfc: Ensure presence of NFC_ATTR_FIRMWARE_NAME attribute in nfc_genl_fw_download()
Dinghao Liu (6):
EDAC/i5100: Fix error handling order in i5100_init_one()
media: omap3isp: Fix memleak in isp_probe
media: vsp1: Fix runtime PM imbalance on error
media: platform: s3c-camif: Fix runtime PM imbalance on error
media: platform: sti: hva: Fix runtime PM imbalance on error
media: bdisp: Fix runtime PM imbalance on error
Doug Horn (1):
Fix use after free in get_capset_info callback.
Eli Billauer (1):
usb: core: Solve race condition in anchor cleanup functions
Emmanuel Grumbach (1):
iwlwifi: mvm: split a print to avoid a WARNING in ROC
Eric Biggers (1):
reiserfs: only call unlock_new_inode() if I_NEW
Eric Dumazet (2):
icmp: randomize the global rate limiter
quota: clear padding in v2r1_mem2diskdqb()
Finn Thain (3):
powerpc/tau: Use appropriate temperature sample interval powerpc/tau: Remove duplicated set_thresholds() call powerpc/tau: Disable TAU between measurements
Greg Kroah-Hartman (1):
Linux 4.9.241
Guillaume Tucker (1):
ARM: 9007/1: l2c: fix prefetch bits init in L2X0_AUX_CTRL using DT values
Hamish Martin (1):
usb: ohci: Default to per-port over-current protection
Heiner Kallweit (1):
r8169: fix data corruption issue on RTL8402
Herbert Xu (1):
crypto: algif_aead - Do not set MAY_BACKLOG on the async path
Håkon Bugge (2):
IB/mlx4: Fix starvation in paravirt mux/demux IB/mlx4: Adjust delayed work when a dup is observed
Jan Kara (3):
udf: Limit sparing table size
udf: Avoid accessing uninitialized data on failed inode read
reiserfs: Fix memory leak in reiserfs_parse_options()
Jing Xiangfeng (3):
rapidio: fix the missed put_device() for rio_mport_add_riodev
scsi: mvumi: Fix error return in mvumi_io_attach()
scsi: ibmvfc: Fix error return in ibmvfc_probe()
Johan Hovold (1):
USB: cdc-acm: handle broken union descriptors
Johannes Berg (1):
nl80211: fix non-split wiphy information
Kaige Li (1):
NTB: hw: amd: fix an issue about leak system resources
Kajol Jain (1):
powerpc/perf/hv-gpci: Fix starting index value
Keita Suzuki (2):
misc: rtsx: Fix memory leak in rtsx_pci_probe
brcmsmac: fix memory leak in wlc_phy_attach_lcnphy
Krzysztof Kozlowski (5):
Input: ep93xx_keypad - fix handling of platform_get_irq() error
Input: omap4-keypad - fix handling of platform_get_irq() error
Input: twl4030_keypad - fix handling of platform_get_irq() error
Input: sun4i-ps2 - fix handling of platform_get_irq() error
memory: fsl-corenet-cf: Fix handling of platform_get_irq() error
Leon Romanovsky (1):
overflow: Include header file with SIZE_MAX declaration
Lijun Ou (1):
RDMA/hns: Set the unsupported wr opcode
Lorenzo Colitti (3):
usb: gadget: f_ncm: fix ncm_bitrate for SuperSpeed and above.
usb: gadget: u_ether: enable qmult on SuperSpeed Plus as well
usb: gadget: f_ncm: allow using NCM in SuperSpeed Plus gadgets.
Maciej Żenczykowski (1):
net/ipv4: always honour route mtu during forwarding
Mark Tomlinson (1):
mtd: mtdoops: Don't write panic data twice
Mauro Carvalho Chehab (1):
media: saa7134: avoid a shift overflow
Michal Kalderon (1):
RDMA/qedr: Fix use of uninitialized field
Michal Simek (1):
arm64: dts: zynqmp: Remove additional compatible string for i2c IPs
Michał Mirosław (1):
regulator: resolve supply after creating regulator
Navid Emamdoost (1):
clk: bcm2835: add missing release if devm_clk_hw_register fails
Neal Cardwell (1):
tcp: fix to update snd_wl1 in bulk receiver fast path
Nicholas Mc Guire (2):
powerpc/pseries: Fix missing of_node_put() in rng_init() powerpc/icp-hv: Fix missing of_node_put() in success path
Oliver Neukum (2):
media: ati_remote: sanity check for both endpoints
USB: cdc-wdm: Make wdm_flush() interruptible and add wdm_fsync().
Pali Rohár (1):
mmc: sdio: Check for CISTPL_VERS_1 buffer size
Pavel Machek (2):
crypto: ccp - fix error handling
media: firewire: fix memory leak
Peilin Ye (1):
ipvs: Fix uninit-value in do_ip_vs_set_ctl()
Qiushi Wu (5):
media: platform: fcp: Fix a reference count leak.
media: ti-vpe: Fix a missing check and reference count leak
media: exynos4-is: Fix several reference count leaks due to pm_runtime_get_sync
media: exynos4-is: Fix a reference count leak due to pm_runtime_get_sync
media: exynos4-is: Fix a reference count leak
Robert Hoo (1):
KVM: x86: emulating RDPID failure shall return #UD rather than #GP
Roberto Sassu (1):
ima: Don't ignore errors from crypto_shash_update()
Rohit kumar (1):
ASoC: qcom: lpass-platform: fix memory leak
Roman Bolshakov (1):
scsi: target: core: Add CONTROL field for trace events
Rustam Kovhaev (1):
ntfs: add check for mft record size in superblock
Sean Christopherson (1):
KVM: x86/mmu: Commit zap of remaining invalid pages when recovering lpages
Sherry Sun (2):
mic: vop: copy data to kernel space then write to io memory
misc: vop: add round_up(x,4) for vring_size to avoid kernel panic
Souptick Joarder (3):
drivers/virt/fsl_hypervisor: Fix error handling path
misc: mic: scif: Fix error handling path
rapidio: fix error handling path
Srikar Dronamraju (1):
cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_reboot_notifier
Stephan Gerhold (1):
arm64: dts: qcom: msm8916: Fix MDP/DSI interrupts
Sylwester Nawrocki (1):
media: Revert "media: exynos4-is: Add missed check for pinctrl_lookup_state()"
Takashi Iwai (1):
ALSA: seq: oss: Avoid mutex lock for a long-time ioctl
Tero Kristo (1):
crypto: omap-sham - fix digcnt register handling with export/import
Thomas Gleixner (1):
net: enic: Cure the enic api locking trainwreck
Tianjia Zhang (1):
scsi: csiostor: Fix wrong return value in csio_hw_prep_fw()
Tobias Jordan (1):
lib/crc32.c: fix trivial typo in preprocessor condition
Tom Rix (5):
media: m5mols: Check function pointer in m5mols_sensor_power
media: tc358743: initialize variable
drm/gma500: fix error check
video: fbdev: sis: fix null ptr dereference
mwifiex: fix double free
Tong Zhang (2):
tty: serial: earlycon dependency
tty: ipwireless: fix error handling
Tyrel Datwyler (1):
tty: hvcs: Don't NULL tty->driver_data until hvcs_cleanup()
Valentin Vidic (2):
net: korina: fix kfree of rx/tx descriptor array
net: korina: cast KSEG0 address to pointer in kfree
Vasant Hegde (1):
powerpc/powernv/dump: Fix race while processing OPAL dump
Venkateswara Naralasetty (1):
ath10k: provide survey info as accumulated data
Vincent Mailhol (1):
usb: cdc-acm: add quirk to blacklist ETAS ES58X devices
Wang Yufen (1):
brcm80211: fix possible memleak in brcmf_proto_msgbuf_attach
Xiaolong Huang (1):
media: media/pci: prevent memory leak in bttv_probe
Xie He (2):
net: hdlc: In hdlc_rcv, check to make sure dev is an HDLC device
net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup
Zekun Shen (1):
ath10k: check idx validity in __ath10k_htt_rx_ring_fill_n()
Zqiang (1):
usb: gadget: function: printer: fix use-after-free in __lock_acquire
[email protected] (1):
backlight: sky81452-backlight: Fix refcount imbalance on error
zhenwei pi (1):
nvmet: fix uninitialized work for zero kato
Greg Kroah-Hartman
maintainerDocumentation/networking/ip-sysctl.txt +3 -1
@@ -887,12 +887,14 @@ icmp_ratelimit - INTEGER icmp_msgs_per_sec - INTEGER Limit maximal number of ICMP packets sent per second from this host. Only messages whose type matches icmp_ratemask (see below) are - controlled by this limit. + controlled by this limit. For security reasons, the precise count + of messages per second is randomized. Default: 1000 icmp_msgs_burst - INTEGER icmp_msgs_per_sec controls number of ICMP packets sent per second, while icmp_msgs_burst controls the burst size of these packets. + For security reasons, the precise burst size is randomized. Default: 50 icmp_ratemask - INTEGER
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 240 +SUBLEVEL = 241 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/mm/cache-l2x0.c +12 -4
@@ -1252,20 +1252,28 @@ static void __init l2c310_of_parse(const struct device_node *np, ret =of_property_read_u32 (np,"prefetch-data" , &val);if (ret ==0 ) { -if (val) +if (val) { prefetch |=L310_PREFETCH_CTRL_DATA_PREFETCH ; -else + *aux_val |=L310_PREFETCH_CTRL_DATA_PREFETCH ; + }else { prefetch &= ~L310_PREFETCH_CTRL_DATA_PREFETCH ; + *aux_val &= ~L310_PREFETCH_CTRL_DATA_PREFETCH ; + } + *aux_mask &= ~L310_PREFETCH_CTRL_DATA_PREFETCH ; }else if (ret != -EINVAL ) {pr_err ("L2C-310 OF prefetch-data property value is missing\n" ); } ret =of_property_read_u32 (np,"prefetch-instr" , &val);if (ret ==0 ) { -if (val) +if (val) { prefetch |=L310_PREFETCH_CTRL_INSTR_PREFETCH ; -else + *aux_val |=L310_PREFETCH_CTRL_INSTR_PREFETCH ; + }else { prefetch &= ~L310_PREFETCH_CTRL_INSTR_PREFETCH ; + *aux_val &= ~L310_PREFETCH_CTRL_INSTR_PREFETCH ; + } + *aux_mask &= ~L310_PREFETCH_CTRL_INSTR_PREFETCH ; }else if (ret != -EINVAL ) {pr_err ("L2C-310 OF prefetch-instr property value is missing\n" ); }
arch/arm64/boot/dts/qcom/msm8916.dtsi +2 -2
@@ -715,7 +715,7 @@ reg-names = "mdp_phys"; interrupt-parent = <&mdss>; - interrupts = <0 0>; + interrupts = <0>; clocks = <&gcc GCC_MDSS_AHB_CLK>, <&gcc GCC_MDSS_AXI_CLK>,
@@ -745,7 +745,7 @@ reg-names = "dsi_ctrl"; interrupt-parent = <&mdss>; - interrupts = <4 0>; + interrupts = <4>; assigned-clocks = <&gcc BYTE0_CLK_SRC>, <&gcc PCLK0_CLK_SRC>;
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +2 -2
@@ -175,7 +175,7 @@ }; i2c0: i2c@ff020000 { - compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10"; + compatible = "cdns,i2c-r1p14"; status = "disabled"; interrupt-parent = <&gic>; interrupts = <0 17 4>;
@@ -185,7 +185,7 @@ }; i2c1: i2c@ff030000 { - compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10"; + compatible = "cdns,i2c-r1p14"; status = "disabled"; interrupt-parent = <&gic>; interrupts = <0 18 4>;
arch/powerpc/include/asm/reg.h +1 -1
@@ -683,7 +683,7 @@#define THRM1_TIN (1 << 31)#define THRM1_TIV (1 << 30)#define THRM1_THRES (x) ((x&0x7f)<<23) -#define THRM3_SITV (x) ((x&0x3fff)<<1) +#define THRM3_SITV (x) ((x & 0x1fff) << 1)#define THRM1_TID (1<<2)#define THRM1_TIE (1<<1)#define THRM1_V (1<<0)
arch/powerpc/kernel/tau_6xx.c +28 -54
123 lines not on this page · raw message
arch/powerpc/perf/hv-gpci-requests.h +3 -3
@@ -94,7 +94,7 @@ REQUEST(__field(0, 8, partition_id)#define REQUEST_NAME system_performance_capabilities#define REQUEST_NUM 0x40 -#define REQUEST_IDX_KIND "starting_index=0xffffffffffffffff" +#define REQUEST_IDX_KIND "starting_index=0xffffffff"#include I (REQUEST_BEGIN ) REQUEST(__field(0, 1, perf_collect_privileged) __field(0x1, 1, capability_mask)
@@ -222,7 +222,7 @@ REQUEST(__field(0, 2, partition_id)#define REQUEST_NAME system_hypervisor_times#define REQUEST_NUM 0xF0 -#define REQUEST_IDX_KIND "starting_index=0xffffffffffffffff" +#define REQUEST_IDX_KIND "starting_index=0xffffffff"#include I (REQUEST_BEGIN ) REQUEST(__count(0, 8, time_spent_to_dispatch_virtual_processors) __count(0x8, 8, time_spent_processing_virtual_processor_timers)
@@ -233,7 +233,7 @@ REQUEST(__count(0, 8, time_spent_to_dispatch_virtual_processors)#define REQUEST_NAME system_tlbie_count_and_time#define REQUEST_NUM 0xF4 -#define REQUEST_IDX_KIND "starting_index=0xffffffffffffffff" +#define REQUEST_IDX_KIND "starting_index=0xffffffff"#include I (REQUEST_BEGIN )REQUEST (__count (0 ,8 , tlbie_instructions_issued)/*
arch/powerpc/perf/isa207-common.c +10 -0
@@ -51,6 +51,15 @@ int isa207_get_constraint(u64 event, unsigned long *maskp, unsigned long *valp) mask |=CNST_PMC_MASK (pmc); value |=CNST_PMC_VAL (pmc); + +/* +* PMC5 and PMC6 are used to count cycles and instructions and +* they do not support most of the constraint bits. Add a check +* to exclude PMC5/6 from most of the constraints except for +* EBB/BHRB. +*/ +if (pmc >=5 ) + goto ebb_bhrb; }if (pmc <=4 ) {
@@ -111,6 +120,7 @@ int isa207_get_constraint(u64 event, unsigned long *maskp, unsigned long *valp) value |=CNST_THRESH_VAL (event >>EVENT_THRESH_SHIFT ); } +ebb_bhrb:if (!pmc && ebb)/* EBB events must specify the PMC */ return -1 ;
arch/powerpc/platforms/Kconfig +2 -7
@@ -242,7 +242,7 @@ config TAU temp is actually what /proc/cpuinfo says it is. config TAU_INT - bool "Interrupt driven TAU driver (DANGEROUS)" + bool "Interrupt driven TAU driver (EXPERIMENTAL)" depends on TAU ---help--- The TAU supports an interrupt driven mode which causes an interrupt
@@ -250,12 +250,7 @@ config TAU_INT to get notified the temp has exceeded a range. With this option off, a timer is used to re-check the temperature periodically. - However, on some cpus it appears that the TAU interrupt hardware - is buggy and can cause a situation which would lead unexplained hard - lockups. - - Unless you are extending the TAU driver, or enjoy kernel/hardware - debugging, leave this option off. + If in doubt, say N here. config TAU_AVERAGE bool "Average high and low temp"
arch/powerpc/platforms/powernv/opal-dump.c +29 -12
65 lines not on this page · raw message
arch/powerpc/platforms/pseries/rng.c +1 -0
@@ -40,6 +40,7 @@ static __init int rng_init(void) ppc_md.get_random_seed = pseries_get_random_long; +of_node_put (dn);return 0 ; }machine_subsys_initcall (pseries, rng_init);
arch/powerpc/sysdev/xics/icp-hv.c +1 -0
@@ -179,6 +179,7 @@ int icp_hv_init(void) icp_ops = &icp_hv_ops; +of_node_put (np);return 0 ; }
arch/x86/kvm/emulate.c +1 -1
@@ -3536,7 +3536,7 @@ static int em_rdpid(struct x86_emulate_ctxt *ctxt)u64 tsc_aux =0 ;if (ctxt->ops->get_msr (ctxt,MSR_TSC_AUX , &tsc_aux)) -return emulate_gp (ctxt,0 ); +return emulate_ud (ctxt); ctxt->dst.val = tsc_aux;return X86EMUL_CONTINUE ; }
arch/x86/kvm/mmu.c +1 -0
@@ -5321,6 +5321,7 @@ static void kvm_recover_nx_lpages(struct kvm *kvm)cond_resched_lock (&kvm->mmu_lock); } } +kvm_mmu_commit_zap_page (kvm, &invalid_list);spin_unlock (&kvm->mmu_lock);srcu_read_unlock (&kvm->srcu, rcu_idx);
crypto/algif_aead.c +2 -2
@@ -455,7 +455,7 @@ static int aead_recvmsg_async(struct socket *sock, struct msghdr *msg,memcpy (areq->iv, ctx->iv,crypto_aead_ivsize (tfm));aead_request_set_tfm (req, tfm);aead_request_set_ad (req, ctx->aead_assoclen); -aead_request_set_callback (req,CRYPTO_TFM_REQ_MAY_BACKLOG , +aead_request_set_callback (req,CRYPTO_TFM_REQ_MAY_SLEEP , aead_async_cb, req); used -= ctx->aead_assoclen;
@@ -925,7 +925,7 @@ static int aead_accept_parent_nokey(void *private, struct sock *sk) ask->private = ctx;aead_request_set_tfm (&ctx->aead_req, aead); -aead_request_set_callback (&ctx->aead_req,CRYPTO_TFM_REQ_MAY_BACKLOG , +aead_request_set_callback (&ctx->aead_req,CRYPTO_TFM_REQ_MAY_SLEEP , af_alg_complete, &ctx->completion); sk->sk_destruct = aead_sock_destruct;
drivers/clk/at91/clk-main.c +8 -3
@@ -517,12 +517,17 @@ static int clk_sam9x5_main_set_parent(struct clk_hw *hw, u8 index)return -EINVAL ;regmap_read (regmap,AT91_CKGR_MOR , &tmp); - tmp &= ~MOR_KEY_MASK ;if (index && !(tmp &AT91_PMC_MOSCSEL )) -regmap_write (regmap,AT91_CKGR_MOR , tmp |AT91_PMC_MOSCSEL ); + tmp =AT91_PMC_MOSCSEL ;else if (!index && (tmp &AT91_PMC_MOSCSEL )) -regmap_write (regmap,AT91_CKGR_MOR , tmp & ~AT91_PMC_MOSCSEL ); + tmp =0 ; +else +return 0 ; + +regmap_update_bits (regmap,AT91_CKGR_MOR , +AT91_PMC_MOSCSEL |MOR_KEY_MASK , + tmp |AT91_PMC_KEY );while (!clk_sam9x5_main_ready (regmap))cpu_relax ();
drivers/clk/bcm/clk-bcm2835.c +3 -1
@@ -1177,8 +1177,10 @@ static struct clk_hw *bcm2835_register_pll(struct bcm2835_cprman *cprman, pll->hw.init = &init; ret =devm_clk_hw_register (cprman->dev, &pll->hw); -if (ret) +if (ret) { +kfree (pll);return NULL ; + }return &pll->hw; }
drivers/cpufreq/powernv-cpufreq.c +6 -3
@@ -784,12 +784,15 @@ static int powernv_cpufreq_reboot_notifier(struct notifier_block *nb, unsigned long action, void *unused) { int cpu; -struct cpufreq_policy cpu_policy; +struct cpufreq_policy *cpu_policy; rebooting = true;for_each_online_cpu (cpu) { -cpufreq_get_policy (&cpu_policy, cpu); -powernv_cpufreq_target_index (&cpu_policy,get_nominal_index ()); + cpu_policy =cpufreq_cpu_get (cpu); +if (!cpu_policy) +continue ; +powernv_cpufreq_target_index (cpu_policy,get_nominal_index ()); +cpufreq_cpu_put (cpu_policy); }return NOTIFY_DONE ;
drivers/crypto/ccp/ccp-ops.c +1 -1
@@ -1195,7 +1195,7 @@ static int ccp_run_sha_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)break ;default : ret = -EINVAL ; - goto e_ctx; + goto e_data; } }else {/* Stash the context */
drivers/crypto/ixp4xx_crypto.c +1 -1
@@ -532,7 +532,7 @@ static void release_ixp_crypto(struct device *dev)if (crypt_virt) {dma_free_coherent (dev, -NPE_QLEN_TOTAL *sizeof (struct crypt_ctl ), +NPE_QLEN *sizeof (struct crypt_ctl ), crypt_virt, crypt_phys); }return ;
drivers/crypto/omap-sham.c +3 -0
@@ -454,6 +454,9 @@ static void omap_sham_write_ctrl_omap4(struct omap_sham_dev *dd, size_t length,struct omap_sham_reqctx *ctx =ahash_request_ctx (dd->req);u32 val, mask; +if (likely (ctx->digcnt)) +omap_sham_write (dd,SHA_REG_DIGCNT (dd), ctx->digcnt); +/* * Setting ALGO_CONST only for the first iteration and * CLOSE_HASH only for the last one. Note that flags mode bits
drivers/edac/i5100_edac.c +5 -6
@@ -1073,16 +1073,15 @@ static int i5100_init_one(struct pci_dev *pdev, const struct pci_device_id *id) PCI_DEVICE_ID_INTEL_5100_19, 0);if (!einj) { ret = -ENODEV ; - goto bail_einj; + goto bail_mc_free; } rc =pci_enable_device (einj);if (rc <0 ) { ret = rc; - goto bail_disable_einj; + goto bail_einj; } - mci->pdev = &pdev->dev; priv = mci->pvt_info;
@@ -1149,14 +1148,14 @@ static int i5100_init_one(struct pci_dev *pdev, const struct pci_device_id *id) bail_scrub: priv->scrub_enable =0 ;cancel_delayed_work_sync (&(priv->i5100_scrubbing)); -edac_mc_free (mci); - -bail_disable_einj:pci_disable_device (einj); bail_einj:pci_dev_put (einj); +bail_mc_free: +edac_mc_free (mci); + bail_disable_ch1:pci_disable_device (ch1mm);
drivers/gpu/drm/gma500/cdv_intel_dp.c +1 -1
@@ -2121,7 +2121,7 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev intel_dp->dpcd, sizeof(intel_dp->dpcd));cdv_intel_edp_panel_vdd_off (gma_encoder); -if (ret ==0 ) { +if (ret <=0 ) {/* if this fails, presume the device is a ghost */ DRM_INFO ("failed to retrieve link info, disabling eDP\n" );cdv_intel_dp_encoder_destroy (encoder);
drivers/gpu/drm/virtio/virtgpu_kms.c +2 -0
@@ -113,8 +113,10 @@ static void virtio_gpu_get_capsets(struct virtio_gpu_device *vgdev, vgdev->capsets[i].id > 0, 5 * HZ);if (ret ==0 ) {DRM_ERROR ("timed out waiting for cap set %d\n" , i); +spin_lock (&vgdev->display_info_lock);kfree (vgdev->capsets); vgdev->capsets =NULL ; +spin_unlock (&vgdev->display_info_lock);return ; } DRM_INFO("cap set %d: id %d, max-version %d, max-size %d\n",
drivers/gpu/drm/virtio/virtgpu_vq.c +7 -3
@@ -596,9 +596,13 @@ static void virtio_gpu_cmd_get_capset_info_cb(struct virtio_gpu_device *vgdev,int i =le32_to_cpu (cmd->capset_index);spin_lock (&vgdev->display_info_lock); - vgdev->capsets[i].id =le32_to_cpu (resp->capset_id); - vgdev->capsets[i].max_version =le32_to_cpu (resp->capset_max_version); - vgdev->capsets[i].max_size =le32_to_cpu (resp->capset_max_size); +if (vgdev->capsets) { + vgdev->capsets[i].id =le32_to_cpu (resp->capset_id); + vgdev->capsets[i].max_version =le32_to_cpu (resp->capset_max_version); + vgdev->capsets[i].max_size =le32_to_cpu (resp->capset_max_size); + }else { +DRM_ERROR ("invalid capset memory." ); + }spin_unlock (&vgdev->display_info_lock);wake_up (&vgdev->resp_wq); }
drivers/hid/hid-roccat-kone.c +16 -7
@@ -297,31 +297,40 @@ static ssize_t kone_sysfs_write_settings(struct file *fp, struct kobject *kobj,struct kone_device *kone =hid_get_drvdata (dev_get_drvdata (dev));struct usb_device *usb_dev =interface_to_usbdev (to_usb_interface (dev));int retval =0 , difference, old_profile; +struct kone_settings *settings = (struct kone_settings *)buf;/* I need to get my data in one piece */ if (off !=0 || count !=sizeof (struct kone_settings ))return -EINVAL ;mutex_lock (&kone->kone_lock); - difference =memcmp (buf, &kone->settings,sizeof (struct kone_settings )); + difference =memcmp (settings, &kone->settings, +sizeof (struct kone_settings ));if (difference) { - retval =kone_set_settings (usb_dev, - (struct kone_settings const *)buf); -if (retval) { -mutex_unlock (&kone->kone_lock); -return retval; +if (settings->startup_profile <1 || + settings->startup_profile >5 ) { + retval = -EINVAL ; + goto unlock; } + retval =kone_set_settings (usb_dev, settings); +if (retval) + goto unlock; + old_profile = kone->settings.startup_profile; -memcpy (&kone->settings, buf,sizeof (struct kone_settings )); +memcpy (&kone->settings, settings,sizeof (struct kone_settings ));kone_profile_activated (kone, kone->settings.startup_profile);if (kone->settings.startup_profile != old_profile)kone_profile_report (kone, kone->settings.startup_profile); } +unlock:mutex_unlock (&kone->kone_lock); +if (retval) +return retval; +return sizeof (struct kone_settings ); } static BIN_ATTR(settings, 0660, kone_sysfs_read_settings,
drivers/infiniband/hw/hns/hns_roce_hw_v1.c +0 -1
@@ -231,7 +231,6 @@ int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, ps_opcode =HNS_ROCE_WQE_OPCODE_SEND ;break ;case IB_WR_LOCAL_INV : -break ;case IB_WR_ATOMIC_CMP_AND_SWP :case IB_WR_ATOMIC_FETCH_AND_ADD :case IB_WR_LSO :
drivers/infiniband/hw/mlx4/cm.c +3 -0
@@ -309,6 +309,9 @@ static void schedule_delayed(struct ib_device *ibdev, struct id_map_entry *id)if (!sriov->is_going_down) { id->scheduled_delete =1 ;schedule_delayed_work (&id->timeout,CM_CLEANUP_CACHE_TIMEOUT ); + }else if (id->scheduled_delete) { +/* Adjust timeout if already scheduled */ +mod_delayed_work (system_wq, &id->timeout,CM_CLEANUP_CACHE_TIMEOUT ); }spin_unlock_irqrestore (&sriov->going_down_lock, flags);spin_unlock (&sriov->id_map_lock);
drivers/infiniband/hw/mlx4/mad.c +31 -3
@@ -1276,6 +1276,18 @@ static void mlx4_ib_tunnel_comp_handler(struct ib_cq *cq, void *arg)spin_unlock_irqrestore (&dev->sriov.going_down_lock, flags); } +static void mlx4_ib_wire_comp_handler (struct ib_cq *cq,void *arg) +{ +unsigned long flags; +struct mlx4_ib_demux_pv_ctx *ctx = cq->cq_context; +struct mlx4_ib_dev *dev =to_mdev (ctx->ib_dev); + +spin_lock_irqsave (&dev->sriov.going_down_lock, flags); +if (!dev->sriov.is_going_down && ctx->state ==DEMUX_PV_STATE_ACTIVE ) +queue_work (ctx->wi_wq, &ctx->work); +spin_unlock_irqrestore (&dev->sriov.going_down_lock, flags); +} +static int mlx4_ib_post_pv_qp_buf (struct mlx4_ib_demux_pv_ctx *ctx,struct mlx4_ib_demux_pv_qp *tun_qp,int index)
@@ -1978,7 +1990,8 @@ static int create_pv_resources(struct ib_device *ibdev, int slave, int port, cq_size *=2 ; cq_attr.cqe = cq_size; - ctx->cq =ib_create_cq (ctx->ib_dev, mlx4_ib_tunnel_comp_handler, + ctx->cq =ib_create_cq (ctx->ib_dev, + create_tun ? mlx4_ib_tunnel_comp_handler : mlx4_ib_wire_comp_handler,NULL , ctx, &cq_attr);if (IS_ERR (ctx->cq)) { ret =PTR_ERR (ctx->cq);
@@ -2015,6 +2028,7 @@ static int create_pv_resources(struct ib_device *ibdev, int slave, int port,INIT_WORK (&ctx->work, mlx4_ib_sqp_comp_worker); ctx->wq =to_mdev (ibdev)->sriov.demux[port -1 ].wq; + ctx->wi_wq =to_mdev (ibdev)->sriov.demux[port -1 ].wi_wq; ret =ib_req_notify_cq (ctx->cq,IB_CQ_NEXT_COMP );if (ret) {
@@ -2158,7 +2172,7 @@ static int mlx4_ib_alloc_demux_ctx(struct mlx4_ib_dev *dev, goto err_mcg; } -snprintf (name,sizeof name,"mlx4_ibt%d" , port); +snprintf (name,sizeof (name),"mlx4_ibt%d" , port); ctx->wq =alloc_ordered_workqueue (name,WQ_MEM_RECLAIM );if (!ctx->wq) {pr_err ("Failed to create tunnelling WQ for port %d\n" , port);
@@ -2166,7 +2180,15 @@ static int mlx4_ib_alloc_demux_ctx(struct mlx4_ib_dev *dev, goto err_wq; } -snprintf (name,sizeof name,"mlx4_ibud%d" , port); +snprintf (name,sizeof (name),"mlx4_ibwi%d" , port); + ctx->wi_wq =alloc_ordered_workqueue (name,WQ_MEM_RECLAIM ); +if (!ctx->wi_wq) { +pr_err ("Failed to create wire WQ for port %d\n" , port); + ret = -ENOMEM ; + goto err_wiwq; + } + +snprintf (name,sizeof (name),"mlx4_ibud%d" , port); ctx->ud_wq =alloc_ordered_workqueue (name,WQ_MEM_RECLAIM );if (!ctx->ud_wq) {pr_err ("Failed to create up/down WQ for port %d\n" , port);
@@ -2177,6 +2199,10 @@ static int mlx4_ib_alloc_demux_ctx(struct mlx4_ib_dev *dev,return 0 ; err_udwq: +destroy_workqueue (ctx->wi_wq); + ctx->wi_wq =NULL ; + +err_wiwq:destroy_workqueue (ctx->wq); ctx->wq =NULL ;
@@ -2224,12 +2250,14 @@ static void mlx4_ib_free_demux_ctx(struct mlx4_ib_demux_ctx *ctx) ctx->tun[i]->state =DEMUX_PV_STATE_DOWNING ; }flush_workqueue (ctx->wq); +flush_workqueue (ctx->wi_wq);for (i =0 ; i < dev->dev->caps.sqp_demux; i++) {destroy_pv_resources (dev, i, ctx->port, ctx->tun[i],0 );free_pv_object (dev, i, ctx->port); }kfree (ctx->tun);destroy_workqueue (ctx->ud_wq); +destroy_workqueue (ctx->wi_wq);destroy_workqueue (ctx->wq); } }
drivers/infiniband/hw/mlx4/mlx4_ib.h +2 -0
@@ -439,6 +439,7 @@ struct mlx4_ib_demux_pv_ctx {struct ib_pd *pd;struct work_struct work;struct workqueue_struct *wq; +struct workqueue_struct *wi_wq;struct mlx4_ib_demux_pv_qp qp[2 ]; };
@@ -446,6 +447,7 @@ struct mlx4_ib_demux_ctx {struct ib_device *ib_dev;int port;struct workqueue_struct *wq; +struct workqueue_struct *wi_wq;struct workqueue_struct *ud_wq;spinlock_t ud_lock;atomic64_t subnet_prefix;
drivers/infiniband/hw/qedr/main.c +1 -1
@@ -527,7 +527,7 @@ static int qedr_set_device_attr(struct qedr_dev *dev) qed_attr = dev->ops->rdma_query_device (dev->rdma_ctx);/* Part 2 - check capabilities */ - page_size = ~dev->attr.page_size_caps +1 ; + page_size = ~qed_attr->page_size_caps +1 ;if (page_size >PAGE_SIZE ) { DP_ERR(dev, "Kernel PAGE_SIZE is %ld which is smaller than minimum page size (%d) required by qedr\n",
drivers/infiniband/sw/rdmavt/vt.c +1 -3
@@ -96,9 +96,7 @@ struct rvt_dev_info *rvt_alloc_device(size_t size, int nports)if (!rdi)return rdi; - rdi->ports =kcalloc (nports, -sizeof (struct rvt_ibport **), -GFP_KERNEL ); + rdi->ports =kcalloc (nports,sizeof (*rdi->ports),GFP_KERNEL );if (!rdi->ports)ib_dealloc_device (&rdi->ibdev);
drivers/input/keyboard/ep93xx_keypad.c +2 -2
@@ -257,8 +257,8 @@ static int ep93xx_keypad_probe(struct platform_device *pdev) } keypad->irq =platform_get_irq (pdev,0 ); -if (!keypad->irq) { - err = -ENXIO ; +if (keypad->irq <0 ) { + err = keypad->irq; goto failed_free; }
drivers/input/keyboard/omap4-keypad.c +2 -4
@@ -253,10 +253,8 @@ static int omap4_keypad_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (!irq) { -dev_err (&pdev->dev,"no keyboard irq assigned\n" ); -return -EINVAL ; - } +if (irq <0 ) +return irq; keypad_data =kzalloc (sizeof (struct omap4_keypad ),GFP_KERNEL );if (!keypad_data) {
drivers/input/keyboard/twl4030_keypad.c +3 -5
@@ -63,7 +63,7 @@ struct twl4030_keypad {bool autorepeat;unsigned int n_rows;unsigned int n_cols; -unsigned int irq; +int irq;struct device *dbg_dev;struct input_dev *input;
@@ -389,10 +389,8 @@ static int twl4030_kp_probe(struct platform_device *pdev) } kp->irq =platform_get_irq (pdev,0 ); -if (!kp->irq) { -dev_err (&pdev->dev,"no keyboard irq assigned\n" ); -return -EINVAL ; - } +if (kp->irq <0 ) +return kp->irq; error = matrix_keypad_build_keymap(keymap_data, NULL, TWL4030_MAX_ROWS,
drivers/input/serio/sun4i-ps2.c +3 -6
@@ -210,7 +210,6 @@ static int sun4i_ps2_probe(struct platform_device *pdev)struct sun4i_ps2data *drvdata;struct serio *serio;struct device *dev = &pdev->dev; -unsigned int irq;int error; drvdata =kzalloc (sizeof (struct sun4i_ps2data ),GFP_KERNEL );
@@ -263,14 +262,12 @@ static int sun4i_ps2_probe(struct platform_device *pdev)writel (0 , drvdata->reg_base +PS2_REG_GCTL );/* Get IRQ for the device */ - irq =platform_get_irq (pdev,0 ); -if (!irq) { -dev_err (dev,"no IRQ found\n" ); - error = -ENXIO ; + drvdata->irq =platform_get_irq (pdev,0 ); +if (drvdata->irq <0 ) { + error = drvdata->irq; goto err_disable_clk; } - drvdata->irq = irq; drvdata->serio = serio; drvdata->dev = dev;
drivers/input/touchscreen/imx6ul_tsc.c +16 -11
@@ -490,20 +490,25 @@ static int __maybe_unused imx6ul_tsc_resume(struct device *dev)mutex_lock (&input_dev->mutex); -if (input_dev->users) { - retval =clk_prepare_enable (tsc->adc_clk); -if (retval) - goto out; - - retval =clk_prepare_enable (tsc->tsc_clk); -if (retval) { -clk_disable_unprepare (tsc->adc_clk); - goto out; - } +if (!input_dev->users) + goto out; - retval =imx6ul_tsc_init (tsc); + retval =clk_prepare_enable (tsc->adc_clk); +if (retval) + goto out; + + retval =clk_prepare_enable (tsc->tsc_clk); +if (retval) { +clk_disable_unprepare (tsc->adc_clk); + goto out; } + retval =imx6ul_tsc_init (tsc); +if (retval) { +clk_disable_unprepare (tsc->tsc_clk); +clk_disable_unprepare (tsc->adc_clk); + goto out; + } out:mutex_unlock (&input_dev->mutex);return retval;
drivers/media/firewire/firedtv-fw.c +4 -2
@@ -271,8 +271,10 @@ static int node_probe(struct fw_unit *unit, const struct ieee1394_device_id *id) name_len =fw_csr_string (unit->directory,CSR_MODEL , name,sizeof (name)); -if (name_len <0 ) -return name_len; +if (name_len <0 ) { + err = name_len; + goto fail_free; + }for (i =ARRAY_SIZE (model_names); --i; )if (strlen (model_names[i]) <= name_len &&strncmp (name, model_names[i], name_len) ==0 )
drivers/media/i2c/m5mols/m5mols_core.c +2 -1
@@ -754,7 +754,8 @@ static int m5mols_sensor_power(struct m5mols_info *info, bool enable) ret =regulator_bulk_enable (ARRAY_SIZE (supplies), supplies);if (ret) { - info->set_power (&client->dev,0 ); +if (info->set_power) + info->set_power (&client->dev,0 );return ret; }
drivers/media/i2c/tc358743.c +1 -1
@@ -1321,7 +1321,7 @@ static int tc358743_isr(struct v4l2_subdev *sd, u32 status, bool *handled)static irqreturn_t tc358743_irq_handler (int irq,void *dev_id) {struct tc358743_state *state = dev_id; -bool handled; +bool handled = false;tc358743_isr (&state->sd,0 , &handled);
drivers/media/pci/bt8xx/bttv-driver.c +10 -3
@@ -4059,11 +4059,13 @@ static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id) btv->id = dev->device;if (pci_enable_device (dev)) {pr_warn ("%d: Can't enable device\n" , btv->c.nr); -return -EIO ; + result = -EIO ; + goto free_mem; }if (pci_set_dma_mask (dev,DMA_BIT_MASK (32 ))) {pr_warn ("%d: No suitable DMA available\n" , btv->c.nr); -return -EIO ; + result = -EIO ; + goto free_mem; } if (!request_mem_region(pci_resource_start(dev,0), pci_resource_len(dev,0),
@@ -4071,7 +4073,8 @@ static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)pr_warn ("%d: can't request iomem (0x%llx)\n" , btv->c.nr, (unsigned long long )pci_resource_start (dev,0 )); -return -EBUSY ; + result = -EBUSY ; + goto free_mem; }pci_set_master (dev);pci_set_command (dev);
@@ -4257,6 +4260,10 @@ static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)release_mem_region (pci_resource_start (btv->c.pci,0 ),pci_resource_len (btv->c.pci,0 ));pci_disable_device (btv->c.pci); + +free_mem: + bttvs[btv->c.nr] =NULL ; +kfree (btv);return result; }
drivers/media/pci/saa7134/saa7134-tvaudio.c +2 -1
@@ -697,7 +697,8 @@ int saa_dsp_writel(struct saa7134_dev *dev, int reg, u32 value) {int err; -audio_dbg (2 ,"dsp write reg 0x%x = 0x%06x\n" , reg <<2 , value); +audio_dbg (2 ,"dsp write reg 0x%x = 0x%06x\n" , + (reg <<2 ) &0xffffffff , value); err =saa_dsp_wait_bit (dev,SAA7135_DSP_RWSTATE_WRR );if (err <0 )return err;
drivers/media/platform/exynos4-is/fimc-isp.c +3 -1
@@ -311,8 +311,10 @@ static int fimc_isp_subdev_s_power(struct v4l2_subdev *sd, int on)if (on) { ret =pm_runtime_get_sync (&is->pdev->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put (&is->pdev->dev);return ret; + }set_bit (IS_ST_PWR_ON , &is->state); ret =fimc_is_start_firmware (is);
drivers/media/platform/exynos4-is/fimc-lite.c +1 -1
@@ -480,7 +480,7 @@ static int fimc_lite_open(struct file *file)set_bit (ST_FLITE_IN_USE , &fimc->state); ret =pm_runtime_get_sync (&fimc->pdev->dev);if (ret <0 ) - goto unlock; + goto err_pm; ret =v4l2_fh_open (file);if (ret <0 )
drivers/media/platform/exynos4-is/media-dev.c +4 -4
@@ -477,8 +477,10 @@ static int fimc_md_register_sensor_entities(struct fimc_md *fmd)return -ENXIO ; ret =pm_runtime_get_sync (fmd->pmf); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put (fmd->pmf);return ret; + } fmd->num_sensors =0 ;
@@ -1255,11 +1257,9 @@ static int fimc_md_get_pinctrl(struct fimc_md *fmd)if (IS_ERR (pctl->state_default))return PTR_ERR (pctl->state_default); +/* PINCTRL_STATE_IDLE is optional */ pctl->state_idle =pinctrl_lookup_state (pctl->pinctrl,PINCTRL_STATE_IDLE ); -if (IS_ERR (pctl->state_idle)) -return PTR_ERR (pctl->state_idle); -return 0 ; }
drivers/media/platform/exynos4-is/mipi-csis.c +3 -1
@@ -513,8 +513,10 @@ static int s5pcsis_s_stream(struct v4l2_subdev *sd, int enable)if (enable) {s5pcsis_clear_counters (state); ret =pm_runtime_get_sync (&state->pdev->dev); -if (ret && ret !=1 ) +if (ret && ret !=1 ) { +pm_runtime_put_noidle (&state->pdev->dev);return ret; + } }mutex_lock (&state->lock);
drivers/media/platform/omap3isp/isp.c +4 -2
@@ -2273,8 +2273,10 @@ static int isp_probe(struct platform_device *pdev) mem =platform_get_resource (pdev,IORESOURCE_MEM , i); isp->mmio_base[map_idx] =devm_ioremap_resource (isp->dev, mem); -if (IS_ERR (isp->mmio_base[map_idx])) -return PTR_ERR (isp->mmio_base[map_idx]); +if (IS_ERR (isp->mmio_base[map_idx])) { + ret =PTR_ERR (isp->mmio_base[map_idx]); + goto error; + } } ret =isp_get_clocks (isp);
drivers/media/platform/rcar-fcp.c +3 -1
@@ -107,8 +107,10 @@ int rcar_fcp_enable(struct rcar_fcp_device *fcp)return 0 ; ret =pm_runtime_get_sync (fcp->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_noidle (fcp->dev);return ret; + }return 0 ; }
drivers/media/platform/s3c-camif/camif-core.c +2 -3
@@ -476,7 +476,7 @@ static int s3c_camif_probe(struct platform_device *pdev) ret =camif_media_dev_init (camif);if (ret <0 ) - goto err_alloc; + goto err_pm; ret =camif_register_sensor (camif);if (ret <0 )
@@ -510,10 +510,9 @@ static int s3c_camif_probe(struct platform_device *pdev)media_device_unregister (&camif->media_dev);media_device_cleanup (&camif->media_dev);camif_unregister_media_entities (camif); -err_alloc: +err_pm:pm_runtime_put (dev);pm_runtime_disable (dev); -err_pm:camif_clk_put (camif); err_clk:s3c_camif_unregister_subdev (camif);
drivers/media/platform/sti/bdisp/bdisp-v4l2.c +1 -2
@@ -1366,7 +1366,7 @@ static int bdisp_probe(struct platform_device *pdev) ret =pm_runtime_get_sync (dev);if (ret <0 ) {dev_err (dev,"failed to set PM\n" ); - goto err_dbg; + goto err_pm; }/* Filters */
@@ -1394,7 +1394,6 @@ static int bdisp_probe(struct platform_device *pdev)bdisp_hw_free_filters (bdisp->dev); err_pm:pm_runtime_put (dev); -err_dbg:bdisp_debugfs_remove (bdisp); err_v4l2:v4l2_device_unregister (&bdisp->v4l2_dev);
drivers/media/platform/sti/hva/hva-hw.c +1 -1
@@ -389,7 +389,7 @@ int hva_hw_probe(struct platform_device *pdev, struct hva_dev *hva) ret =pm_runtime_get_sync (dev);if (ret <0 ) {dev_err (dev,"%s failed to set PM\n" ,HVA_PREFIX ); - goto err_clk; + goto err_pm; }/* check IP hardware version */
drivers/media/platform/ti-vpe/vpe.c +2 -0
@@ -2133,6 +2133,8 @@ static int vpe_runtime_get(struct platform_device *pdev) r =pm_runtime_get_sync (&pdev->dev);WARN_ON (r <0 ); +if (r) +pm_runtime_put_noidle (&pdev->dev);return r <0 ? r :0 ; }
drivers/media/platform/vsp1/vsp1_drv.c +8 -3
@@ -487,7 +487,12 @@ int vsp1_device_get(struct vsp1_device *vsp1)int ret; ret =pm_runtime_get_sync (vsp1->dev); -return ret <0 ? ret :0 ; +if (ret <0 ) { +pm_runtime_put_noidle (vsp1->dev); +return ret; + } + +return 0 ; }/*
@@ -727,12 +732,12 @@ static int vsp1_probe(struct platform_device *pdev)/* Configure device parameters based on the version register. */ pm_runtime_enable (&pdev->dev); - ret =pm_runtime_get_sync (&pdev->dev); + ret =vsp1_device_get (vsp1);if (ret <0 ) goto done; vsp1->version =vsp1_read (vsp1,VI6_IP_VERSION ); -pm_runtime_put_sync (&pdev->dev); +vsp1_device_put (vsp1);for (i =0 ; i <ARRAY_SIZE (vsp1_device_infos); ++i) { if ((vsp1->version & VI6_IP_VERSION_MODEL_MASK) ==
drivers/media/rc/ati_remote.c +4 -0
@@ -850,6 +850,10 @@ static int ati_remote_probe(struct usb_interface *interface,err ("%s: endpoint_in message size==0? \n" , __func__);return -ENODEV ; } +if (!usb_endpoint_is_int_out (endpoint_out)) { +err ("%s: Unexpected endpoint_out\n" , __func__); +return -ENODEV ; + } ati_remote =kzalloc (sizeof (struct ati_remote ),GFP_KERNEL ); rc_dev =rc_allocate_device ();
drivers/media/usb/uvc/uvc_v4l2.c +30 -0
@@ -257,11 +257,41 @@ static int uvc_v4l2_try_format(struct uvc_streaming *stream,if (ret <0 ) goto done; +/* After the probe, update fmt with the values returned from +* negotiation with the device. +*/ +for (i =0 ; i < stream->nformats; ++i) { +if (probe->bFormatIndex == stream->format[i].index) { + format = &stream->format[i]; +break ; + } + } + +if (i == stream->nformats) { +uvc_trace (UVC_TRACE_FORMAT ,"Unknown bFormatIndex %u\n" , + probe->bFormatIndex); +return -EINVAL ; + } + +for (i =0 ; i < format->nframes; ++i) { +if (probe->bFrameIndex == format->frame[i].bFrameIndex) { + frame = &format->frame[i]; +break ; + } + } + +if (i == format->nframes) { +uvc_trace (UVC_TRACE_FORMAT ,"Unknown bFrameIndex %u\n" , + probe->bFrameIndex); +return -EINVAL ; + } + fmt->fmt.pix.width = frame->wWidth; fmt->fmt.pix.height = frame->wHeight; fmt->fmt.pix.field =V4L2_FIELD_NONE ; fmt->fmt.pix.bytesperline =uvc_v4l2_get_bytesperline (format, frame); fmt->fmt.pix.sizeimage = probe->dwMaxVideoFrameSize; + fmt->fmt.pix.pixelformat = format->fcc; fmt->fmt.pix.colorspace = format->colorspace; fmt->fmt.pix.priv =0 ;
drivers/memory/fsl-corenet-cf.c +2 -4
@@ -215,10 +215,8 @@ static int ccf_probe(struct platform_device *pdev)dev_set_drvdata (&pdev->dev, ccf); irq =platform_get_irq (pdev,0 ); -if (!irq) { -dev_err (&pdev->dev,"%s: no irq\n" , __func__); -return -ENXIO ; - } +if (irq <0 ) +return irq; ret =devm_request_irq (&pdev->dev, irq, ccf_irq,0 , pdev->name, ccf);if (ret) {
drivers/memory/omap-gpmc.c +2 -2
@@ -951,7 +951,7 @@ static int gpmc_cs_remap(int cs, u32 base)int ret;u32 old_base, size; -if (cs > gpmc_cs_num) { +if (cs >= gpmc_cs_num) {pr_err ("%s: requested chip-select is disabled\n" , __func__);return -ENODEV ; }
@@ -986,7 +986,7 @@ int gpmc_cs_request(int cs, unsigned long size, unsigned long *base)struct resource *res = &gpmc->mem;int r =-1 ; -if (cs > gpmc_cs_num) { +if (cs >= gpmc_cs_num) {pr_err ("%s: requested chip-select is disabled\n" , __func__);return -ENODEV ; }
drivers/mfd/rtsx_pcr.c +3 -1
@@ -1255,12 +1255,14 @@ static int rtsx_pci_probe(struct pci_dev *pcidev, ret =mfd_add_devices (&pcidev->dev, pcr->id, rtsx_pcr_cells,ARRAY_SIZE (rtsx_pcr_cells),NULL ,0 ,NULL );if (ret <0 ) - goto disable_irq; + goto free_slots;schedule_delayed_work (&pcr->idle_work,msecs_to_jiffies (200 ));return 0 ; +free_slots: +kfree (pcr->slots); disable_irq:free_irq (pcr->irq, (void *)pcr); disable_msi:
drivers/mfd/sm501.c +7 -1
@@ -1425,8 +1425,14 @@ static int sm501_plat_probe(struct platform_device *dev) goto err_claim; } -return sm501_init_dev (sm); + ret =sm501_init_dev (sm); +if (ret) + goto err_unmap; + +return 0 ; + err_unmap: +iounmap (sm->regs); err_claim:release_resource (sm->regs_claim);kfree (sm->regs_claim);
drivers/misc/eeprom/at25.c +1 -1
@@ -355,7 +355,7 @@ static int at25_probe(struct spi_device *spi) at25->nvmem_config.reg_read = at25_ee_read; at25->nvmem_config.reg_write = at25_ee_write; at25->nvmem_config.priv = at25; - at25->nvmem_config.stride =4 ; + at25->nvmem_config.stride =1 ; at25->nvmem_config.word_size =1 ; at25->nvmem_config.size = chip.byte_len;
drivers/misc/mic/scif/scif_rma.c +2 -2
@@ -1401,6 +1401,8 @@ int __scif_pin_pages(void *addr, size_t len, int *out_prot, NULL);up_write (&mm->mmap_sem);if (nr_pages != pinned_pages->nr_pages) { +if (pinned_pages->nr_pages <0 ) + pinned_pages->nr_pages =0 ;if (try_upgrade) {if (ulimit) __scif_dec_pinned_vm_lock(mm,
@@ -1421,7 +1423,6 @@ int __scif_pin_pages(void *addr, size_t len, int *out_prot,if (pinned_pages->nr_pages < nr_pages) { err = -EFAULT ; - pinned_pages->nr_pages = nr_pages; goto dec_pinned; }
@@ -1434,7 +1435,6 @@ int __scif_pin_pages(void *addr, size_t len, int *out_prot,__scif_dec_pinned_vm_lock (mm, nr_pages,0 );/* Something went wrong! Rollback */ error_unmap: - pinned_pages->nr_pages = nr_pages;scif_destroy_pinned_pages (pinned_pages); *pages =NULL ; dev_dbg(scif_info.mdev.this_device,
drivers/misc/mic/vop/vop_main.c +1 -1
@@ -301,7 +301,7 @@ static struct virtqueue *vop_find_vq(struct virtio_device *dev,/* First assign the vring's allocated in host memory */ vqconfig =_vop_vq_config (vdev->desc) + index;memcpy_fromio (&config, vqconfig,sizeof (config)); - _vr_size =vring_size (le16_to_cpu (config.num),MIC_VIRTIO_RING_ALIGN ); + _vr_size =round_up (vring_size (le16_to_cpu (config.num),MIC_VIRTIO_RING_ALIGN ),4 ); vr_size =PAGE_ALIGN (_vr_size +sizeof (struct _mic_vring_info )); va = vpdev->hw_ops->ioremap (vpdev,le64_to_cpu (config.address), vr_size);
drivers/misc/mic/vop/vop_vringh.c +16 -8
@@ -308,7 +308,7 @@ static int vop_virtio_add_device(struct vop_vdev *vdev, num =le16_to_cpu (vqconfig[i].num);mutex_init (&vvr->vr_mutex); - vr_size =PAGE_ALIGN (vring_size (num,MIC_VIRTIO_RING_ALIGN ) + + vr_size =PAGE_ALIGN (round_up (vring_size (num,MIC_VIRTIO_RING_ALIGN ),4 ) +sizeof (struct _mic_vring_info )); vr->va = (void *) __get_free_pages(GFP_KERNEL | __GFP_ZERO,
@@ -320,7 +320,7 @@ static int vop_virtio_add_device(struct vop_vdev *vdev, goto err; } vr->len = vr_size; - vr->info = vr->va +vring_size (num,MIC_VIRTIO_RING_ALIGN ); + vr->info = vr->va +round_up (vring_size (num,MIC_VIRTIO_RING_ALIGN ),4 ); vr->info->magic =cpu_to_le32 (MIC_MAGIC + vdev->virtio_id + i); vr_addr =dma_map_single (&vpdev->dev, vr->va, vr_size,DMA_BIDIRECTIONAL );
@@ -611,6 +611,7 @@ static int vop_virtio_copy_from_user(struct vop_vdev *vdev, void __user *ubuf,size_t partlen;bool dma =VOP_USE_DMA ;int err =0 ; +size_t offset =0 ;if (daddr & (dma_alignment -1 )) { vdev->tx_dst_unaligned += len;
@@ -659,13 +660,20 @@ static int vop_virtio_copy_from_user(struct vop_vdev *vdev, void __user *ubuf,* We are copying to IO below and should ideally use something * like copy_from_user_toio(..) if it existed. */ -if (copy_from_user ((void __force *)dbuf, ubuf, len)) { - err = -EFAULT ; -dev_err (vop_dev (vdev),"%s %d err %d\n" , - __func__, __LINE__, err); - goto err; +while (len) { + partlen =min_t (size_t, len,VOP_INT_DMA_BUF_SIZE ); + +if (copy_from_user (vvr->buf, ubuf + offset, partlen)) { + err = -EFAULT ; +dev_err (vop_dev (vdev),"%s %d err %d\n" , + __func__, __LINE__, err); + goto err; + } +memcpy_toio (dbuf + offset, vvr->buf, partlen); + offset += partlen; + vdev->out_bytes += partlen; + len -= partlen; } - vdev->out_bytes += len; err =0 ; err: vpdev->hw_ops->iounmap (vpdev, dbuf);
drivers/misc/vmw_vmci/vmci_queue_pair.c +6 -4
@@ -758,8 +758,9 @@ static int qp_host_get_user_memory(u64 produce_uva,if (retval < (int )produce_q->kernel_if->num_pages) {pr_debug ("get_user_pages_fast(produce) failed (retval=%d)" , retval); -qp_release_pages (produce_q->kernel_if->u.h.header_page, - retval, false); +if (retval >0 ) +qp_release_pages (produce_q->kernel_if->u.h.header_page, + retval, false); err =VMCI_ERROR_NO_MEM ; goto out; }
@@ -770,8 +771,9 @@ static int qp_host_get_user_memory(u64 produce_uva,if (retval < (int )consume_q->kernel_if->num_pages) {pr_debug ("get_user_pages_fast(consume) failed (retval=%d)" , retval); -qp_release_pages (consume_q->kernel_if->u.h.header_page, - retval, false); +if (retval >0 ) +qp_release_pages (consume_q->kernel_if->u.h.header_page, + retval, false);qp_release_pages (produce_q->kernel_if->u.h.header_page, produce_q->kernel_if->num_pages, false); err =VMCI_ERROR_NO_MEM ;
drivers/mmc/core/sdio_cis.c +3 -0
@@ -30,6 +30,9 @@ static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func,unsigned i, nr_strings;char **buffer, *string; +if (size <2 ) +return 0 ; +/* Find all null-terminated (including zero length) strings in the TPLLV1_INFO field. Trailing garbage is ignored. */ buf +=2 ;
drivers/mtd/lpddr/lpddr2_nvm.c +19 -16
@@ -408,6 +408,17 @@ static int lpddr2_nvm_lock(struct mtd_info *mtd, loff_t start_add,return lpddr2_nvm_do_block_op (mtd, start_add, len,LPDDR2_NVM_LOCK ); } +static const struct mtd_info lpddr2_nvm_mtd_info = { + .type =MTD_RAM , + .writesize =1 , + .flags = (MTD_CAP_NVRAM |MTD_POWERUP_LOCK ), + ._read = lpddr2_nvm_read, + ._write = lpddr2_nvm_write, + ._erase = lpddr2_nvm_erase, + ._unlock = lpddr2_nvm_unlock, + ._lock = lpddr2_nvm_lock, +}; +/* * lpddr2_nvm driver probe method */
@@ -448,6 +459,7 @@ static int lpddr2_nvm_probe(struct platform_device *pdev) .pfow_base = OW_BASE_ADDRESS, .fldrv_priv = pcm_data, }; +if (IS_ERR (map->virt))return PTR_ERR (map->virt);
@@ -459,22 +471,13 @@ static int lpddr2_nvm_probe(struct platform_device *pdev)return PTR_ERR (pcm_data->ctl_regs);/* Populate mtd_info data structure */ - *mtd = (struct mtd_info ) { - .dev = { .parent = &pdev->dev }, - .name = pdev->dev.init_name, - .type =MTD_RAM , - .priv = map, - .size =resource_size (add_range), - .erasesize =ERASE_BLOCKSIZE * pcm_data->bus_width, - .writesize =1 , - .writebufsize =WRITE_BUFFSIZE * pcm_data->bus_width, - .flags = (MTD_CAP_NVRAM |MTD_POWERUP_LOCK ), - ._read = lpddr2_nvm_read, - ._write = lpddr2_nvm_write, - ._erase = lpddr2_nvm_erase, - ._unlock = lpddr2_nvm_unlock, - ._lock = lpddr2_nvm_lock, - }; + *mtd = lpddr2_nvm_mtd_info; + mtd->dev.parent = &pdev->dev; + mtd->name = pdev->dev.init_name; + mtd->priv = map; + mtd->size =resource_size (add_range); + mtd->erasesize =ERASE_BLOCKSIZE * pcm_data->bus_width; + mtd->writebufsize =WRITE_BUFFSIZE * pcm_data->bus_width;/* Verify the presence of the device looking for PFOW string */ if (!lpddr2_nvm_pfow_present (map)) {
drivers/mtd/mtdoops.c +6 -5
@@ -313,12 +313,13 @@ static void mtdoops_do_dump(struct kmsg_dumper *dumper,kmsg_dump_get_buffer (dumper, true, cxt->oops_buf +MTDOOPS_HEADER_SIZE , record_size -MTDOOPS_HEADER_SIZE ,NULL ); -/* Panics must be written immediately */ -if (reason !=KMSG_DUMP_OOPS ) +if (reason !=KMSG_DUMP_OOPS ) { +/* Panics must be written immediately */ mtdoops_write (cxt,1 ); - -/* For other cases, schedule work to write it "nicely" */ -schedule_work (&cxt->work_write); + }else { +/* For other cases, schedule work to write it "nicely" */ +schedule_work (&cxt->work_write); + } }static void mtdoops_notify_add (struct mtd_info *mtd)
drivers/net/ethernet/cisco/enic/enic.h +1 -0
@@ -163,6 +163,7 @@ struct enic {u16 num_vfs;#endif spinlock_t enic_api_lock; +bool enic_api_busy;struct enic_port_profile *pp;/* work queue cache line section */
drivers/net/ethernet/cisco/enic/enic_api.c +6 -0
@@ -34,6 +34,12 @@ int enic_api_devcmd_proxy_by_index(struct net_device *netdev, int vf,struct vnic_dev *vdev = enic->vdev;spin_lock (&enic->enic_api_lock); +while (enic->enic_api_busy) { +spin_unlock (&enic->enic_api_lock); +cpu_relax (); +spin_lock (&enic->enic_api_lock); + } +spin_lock_bh (&enic->devcmd_lock);vnic_dev_cmd_proxy_by_index_start (vdev, vf);
drivers/net/ethernet/cisco/enic/enic_main.c +21 -6
@@ -1938,8 +1938,6 @@ static int enic_dev_wait(struct vnic_dev *vdev,int done;int err; -BUG_ON (in_interrupt ()); - err =start (vdev, arg);if (err)return err;
@@ -2116,6 +2114,13 @@ static int enic_set_rss_nic_cfg(struct enic *enic) rss_hash_bits, rss_base_cpu, rss_enable); } +static void enic_set_api_busy (struct enic *enic,bool busy) +{ +spin_lock (&enic->enic_api_lock); + enic->enic_api_busy = busy; +spin_unlock (&enic->enic_api_lock); +} +static void enic_reset (struct work_struct *work) { struct enic *enic = container_of(work, struct enic, reset);
@@ -2125,7 +2130,9 @@ static void enic_reset(struct work_struct *work)rtnl_lock (); -spin_lock (&enic->enic_api_lock); +/* Stop any activity from infiniband */ +enic_set_api_busy (enic, true); +enic_stop (enic->netdev);enic_dev_soft_reset (enic);enic_reset_addr_lists (enic);
@@ -2133,7 +2140,10 @@ static void enic_reset(struct work_struct *work)enic_set_rss_nic_cfg (enic);enic_dev_set_ig_vlan_rewrite_mode (enic);enic_open (enic->netdev); -spin_unlock (&enic->enic_api_lock); + +/* Allow infiniband to fiddle with the device again */ +enic_set_api_busy (enic, false); +call_netdevice_notifiers (NETDEV_REBOOT , enic->netdev);rtnl_unlock ();
@@ -2145,7 +2155,9 @@ static void enic_tx_hang_reset(struct work_struct *work)rtnl_lock (); -spin_lock (&enic->enic_api_lock); +/* Stop any activity from infiniband */ +enic_set_api_busy (enic, true); +enic_dev_hang_notify (enic);enic_stop (enic->netdev);enic_dev_hang_reset (enic);
@@ -2154,7 +2166,10 @@ static void enic_tx_hang_reset(struct work_struct *work)enic_set_rss_nic_cfg (enic);enic_dev_set_ig_vlan_rewrite_mode (enic);enic_open (enic->netdev); -spin_unlock (&enic->enic_api_lock); + +/* Allow infiniband to fiddle with the device again */ +enic_set_api_busy (enic, false); +call_netdevice_notifiers (NETDEV_REBOOT , enic->netdev);rtnl_unlock ();
drivers/net/ethernet/ibm/ibmveth.c +12 -1
@@ -1256,6 +1256,7 @@ static int ibmveth_poll(struct napi_struct *napi, int budget)int offset =ibmveth_rxq_frame_offset (adapter);int csum_good =ibmveth_rxq_csum_good (adapter);int lrg_pkt =ibmveth_rxq_large_packet (adapter); +__sum16 iph_check =0 ; skb =ibmveth_rxq_get_buffer (adapter);
@@ -1307,7 +1308,17 @@ static int ibmveth_poll(struct napi_struct *napi, int budget) } } -if (length > netdev->mtu +ETH_HLEN ) { +/* PHYP without PLSO support places a -1 in the ip +* checksum for large send frames. +*/ +if (skb->protocol ==cpu_to_be16 (ETH_P_IP )) { +struct iphdr *iph = (struct iphdr *)skb->data; + + iph_check = iph->check; + } + +if ((length > netdev->mtu +ETH_HLEN ) || + lrg_pkt || iph_check ==0xffff ) {ibmveth_rx_mss_helper (skb, mss, lrg_pkt); adapter->rx_large_packets++; }
drivers/net/ethernet/korina.c +2 -1
@@ -1188,7 +1188,7 @@ static int korina_probe(struct platform_device *pdev)return rc; probe_err_register: -kfree (lp->td_ring); +kfree ((struct dma_desc *)KSEG0ADDR (lp->td_ring)); probe_err_td_ring:iounmap (lp->tx_dma_regs); probe_err_dma_tx:
@@ -1208,6 +1208,7 @@ static int korina_remove(struct platform_device *pdev)iounmap (lp->eth_regs);iounmap (lp->rx_dma_regs);iounmap (lp->tx_dma_regs); +kfree ((struct dma_desc *)KSEG0ADDR (lp->td_ring));unregister_netdev (bif->dev);free_netdev (bif->dev);
drivers/net/ethernet/realtek/r8169.c +56 -52
126 lines not on this page · raw message
drivers/net/wan/hdlc.c +9 -1
@@ -57,7 +57,15 @@ int hdlc_change_mtu(struct net_device *dev, int new_mtu)static int hdlc_rcv (struct sk_buff *skb,struct net_device *dev,struct packet_type *p,struct net_device *orig_dev) { -struct hdlc_device *hdlc =dev_to_hdlc (dev); +struct hdlc_device *hdlc; + +/* First make sure "dev" is an HDLC device */ +if (!(dev->priv_flags &IFF_WAN_HDLC )) { +kfree_skb (skb); +return NET_RX_SUCCESS ; + } + + hdlc =dev_to_hdlc (dev);if (!net_eq (dev_net (dev), &init_net)) {kfree_skb (skb);
drivers/net/wan/hdlc_raw_eth.c +1 -0
@@ -101,6 +101,7 @@ static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr) old_qlen = dev->tx_queue_len;ether_setup (dev); dev->tx_queue_len = old_qlen; + dev->priv_flags &= ~IFF_TX_SKB_SHARING ;eth_hw_addr_random (dev);call_netdevice_notifiers (NETDEV_POST_TYPE_CHANGE , dev);netif_dormant_off (dev);
drivers/net/wireless/ath/ath10k/htt_rx.c +8 -0
@@ -100,6 +100,14 @@ static int __ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num)BUILD_BUG_ON (HTT_RX_RING_FILL_LEVEL >=HTT_RX_RING_SIZE /2 ); idx =__le32_to_cpu (*htt->rx_ring.alloc_idx.vaddr); + +if (idx <0 || idx >= htt->rx_ring.size) { +ath10k_err (htt->ar,"rx ring index is not valid, firmware malfunctioning?\n" ); + idx &= htt->rx_ring.size_mask; + ret = -ENOMEM ; + goto fail; + } +while (num >0 ) { skb =dev_alloc_skb (HTT_RX_BUF_SIZE +HTT_RX_DESC_ALIGN );if (!skb) {
drivers/net/wireless/ath/ath10k/mac.c +1 -1
@@ -6579,7 +6579,7 @@ ath10k_mac_update_bss_chan_survey(struct ath10k *ar, struct ieee80211_channel *channel) {int ret; -enum wmi_bss_survey_req_type type =WMI_BSS_SURVEY_REQ_TYPE_READ_CLEAR ; +enum wmi_bss_survey_req_type type =WMI_BSS_SURVEY_REQ_TYPE_READ ;lockdep_assert_held (&ar->conf_mutex);
drivers/net/wireless/ath/ath6kl/main.c +3 -0
@@ -430,6 +430,9 @@ void ath6kl_connect_ap_mode_sta(struct ath6kl_vif *vif, u16 aid, u8 *mac_addr,ath6kl_dbg (ATH6KL_DBG_TRC ,"new station %pM aid=%d\n" , mac_addr, aid); +if (aid <1 || aid >AP_MAX_NUM_STA ) +return ; +if (assoc_req_len >sizeof (struct ieee80211_hdr_3addr )) {struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) assoc_info;
drivers/net/wireless/ath/ath6kl/wmi.c +5 -0
@@ -2648,6 +2648,11 @@ int ath6kl_wmi_delete_pstream_cmd(struct wmi *wmi, u8 if_idx, u8 traffic_class,return -EINVAL ; } +if (tsid >=16 ) { +ath6kl_err ("invalid tsid: %d\n" , tsid); +return -EINVAL ; + } + skb =ath6kl_wmi_get_new_buf (sizeof (*cmd));if (!skb)return -ENOMEM ;
drivers/net/wireless/ath/ath9k/hif_usb.c +19 -0
@@ -447,10 +447,19 @@ static void hif_usb_stop(void *hif_handle)spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);/* The pending URBs have to be canceled. */ +spin_lock_irqsave (&hif_dev->tx.tx_lock, flags);list_for_each_entry_safe (tx_buf, tx_buf_tmp, &hif_dev->tx.tx_pending, list) { +usb_get_urb (tx_buf->urb); +spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);usb_kill_urb (tx_buf->urb); +list_del (&tx_buf->list); +usb_free_urb (tx_buf->urb); +kfree (tx_buf->buf); +kfree (tx_buf); +spin_lock_irqsave (&hif_dev->tx.tx_lock, flags); } +spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);usb_kill_anchored_urbs (&hif_dev->mgmt_submitted); }
@@ -760,27 +769,37 @@ static void ath9k_hif_usb_dealloc_tx_urbs(struct hif_device_usb *hif_dev)struct tx_buf *tx_buf =NULL , *tx_buf_tmp =NULL ;unsigned long flags; +spin_lock_irqsave (&hif_dev->tx.tx_lock, flags);list_for_each_entry_safe (tx_buf, tx_buf_tmp, &hif_dev->tx.tx_buf, list) { +usb_get_urb (tx_buf->urb); +spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);usb_kill_urb (tx_buf->urb);list_del (&tx_buf->list);usb_free_urb (tx_buf->urb);kfree (tx_buf->buf);kfree (tx_buf); +spin_lock_irqsave (&hif_dev->tx.tx_lock, flags); } +spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);spin_lock_irqsave (&hif_dev->tx.tx_lock, flags); hif_dev->tx.flags |=HIF_USB_TX_FLUSH ;spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags); +spin_lock_irqsave (&hif_dev->tx.tx_lock, flags);list_for_each_entry_safe (tx_buf, tx_buf_tmp, &hif_dev->tx.tx_pending, list) { +usb_get_urb (tx_buf->urb); +spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);usb_kill_urb (tx_buf->urb);list_del (&tx_buf->list);usb_free_urb (tx_buf->urb);kfree (tx_buf->buf);kfree (tx_buf); +spin_lock_irqsave (&hif_dev->tx.tx_lock, flags); } +spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);usb_kill_anchored_urbs (&hif_dev->mgmt_submitted); }
drivers/net/wireless/ath/ath9k/htc_hst.c +2 -0
@@ -346,6 +346,8 @@ void ath9k_htc_txcompletion_cb(struct htc_target *htc_handle,if (skb) { htc_hdr = (struct htc_frame_hdr *) skb->data; +if (htc_hdr->endpoint_id >=ARRAY_SIZE (htc_handle->endpoint)) + goto ret; endpoint = &htc_handle->endpoint[htc_hdr->endpoint_id];skb_pull (skb,sizeof (struct htc_frame_hdr ));
drivers/net/wireless/ath/wcn36xx/main.c +1 -1
@@ -158,7 +158,7 @@ static struct ieee80211_supported_band wcn_band_5ghz = { .ampdu_density = IEEE80211_HT_MPDU_DENSITY_16, .mcs = { .rx_mask = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, - .rx_highest =cpu_to_le16 (72 ), + .rx_highest =cpu_to_le16 (150 ), .tx_params = IEEE80211_HT_MCS_TX_DEFINED, } }
drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c +2 -0
@@ -1540,6 +1540,8 @@ int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr)BRCMF_TX_IOCTL_MAX_MSG_SIZE , msgbuf->ioctbuf, msgbuf->ioctbuf_handle); +if (msgbuf->txflow_wq) +destroy_workqueue (msgbuf->txflow_wq);kfree (msgbuf); }return -ENOMEM ;
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c +3 -1
@@ -5090,8 +5090,10 @@ bool wlc_phy_attach_lcnphy(struct brcms_phy *pi) pi->pi_fptr.radioloftget = wlc_lcnphy_get_radio_loft; pi->pi_fptr.detach = wlc_phy_detach_lcnphy; -if (!wlc_phy_txpwr_srom_read_lcnphy (pi)) +if (!wlc_phy_txpwr_srom_read_lcnphy (pi)) { +kfree (pi->u.pi_lcnphy);return false; + }if (LCNREV_IS (pi->pubpi.phy_rev,1 )) {if (pi_lcn->lcnphy_tempsense_option ==3 ) {
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +6 -3
@@ -3046,9 +3046,12 @@ static int iwl_mvm_send_aux_roc_cmd(struct iwl_mvm *mvm, aux_roc_req.apply_time_max_delay =cpu_to_le32 (delay);IWL_DEBUG_TE (mvm, -"ROC: Requesting to remain on channel %u for %ums (requested = %ums, max_delay = %ums, dtim_interval = %ums)\n" , - channel->hw_value, req_dur, duration, delay, - dtim_interval); +"ROC: Requesting to remain on channel %u for %ums\n" , + channel->hw_value, req_dur); +IWL_DEBUG_TE (mvm, +"\t(requested = %ums, max_delay = %ums, dtim_interval = %ums)\n" , + duration, delay, dtim_interval); +/* Set the node address */ memcpy (aux_roc_req.node_addr, vif->addr,ETH_ALEN );
drivers/net/wireless/marvell/mwifiex/scan.c +1 -1
@@ -1879,7 +1879,7 @@ mwifiex_parse_single_response_buf(struct mwifiex_private *priv, u8 **bss_info, chan,CFG80211_BSS_FTYPE_UNKNOWN , bssid, timestamp, cap_info_bitmap, beacon_period, - ie_buf, ie_len, rssi, GFP_KERNEL); + ie_buf, ie_len, rssi, GFP_ATOMIC);if (bss) { bss_priv = (struct mwifiex_bss_priv *)bss->priv; bss_priv->band = band;
drivers/net/wireless/marvell/mwifiex/sdio.c +2 -0
@@ -2049,6 +2049,8 @@ static int mwifiex_alloc_sdio_mpa_buffers(struct mwifiex_adapter *adapter,kfree (card->mpa_rx.buf); card->mpa_tx.buf_size =0 ; card->mpa_rx.buf_size =0 ; + card->mpa_tx.buf =NULL ; + card->mpa_rx.buf =NULL ; }return ret;
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +9 -1
@@ -5422,7 +5422,6 @@ static int rtl8xxxu_submit_int_urb(struct ieee80211_hw *hw) ret =usb_submit_urb (urb,GFP_KERNEL );if (ret) {usb_unanchor_urb (urb); -usb_free_urb (urb); goto error; }
@@ -5431,6 +5430,7 @@ static int rtl8xxxu_submit_int_urb(struct ieee80211_hw *hw)rtl8xxxu_write32 (priv,REG_USB_HIMR , val32); error: +usb_free_urb (urb);return ret; }
@@ -5756,6 +5756,7 @@ static int rtl8xxxu_start(struct ieee80211_hw *hw)struct rtl8xxxu_priv *priv = hw->priv;struct rtl8xxxu_rx_urb *rx_urb;struct rtl8xxxu_tx_urb *tx_urb; +struct sk_buff *skb;unsigned long flags;int ret, i;
@@ -5806,6 +5807,13 @@ static int rtl8xxxu_start(struct ieee80211_hw *hw) rx_urb->hw = hw; ret =rtl8xxxu_submit_rx_urb (priv, rx_urb); +if (ret) { +if (ret != -ENOMEM ) { + skb = (struct sk_buff *)rx_urb->urb.context; +dev_kfree_skb (skb); + } +rtl8xxxu_queue_rx_urb (priv, rx_urb); + } } exit:/*
drivers/ntb/hw/amd/ntb_hw_amd.c +1 -0
@@ -994,6 +994,7 @@ static int amd_ntb_init_pci(struct amd_ntb_dev *ndev, err_dma_mask:pci_clear_master (pdev); +pci_release_regions (pdev); err_pci_regions:pci_disable_device (pdev); err_pci_enable:
drivers/nvme/target/core.c +2 -1
@@ -591,7 +591,8 @@ static void nvmet_start_ctrl(struct nvmet_ctrl *ctrl)* in case a host died before it enabled the controller. Hence, simply * reset the keep alive timer when the controller is enabled. */ -mod_delayed_work (system_wq, &ctrl->ka_work, ctrl->kato *HZ ); +if (ctrl->kato) +mod_delayed_work (system_wq, &ctrl->ka_work, ctrl->kato *HZ ); }static void nvmet_clear_ctrl (struct nvmet_ctrl *ctrl)
drivers/rapidio/devices/rio_mport_cdev.c +11 -7
@@ -901,15 +901,16 @@ rio_dma_transfer(struct file *filp, u32 transfer_mode,if (pinned <0 ) {rmcd_error ("get_user_pages err=%ld" , pinned); nr_pages =0 ; - }else + }else {rmcd_error ("pinned %ld out of %ld pages" , pinned, nr_pages); +/* +* Set nr_pages up to mean "how many pages to unpin, in +* the error handler: +*/ + nr_pages = pinned; + } ret = -EFAULT ; -/* -* Set nr_pages up to mean "how many pages to unpin, in -* the error handler: -*/ - nr_pages = pinned; goto err_pg; }
@@ -1739,6 +1740,7 @@ static int rio_mport_add_riodev(struct mport_cdev_priv *priv,struct rio_dev *rdev;struct rio_switch *rswitch =NULL ;struct rio_mport *mport; +struct device *dev;size_t size;u32 rval;u32 swpinfo =0 ;
@@ -1753,8 +1755,10 @@ static int rio_mport_add_riodev(struct mport_cdev_priv *priv,rmcd_debug (RDEV ,"name:%s ct:0x%x did:0x%x hc:0x%x" , dev_info.name, dev_info.comptag, dev_info.destid, dev_info.hopcount); -if (bus_find_device_by_name (&rio_bus_type,NULL , dev_info.name)) { + dev =bus_find_device_by_name (&rio_bus_type,NULL , dev_info.name); +if (dev) {rmcd_debug (RDEV ,"device %s already exists" , dev_info.name); +put_device (dev);return -EEXIST ; }
drivers/regulator/core.c +13 -8
@@ -4029,15 +4029,20 @@ regulator_register(const struct regulator_desc *regulator_desc,else if (regulator_desc->supply_name) rdev->supply_name = regulator_desc->supply_name; -/* -* Attempt to resolve the regulator supply, if specified, -* but don't return an error if we fail because we will try -* to resolve it again later as more regulators are added. -*/ -if (regulator_resolve_supply (rdev)) -rdev_dbg (rdev,"unable to resolve supply\n" ); - ret =set_machine_constraints (rdev, constraints); +if (ret == -EPROBE_DEFER ) { +/* Regulator might be in bypass mode and so needs its supply +* to set the constraints */ +/* FIXME: this currently triggers a chicken-and-egg problem +* when creating -SUPPLY symlink in sysfs to a regulator +* that is just being created */ + ret =regulator_resolve_supply (rdev); +if (!ret) + ret =set_machine_constraints (rdev, constraints); +else +rdev_dbg (rdev,"unable to resolve supply early: %pe\n" , +ERR_PTR (ret)); + }if (ret <0 ) goto wash;
drivers/scsi/be2iscsi/be_main.c +2 -2
@@ -3052,6 +3052,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,if (!eq_vaddress) goto create_eq_error; + mem->dma = paddr; mem->va = eq_vaddress; ret =be_fill_queue (eq, phba->params.num_eq_entries,sizeof (struct be_eq_entry ), eq_vaddress);
@@ -3061,7 +3062,6 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba, goto create_eq_error; } - mem->dma = paddr; ret =beiscsi_cmd_eq_create (&phba->ctrl, eq, phwi_context->cur_eqd);if (ret) {
@@ -3116,6 +3116,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,if (!cq_vaddress) goto create_cq_error; + mem->dma = paddr; ret =be_fill_queue (cq, phba->params.num_cq_entries,sizeof (struct sol_cqe ), cq_vaddress);if (ret) {
@@ -3125,7 +3126,6 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba, goto create_cq_error; } - mem->dma = paddr; ret =beiscsi_cmd_cq_create (&phba->ctrl, cq, eq, false, false,0 );if (ret) {
drivers/scsi/csiostor/csio_hw.c +1 -1
@@ -1973,7 +1973,7 @@ static int csio_hw_prep_fw(struct csio_hw *hw, struct fw_info *fw_info,FW_HDR_FW_VER_MICRO_G (c),FW_HDR_FW_VER_BUILD_G (c),FW_HDR_FW_VER_MAJOR_G (k),FW_HDR_FW_VER_MINOR_G (k), FW_HDR_FW_VER_MICRO_G(k), FW_HDR_FW_VER_BUILD_G(k)); - ret =EINVAL ; + ret = -EINVAL ; goto bye; }
drivers/scsi/ibmvscsi/ibmvfc.c +1 -0
@@ -4804,6 +4804,7 @@ static int ibmvfc_probe(struct vio_dev *vdev, const struct vio_device_id *id)if (IS_ERR (vhost->work_thread)) {dev_err (dev,"Couldn't create kernel thread: %ld\n" ,PTR_ERR (vhost->work_thread)); + rc =PTR_ERR (vhost->work_thread); goto free_host_mem; }
drivers/scsi/mvumi.c +1 -0
@@ -2476,6 +2476,7 @@ static int mvumi_io_attach(struct mvumi_hba *mhba)if (IS_ERR (mhba->dm_thread)) {dev_err (&mhba->pdev->dev,"failed to create device scan thread\n" ); + ret =PTR_ERR (mhba->dm_thread);mutex_unlock (&mhba->sas_discovery_mutex); goto fail_create_thread; }
drivers/scsi/qla4xxx/ql4_os.c +1 -1
@@ -1223,7 +1223,7 @@ static int qla4xxx_get_host_stats(struct Scsi_Host *shost, char *buf, int len)le64_to_cpu (ql_iscsi_stats->iscsi_sequence_error); exit_host_stats:if (ql_iscsi_stats) -dma_free_coherent (&ha->pdev->dev, host_stats_size, +dma_free_coherent (&ha->pdev->dev, stats_size, ql_iscsi_stats, iscsi_stats_dma); ql4_printk(KERN_INFO, ha, "%s: Get host stats done\n",
drivers/tty/hvc/hvcs.c +7 -7
@@ -1232,13 +1232,6 @@ static void hvcs_close(struct tty_struct *tty, struct file *filp)tty_wait_until_sent (tty,HVCS_CLOSE_WAIT ); -/* -* This line is important because it tells hvcs_open that this -* device needs to be re-configured the next time hvcs_open is -* called. -*/ - tty->driver_data =NULL ; -free_irq (irq, hvcsd);return ; }else if (hvcsd->port.count <0 ) {
@@ -1254,6 +1247,13 @@ static void hvcs_cleanup(struct tty_struct * tty) {struct hvcs_struct *hvcsd = tty->driver_data; +/* +* This line is important because it tells hvcs_open that this +* device needs to be re-configured the next time hvcs_open is +* called. +*/ + tty->driver_data =NULL ; +tty_port_put (&hvcsd->port); }
drivers/tty/ipwireless/network.c +2 -2
@@ -116,7 +116,7 @@ static int ipwireless_ppp_start_xmit(struct ppp_channel *ppp_channel, skb->len, notify_packet_sent, network); -if (ret ==-1 ) { +if (ret <0 ) {skb_pull (skb,2 );return 0 ; }
@@ -133,7 +133,7 @@ static int ipwireless_ppp_start_xmit(struct ppp_channel *ppp_channel, notify_packet_sent, network);kfree (buf); -if (ret ==-1 ) +if (ret <0 )return 0 ; }kfree_skb (skb);
drivers/tty/ipwireless/tty.c +1 -1
@@ -217,7 +217,7 @@ static int ipw_write(struct tty_struct *linux_tty, ret =ipwireless_send_packet (tty->hardware,IPW_CHANNEL_RAS , buf, count, ipw_write_packet_sent_callback, tty); -if (ret ==-1 ) { +if (ret <0 ) {mutex_unlock (&tty->ipw_tty_mutex);return 0 ; }
drivers/tty/pty.c +1 -1
@@ -115,10 +115,10 @@ static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)spin_lock_irqsave (&to->port->lock, flags);/* Stuff the data into the input queue of the other end */ c =tty_insert_flip_string (to->port, buf, c); +spin_unlock_irqrestore (&to->port->lock, flags);/* And shovel */ if (c)tty_flip_buffer_push (to->port); -spin_unlock_irqrestore (&to->port->lock, flags); }return c; }
drivers/tty/serial/Kconfig +1 -0
@@ -9,6 +9,7 @@ menu "Serial drivers" config SERIAL_EARLYCON bool + depends on SERIAL_CORE help Support for early consoles with the earlycon parameter. This enables the console before standard serial driver is probed. The console is
drivers/usb/class/cdc-acm.c +23 -0
@@ -1178,9 +1178,21 @@ static int acm_probe(struct usb_interface *intf, } } }else { +int class =-1 ; + data_intf_num = union_header->bSlaveInterface0; control_interface =usb_ifnum_to_if (usb_dev, union_header->bMasterInterface0); data_interface =usb_ifnum_to_if (usb_dev, data_intf_num); + +if (control_interface) + class = control_interface->cur_altsetting->desc.bInterfaceClass; + +if (class !=USB_CLASS_COMM && class !=USB_CLASS_CDC_DATA ) { +dev_dbg (&intf->dev,"Broken union descriptor, assuming single interface\n" ); + combined_interfaces =1 ; + control_interface = data_interface = intf; + goto look_for_collapsed_interface; + } }if (!control_interface || !data_interface) {
@@ -1840,6 +1852,17 @@ static const struct usb_device_id acm_ids[] = { .driver_info = IGNORE_DEVICE, }, +/* Exclude ETAS ES58x */ + { USB_DEVICE(0x108c, 0x0159), /* ES581.4 */ + .driver_info =IGNORE_DEVICE , + }, + { USB_DEVICE(0x108c, 0x0168), /* ES582.1 */ + .driver_info = IGNORE_DEVICE, + }, + { USB_DEVICE(0x108c, 0x0169), /* ES584.1 */ + .driver_info = IGNORE_DEVICE, + }, + { USB_DEVICE(0x1bc7, 0x0021), /* Telit 3G ACM only composition */ .driver_info = SEND_ZERO_PACKET, },
drivers/usb/class/cdc-wdm.c +55 -17
114 lines not on this page · raw message
drivers/usb/core/urb.c +54 -35
120 lines not on this page · raw message
drivers/usb/gadget/function/f_ncm.c +5 -3
@@ -91,8 +91,10 @@ static inline struct f_ncm *func_to_ncm(struct usb_function *f)/* peak (theoretical) bulk transfer rate in bits-per-second */ static inline unsigned ncm_bitrate (struct usb_gadget *g) { -if (gadget_is_superspeed (g) && g->speed ==USB_SPEED_SUPER ) -return 13 *1024 *8 *1000 *8 ; +if (gadget_is_superspeed (g) && g->speed >=USB_SPEED_SUPER_PLUS ) +return 4250000000U ; +else if (gadget_is_superspeed (g) && g->speed ==USB_SPEED_SUPER ) +return 3750000000U ;else if (gadget_is_dualspeed (g) && g->speed ==USB_SPEED_HIGH )return 13 *512 *8 *1000 *8 ;else
@@ -1546,7 +1548,7 @@ static int ncm_bind(struct usb_configuration *c, struct usb_function *f) fs_ncm_notify_desc.bEndpointAddress; status =usb_assign_descriptors (f, ncm_fs_function, ncm_hs_function, - ncm_ss_function,NULL ); + ncm_ss_function, ncm_ss_function);if (status) goto fail;
drivers/usb/gadget/function/f_printer.c +14 -2
@@ -35,6 +35,7 @@#include <linux/types.h> #include <linux/ctype.h> #include <linux/cdev.h> +#include <linux/kref.h> #include <asm/byteorder.h> #include <linux/io.h>
@@ -69,7 +70,7 @@ struct printer_dev {struct usb_gadget *gadget;s8 interface;struct usb_ep *in_ep, *out_ep; - +struct kref kref;struct list_head rx_reqs;/* List of free RX structs */ struct list_head rx_reqs_active;/* List of Active RX xfers */ struct list_head rx_buffers;/* List of completed xfers */
@@ -223,6 +224,13 @@ static inline struct usb_endpoint_descriptor *ep_desc(struct usb_gadget *gadget,/*-------------------------------------------------------------------------*/ +static void printer_dev_free (struct kref *kref) +{ + struct printer_dev *dev = container_of(kref, struct printer_dev, kref); + +kfree (dev); +} +static struct usb_request *printer_req_alloc (struct usb_ep *ep,unsigned len,gfp_t gfp_flags) {
@@ -353,6 +361,7 @@ printer_open(struct inode *inode, struct file *fd)spin_unlock_irqrestore (&dev->lock, flags); +kref_get (&dev->kref);DBG (dev,"printer_open returned %x\n" , ret);return ret; }
@@ -370,6 +379,7 @@ printer_close(struct inode *inode, struct file *fd) dev->printer_status &= ~PRINTER_SELECTED ;spin_unlock_irqrestore (&dev->lock, flags); +kref_put (&dev->kref, printer_dev_free);DBG (dev,"printer_close\n" );return 0 ;
@@ -1320,7 +1330,8 @@ static void gprinter_free(struct usb_function *f)struct f_printer_opts *opts; opts = container_of(f->fi, struct f_printer_opts, func_inst); -kfree (dev); + +kref_put (&dev->kref, printer_dev_free);mutex_lock (&opts->lock); --opts->refcnt;mutex_unlock (&opts->lock);
@@ -1389,6 +1400,7 @@ static struct usb_function *gprinter_alloc(struct usb_function_instance *fi)return ERR_PTR (-ENOMEM ); } +kref_init (&dev->kref); ++opts->refcnt; dev->minor = opts->minor; dev->pnp_string = opts->pnp_string;
drivers/usb/gadget/function/u_ether.c +1 -1
@@ -97,7 +97,7 @@ struct eth_dev {static inline int qlen (struct usb_gadget *gadget,unsigned qmult) {if (gadget_is_dualspeed (gadget) && (gadget->speed ==USB_SPEED_HIGH || - gadget->speed ==USB_SPEED_SUPER )) + gadget->speed >=USB_SPEED_SUPER ))return qmult *DEFAULT_QLEN ;else return DEFAULT_QLEN ;
drivers/usb/host/ohci-hcd.c +10 -6
@@ -665,20 +665,24 @@ static int ohci_run (struct ohci_hcd *ohci)/* handle root hub init quirks ... */ val =roothub_a (ohci); - val &= ~(RH_A_PSM |RH_A_OCPM ); +/* Configure for per-port over-current protection by default */ + val &= ~RH_A_NOCP ; + val |=RH_A_OCPM ;if (ohci->flags &OHCI_QUIRK_SUPERIO ) { -/* NSC 87560 and maybe others */ +/* NSC 87560 and maybe others. +* Ganged power switching, no over-current protection. +*/ val |=RH_A_NOCP ; - val &= ~(RH_A_POTPGT |RH_A_NPS ); -ohci_writel (ohci, val, &ohci->regs->roothub.a); + val &= ~(RH_A_POTPGT |RH_A_NPS |RH_A_PSM |RH_A_OCPM ); }else if ((ohci->flags &OHCI_QUIRK_AMD756 ) || (ohci->flags &OHCI_QUIRK_HUB_POWER )) {/* hub power always on; required for AMD-756 and some -* Mac platforms. ganged overcurrent reporting, if any. +* Mac platforms. */ val |=RH_A_NPS ; -ohci_writel (ohci, val, &ohci->regs->roothub.a); } +ohci_writel (ohci, val, &ohci->regs->roothub.a); +ohci_writel (ohci,RH_HS_LPSC , &ohci->regs->roothub.status);ohci_writel (ohci, (val &RH_A_NPS ) ?0 :RH_B_PPCM , &ohci->regs->roothub.b);
drivers/vfio/pci/vfio_pci_intrs.c +3 -1
@@ -355,11 +355,13 @@ static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev, vdev->ctx[vector].producer.token = trigger; vdev->ctx[vector].producer.irq = irq; ret =irq_bypass_register_producer (&vdev->ctx[vector].producer); -if (unlikely (ret)) +if (unlikely (ret)) {dev_info (&pdev->dev,"irq bypass producer (token %p) registration fails: %d\n" , vdev->ctx[vector].producer.token, ret); + vdev->ctx[vector].producer.token =NULL ; + } vdev->ctx[vector].trigger = trigger;return 0 ;
drivers/video/backlight/sky81452-backlight.c +1 -0
@@ -207,6 +207,7 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt( num_entry);if (ret <0 ) {dev_err (dev,"led-sources node is invalid.\n" ); +of_node_put (np);return ERR_PTR (-EINVAL ); }
drivers/video/fbdev/sis/init.c +5 -6
@@ -2428,6 +2428,11 @@ SiS_SetCRT1FIFO_630(struct SiS_Private *SiS_Pr, unsigned short ModeNo, i =0 ; +if (SiS_Pr->ChipType ==SIS_730 ) + queuedata = &FQBQData730[0 ]; +else + queuedata = &FQBQData[0 ]; +if (ModeNo >0x13 ) {/* Get VCLK */
@@ -2445,12 +2450,6 @@ SiS_SetCRT1FIFO_630(struct SiS_Private *SiS_Pr, unsigned short ModeNo,/* Get half colordepth */ colorth = colortharray[(SiS_Pr->SiS_ModeType - ModeEGA)]; -if (SiS_Pr->ChipType ==SIS_730 ) { - queuedata = &FQBQData730[0 ]; - }else { - queuedata = &FQBQData[0 ]; - } - do { templ = SiS_CalcDelay2(SiS_Pr, queuedata[i]) * VCLK * colorth;
drivers/video/fbdev/vga16fb.c +7 -7
@@ -243,7 +243,7 @@ static void vga16fb_update_fix(struct fb_info *info) }static void vga16fb_clock_chip (struct vga16fb_par *par, -unsigned int pixclock, +unsigned int *pixclock,const struct fb_info *info,int mul,int div) {
@@ -259,14 +259,14 @@ static void vga16fb_clock_chip(struct vga16fb_par *par, { 0 /* bad */, 0x00, 0x00}};int err; - pixclock = (pixclock * mul) / div; + *pixclock = (*pixclock * mul) / div; best = vgaclocks; - err = pixclock - best->pixclock; + err = *pixclock - best->pixclock;if (err <0 ) err = -err;for (ptr = vgaclocks +1 ; ptr->pixclock; ptr++) {int tmp; - tmp = pixclock - ptr->pixclock; + tmp = *pixclock - ptr->pixclock;if (tmp <0 ) tmp = -tmp;if (tmp < err) { err = tmp;
@@ -275,7 +275,7 @@ static void vga16fb_clock_chip(struct vga16fb_par *par, } par->misc |= best->misc; par->clkdiv = best->seq_clock_mode; - pixclock = (best->pixclock * div) / mul; + *pixclock = (best->pixclock * div) / mul; }#define FAIL (X ) return -EINVAL
@@ -497,10 +497,10 @@ static int vga16fb_check_var(struct fb_var_screeninfo *var,if (mode &MODE_8BPP )/* pixel clock == vga clock / 2 */ -vga16fb_clock_chip (par, var->pixclock, info,1 ,2 ); +vga16fb_clock_chip (par, &var->pixclock, info,1 ,2 );else /* pixel clock == vga clock */ -vga16fb_clock_chip (par, var->pixclock, info,1 ,1 ); +vga16fb_clock_chip (par, &var->pixclock, info,1 ,1 ); var->red.offset = var->green.offset = var->blue.offset = var->transp.offset =0 ;
drivers/virt/fsl_hypervisor.c +8 -9
@@ -157,7 +157,7 @@ static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy __user *p)unsigned int i;long ret =0 ; -int num_pinned;/* return value from get_user_pages() */ +int num_pinned =0 ;/* return value from get_user_pages_fast() */ phys_addr_t remote_paddr;/* The next address in the remote buffer */ uint32_t count;/* The number of bytes left to copy */
@@ -174,7 +174,7 @@ static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy __user *p)return -EINVAL ;/* -* The array of pages returned by get_user_pages() covers only +* The array of pages returned by get_user_pages_fast() covers only * page-aligned memory. Since the user buffer is probably not * page-aligned, we need to handle the discrepancy. *
@@ -224,7 +224,7 @@ static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy __user *p)/* * 'pages' is an array of struct page pointers that's initialized by -* get_user_pages(). +* get_user_pages_fast(). */ pages =kzalloc (num_pages *sizeof (struct page *),GFP_KERNEL );if (!pages) {
@@ -241,7 +241,7 @@ static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy __user *p)if (!sg_list_unaligned) {pr_debug ("fsl-hv: could not allocate S/G list\n" ); ret = -ENOMEM ; - goto exit; + goto free_pages; } sg_list =PTR_ALIGN (sg_list_unaligned,sizeof (struct fh_sg_list ));
@@ -253,7 +253,6 @@ static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy __user *p)up_read (¤t->mm->mmap_sem);if (num_pinned != num_pages) { -/* get_user_pages() failed */ pr_debug ("fsl-hv: could not lock source buffer\n" ); ret = (num_pinned <0 ) ? num_pinned : -EFAULT ; goto exit;
@@ -295,13 +294,13 @@ static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy __user *p) virt_to_phys(sg_list), num_pages); exit: -if (pages) { -for (i =0 ; i < num_pages; i++) -if (pages[i]) -put_page (pages[i]); +if (pages && (num_pinned >0 )) { +for (i =0 ; i < num_pinned; i++) +put_page (pages[i]); }kfree (sg_list_unaligned); +free_pages:kfree (pages);if (!ret)
fs/cifs/asn1.c +8 -8
@@ -541,8 +541,8 @@ decode_negTokenInit(unsigned char *security_blob, int length,return 0 ; }else if ((cls !=ASN1_CTX ) || (con !=ASN1_CON ) || (tag !=ASN1_EOC )) { -cifs_dbg (FYI ,"cls = %d con = %d tag = %d end = %p (%d) exit 0\n" , - cls, con, tag, end, *end); +cifs_dbg (FYI ,"cls = %d con = %d tag = %d end = %p exit 0\n" , + cls, con, tag, end);return 0 ; }
@@ -552,8 +552,8 @@ decode_negTokenInit(unsigned char *security_blob, int length,return 0 ; }else if ((cls !=ASN1_UNI ) || (con !=ASN1_CON ) || (tag !=ASN1_SEQ )) { -cifs_dbg (FYI ,"cls = %d con = %d tag = %d end = %p (%d) exit 1\n" , - cls, con, tag, end, *end); +cifs_dbg (FYI ,"cls = %d con = %d tag = %d end = %p exit 1\n" , + cls, con, tag, end);return 0 ; }
@@ -563,8 +563,8 @@ decode_negTokenInit(unsigned char *security_blob, int length,return 0 ; }else if ((cls !=ASN1_CTX ) || (con !=ASN1_CON ) || (tag !=ASN1_EOC )) { -cifs_dbg (FYI ,"cls = %d con = %d tag = %d end = %p (%d) exit 0\n" , - cls, con, tag, end, *end); +cifs_dbg (FYI ,"cls = %d con = %d tag = %d end = %p exit 0\n" , + cls, con, tag, end);return 0 ; }
@@ -575,8 +575,8 @@ decode_negTokenInit(unsigned char *security_blob, int length,return 0 ; }else if ((cls !=ASN1_UNI ) || (con !=ASN1_CON ) || (tag !=ASN1_SEQ )) { -cifs_dbg (FYI ,"cls = %d con = %d tag = %d end = %p (%d) exit 1\n" , - cls, con, tag, end, *end); +cifs_dbg (FYI ,"cls = %d con = %d tag = %d sequence_end = %p exit 1\n" , + cls, con, tag, sequence_end);return 0 ; }
fs/dlm/config.c +3 -0
@@ -218,6 +218,7 @@ struct dlm_space {struct list_head members;struct mutex members_lock;int members_count; +struct dlm_nodes *nds; };struct dlm_comms {
@@ -426,6 +427,7 @@ static struct config_group *make_space(struct config_group *g, const char *name)INIT_LIST_HEAD (&sp->members);mutex_init (&sp->members_lock); sp->members_count =0 ; + sp->nds = nds;return &sp->group; fail:
@@ -447,6 +449,7 @@ static void drop_space(struct config_group *g, struct config_item *i)static void release_space (struct config_item *i) {struct dlm_space *sp =config_item_to_space (i); +kfree (sp->nds);kfree (sp); }
fs/ntfs/inode.c +6 -0
@@ -1844,6 +1844,12 @@ int ntfs_read_inode_mount(struct inode *vi)brelse (bh); } +if (le32_to_cpu (m->bytes_allocated) != vol->mft_record_size) { +ntfs_error (sb,"Incorrect mft record size %u in superblock, should be %u." , +le32_to_cpu (m->bytes_allocated), vol->mft_record_size); + goto err_out; + } +/* Apply the mst fixups. */ if (post_read_mst_fixup ((NTFS_RECORD *)m, vol->mft_record_size)) {/* FIXME: Try to use the $MFTMirr now. */
fs/quota/quota_v2.c +1 -0
@@ -266,6 +266,7 @@ static void v2r1_mem2diskdqb(void *dp, struct dquot *dquot) d->dqb_curspace =cpu_to_le64 (m->dqb_curspace); d->dqb_btime =cpu_to_le64 (m->dqb_btime); d->dqb_id =cpu_to_le32 (from_kqid (&init_user_ns, dquot->dq_id)); + d->dqb_pad =0 ;if (qtree_entry_unused (info, dp)) d->dqb_itime =cpu_to_le64 (1 ); }
fs/reiserfs/inode.c +2 -1
@@ -2166,7 +2166,8 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, out_inserted_sd:clear_nlink (inode); th->t_trans_id =0 ;/* so the caller can't use this handle later */ -unlock_new_inode (inode);/* OK to do even if we hadn't locked it */ +if (inode->i_state &I_NEW ) +unlock_new_inode (inode);iput (inode);return err; }
fs/reiserfs/super.c +4 -4
@@ -1234,6 +1234,10 @@ static int reiserfs_parse_options(struct super_block *s, "turned on.");return 0 ; } +if (qf_names[qtype] != +REISERFS_SB (s)->s_qf_names[qtype]) +kfree (qf_names[qtype]); + qf_names[qtype] =NULL ; if (*arg) { /* Some filename specified? */ if (REISERFS_SB(s)->s_qf_names[qtype] && strcmp(REISERFS_SB(s)->s_qf_names[qtype],
@@ -1263,10 +1267,6 @@ static int reiserfs_parse_options(struct super_block *s,else *mount_options |=1 <<REISERFS_GRPQUOTA ; }else { -if (qf_names[qtype] != -REISERFS_SB (s)->s_qf_names[qtype]) -kfree (qf_names[qtype]); - qf_names[qtype] =NULL ;if (qtype ==USRQUOTA ) *mount_options &= ~(1 <<REISERFS_USRQUOTA );else
fs/udf/inode.c +14 -11
@@ -140,21 +140,24 @@ void udf_evict_inode(struct inode *inode)struct udf_inode_info *iinfo =UDF_I (inode);int want_delete =0 ; -if (!inode->i_nlink && !is_bad_inode (inode)) { - want_delete =1 ; -udf_setsize (inode,0 ); -udf_update_inode (inode,IS_SYNC (inode)); +if (!is_bad_inode (inode)) { +if (!inode->i_nlink) { + want_delete =1 ; +udf_setsize (inode,0 ); +udf_update_inode (inode,IS_SYNC (inode)); + } +if (iinfo->i_alloc_type !=ICBTAG_FLAG_AD_IN_ICB && + inode->i_size != iinfo->i_lenExtents) { +udf_warn (inode->i_sb, +"Inode %lu (mode %o) has inode size %llu different from extent length %llu. Filesystem need not be standards compliant.\n" , + inode->i_ino, inode->i_mode, + (unsigned long long )inode->i_size, + (unsigned long long )iinfo->i_lenExtents); + } }truncate_inode_pages_final (&inode->i_data);invalidate_inode_buffers (inode);clear_inode (inode); -if (iinfo->i_alloc_type !=ICBTAG_FLAG_AD_IN_ICB && - inode->i_size != iinfo->i_lenExtents) { -udf_warn (inode->i_sb,"Inode %lu (mode %o) has inode size %llu different from extent length %llu. Filesystem need not be standards compliant.\n" , - inode->i_ino, inode->i_mode, - (unsigned long long )inode->i_size, - (unsigned long long )iinfo->i_lenExtents); - }kfree (iinfo->i_ext.i_data); iinfo->i_ext.i_data =NULL ;udf_clear_extent_cache (inode);
fs/udf/super.c +6 -0
@@ -1391,6 +1391,12 @@ static int udf_load_sparable_map(struct super_block *sb, (int)spm->numSparingTables);return -EIO ; } +if (le32_to_cpu (spm->sizeSparingTable) > sb->s_blocksize) { +udf_err (sb,"error loading logical volume descriptor: " +"Too big sparing table size (%u)\n" , +le32_to_cpu (spm->sizeSparingTable)); +return -EIO ; + }for (i =0 ; i < spm->numSparingTables; i++) { loc =le32_to_cpu (spm->locSparingTable[i]);
fs/xfs/xfs_rtalloc.c +11 -0
@@ -257,6 +257,9 @@ xfs_rtallocate_extent_block( end =XFS_BLOCKTOBIT (mp, bbno +1 ) -1 ; i <= end; i++) { +/* Make sure we don't scan off the end of the rt volume. */ + maxlen =min (mp->m_sb.sb_rextents, i + maxlen) - i; +/* * See if there's a free extent of maxlen starting at i. * If it's not so then next will contain the first non-free.
@@ -448,6 +451,14 @@ xfs_rtallocate_extent_near(*/ if (bno >= mp->m_sb.sb_rextents) bno = mp->m_sb.sb_rextents -1 ; + +/* Make sure we don't run off the end of the rt volume. */ + maxlen =min (mp->m_sb.sb_rextents, bno + maxlen) - bno; +if (maxlen < minlen) { + *rtblock =NULLRTBLOCK ; +return 0 ; + } +/* * Try the exact allocation first. */
include/linux/overflow.h +1 -0
@@ -3,6 +3,7 @@#define __LINUX_OVERFLOW_H#include <linux/compiler.h> +#include <linux/limits.h> /* * In the fallback code below, we need to compute the minimum and
include/net/ip.h +6 -0
@@ -342,12 +342,18 @@ static inline unsigned int ip_dst_mtu_maybe_forward(const struct dst_entry *dst, bool forwarding) {struct net *net =dev_net (dst->dev); +unsigned int mtu;if (net->ipv4.sysctl_ip_fwd_use_pmtu ||ip_mtu_locked (dst) || !forwarding)return dst_mtu (dst); +/* 'forwarding = true' case should always honour route mtu */ + mtu =dst_metric_raw (dst,RTAX_MTU ); +if (mtu) +return mtu; +return min (READ_ONCE (dst->dev->mtu),IP_MAX_MTU ); }
include/scsi/scsi_common.h +7 -0
@@ -24,6 +24,13 @@ scsi_command_size(const unsigned char *cmnd) scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]); } +static inline unsigned char +scsi_command_control (const unsigned char *cmnd) +{ +return (cmnd[0 ] ==VARIABLE_LENGTH_CMD ) ? + cmnd[1 ] : cmnd[COMMAND_SIZE (cmnd[0 ]) -1 ]; +} +/* Returns a human-readable name for the device */ extern const char *scsi_device_type (unsigned type);
include/trace/events/target.h +6 -6
@@ -139,6 +139,7 @@ TRACE_EVENT(target_sequencer_start, __field( unsigned int, opcode ) __field( unsigned int, data_length ) __field( unsigned int, task_attribute ) + __field( unsigned char, control ) __array( unsigned char, cdb, TCM_MAX_COMMAND_SIZE ) __string( initiator, cmd->se_sess->se_node_acl->initiatorname ) ),
@@ -148,6 +149,7 @@ TRACE_EVENT(target_sequencer_start, __entry->opcode = cmd->t_task_cdb[0 ]; __entry->data_length = cmd->data_length; __entry->task_attribute = cmd->sam_task_attr; + __entry->control =scsi_command_control (cmd->t_task_cdb);memcpy (__entry->cdb, cmd->t_task_cdb,TCM_MAX_COMMAND_SIZE );__assign_str (initiator, cmd->se_sess->se_node_acl->initiatorname); ),
@@ -157,9 +159,7 @@ TRACE_EVENT(target_sequencer_start,show_opcode_name (__entry->opcode), __entry->data_length,__print_hex (__entry->cdb,16 ),show_task_attribute_name (__entry->task_attribute), -scsi_command_size (__entry->cdb) <=16 ? - __entry->cdb[scsi_command_size (__entry->cdb) -1 ] : - __entry->cdb[1 ] + __entry->control ) );
@@ -174,6 +174,7 @@ TRACE_EVENT(target_cmd_complete, __field( unsigned int, opcode ) __field( unsigned int, data_length ) __field( unsigned int, task_attribute ) + __field( unsigned char, control ) __field( unsigned char, scsi_status ) __field( unsigned char, sense_length ) __array( unsigned char, cdb, TCM_MAX_COMMAND_SIZE )
@@ -186,6 +187,7 @@ TRACE_EVENT(target_cmd_complete, __entry->opcode = cmd->t_task_cdb[0 ]; __entry->data_length = cmd->data_length; __entry->task_attribute = cmd->sam_task_attr; + __entry->control =scsi_command_control (cmd->t_task_cdb); __entry->scsi_status = cmd->scsi_status; __entry->sense_length = cmd->scsi_status ==SAM_STAT_CHECK_CONDITION ?min (18 , ((u8 *) cmd->sense_buffer)[SPC_ADD_SENSE_LEN_OFFSET ] +8 ) :0 ;
@@ -202,9 +204,7 @@ TRACE_EVENT(target_cmd_complete,show_opcode_name (__entry->opcode), __entry->data_length,__print_hex (__entry->cdb,16 ),show_task_attribute_name (__entry->task_attribute), -scsi_command_size (__entry->cdb) <=16 ? - __entry->cdb[scsi_command_size (__entry->cdb) -1 ] : - __entry->cdb[1 ] + __entry->control ) );
kernel/debug/kdb/kdb_io.c +6 -2
@@ -683,12 +683,16 @@ int vkdb_printf(enum kdb_msgsrc src, const char *fmt, va_list ap) size_avail =sizeof (kdb_buffer) - len; goto kdb_print_out; } -if (kdb_grepping_flag >=KDB_GREPPING_FLAG_SEARCH ) +if (kdb_grepping_flag >=KDB_GREPPING_FLAG_SEARCH ) {/* * This was a interactive search (using '/' at more -* prompt) and it has completed. Clear the flag. +* prompt) and it has completed. Replace the \0 with +* its original value to ensure multi-line strings +* are handled properly, and return to normal mode. */ + *cphold = replaced_byte; kdb_grepping_flag =0 ; + }/* * at this point the string is a full line and * should be printed, up to the null.
kernel/power/hibernate.c +0 -11
@@ -834,17 +834,6 @@ static int software_resume(void)/* Check if the device is there */ swsusp_resume_device =name_to_dev_t (resume_file); - -/* -* name_to_dev_t is ineffective to verify parition if resume_file is in -* integer format. (e.g. major:minor) -*/ -if (isdigit (resume_file[0 ]) && resume_wait) { -int partno; -while (!get_gendisk (swsusp_resume_device, &partno)) -msleep (10 ); - } -if (!swsusp_resume_device) {/* * Some device discovery might still be in progress; we need
lib/crc32.c +1 -1
@@ -327,7 +327,7 @@ static inline u32 __pure crc32_be_generic(u32 crc, unsigned char const *p,return crc; } -#if CRC_LE_BITS ==1 +#if CRC_BE_BITS ==1 u32 __pure crc32_be (u32 crc,unsigned char const *p,size_t len) {return crc32_be_generic (crc, p, len,NULL ,CRCPOLY_BE );
net/bluetooth/l2cap_sock.c +4 -3
@@ -1340,8 +1340,6 @@ static void l2cap_sock_teardown_cb(struct l2cap_chan *chan, int err) parent =bt_sk (sk)->parent; -sock_set_flag (sk,SOCK_ZAPPED ); -switch (chan->state) {case BT_OPEN :case BT_BOUND :
@@ -1368,8 +1366,11 @@ static void l2cap_sock_teardown_cb(struct l2cap_chan *chan, int err)break ; } -release_sock (sk); + +/* Only zap after cleanup to avoid use after free race */ +sock_set_flag (sk,SOCK_ZAPPED ); + } static void l2cap_sock_state_change_cb(struct l2cap_chan *chan, int state,
net/ipv4/icmp.c +5 -2
@@ -246,7 +246,7 @@ static struct {/** * icmp_global_allow - Are we allowed to send one more ICMP message ? * -* Uses a token bucket to limit our ICMP messages to sysctl_icmp_msgs_per_sec. +* Uses a token bucket to limit our ICMP messages to ~sysctl_icmp_msgs_per_sec. * Returns false if we reached the limit and can not send another packet. * Note: called with BH disabled */
@@ -274,7 +274,10 @@ bool icmp_global_allow(void) } credit =min_t (u32, icmp_global.credit + incr, sysctl_icmp_msgs_burst);if (credit) { - credit--; +/* We want to use a credit of one in average, but need to randomize +* it for security reasons. +*/ + credit =max_t (int, credit -prandom_u32_max (3 ),0 ); rc = true; }WRITE_ONCE (icmp_global.credit, credit);
net/ipv4/tcp_input.c +2 -0
@@ -5598,6 +5598,8 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb,tcp_data_snd_check (sk);if (!inet_csk_ack_scheduled (sk)) goto no_ack; + }else { +tcp_update_wl (tp,TCP_SKB_CB (skb)->seq); }__tcp_ack_snd_check (sk,0 );
net/netfilter/ipvs/ip_vs_ctl.c +4 -3
@@ -2424,6 +2424,10 @@ do_ip_vs_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len)/* Set timeout values for (tcp tcpfin udp) */ ret =ip_vs_set_timeout (ipvs, (struct ip_vs_timeout_user *)arg); goto out_unlock; + }else if (!len) { +/* No more commands with len == 0 below */ + ret = -EINVAL ; + goto out_unlock; } usvc_compat = (struct ip_vs_service_user *)arg;
@@ -2500,9 +2504,6 @@ do_ip_vs_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len)break ;case IP_VS_SO_SET_DELDEST : ret =ip_vs_del_dest (svc, &udest); -break ; -default : - ret = -EINVAL ; } out_unlock:
net/nfc/netlink.c +1 -1
@@ -1227,7 +1227,7 @@ static int nfc_genl_fw_download(struct sk_buff *skb, struct genl_info *info)u32 idx;char firmware_name[NFC_FIRMWARE_NAME_MAXSIZE +1 ]; -if (!info->attrs[NFC_ATTR_DEVICE_INDEX ]) +if (!info->attrs[NFC_ATTR_DEVICE_INDEX ] || !info->attrs[NFC_ATTR_FIRMWARE_NAME ])return -EINVAL ; idx =nla_get_u32 (info->attrs[NFC_ATTR_DEVICE_INDEX ]);
net/tipc/msg.c +2 -1
@@ -140,7 +140,8 @@ int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf)if (fragid ==FIRST_FRAGMENT ) {if (unlikely (head)) goto err; - frag =skb_unshare (frag,GFP_ATOMIC ); +if (skb_cloned (frag)) + frag =skb_copy (frag,GFP_ATOMIC );if (unlikely (!frag)) goto err; head = *headbuf = frag;
net/wireless/nl80211.c +4 -1
@@ -1749,7 +1749,10 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,* case we'll continue with more data in the next round, * but break unconditionally so unsplit data stops here. */ - state->split_start++; +if (state->split) + state->split_start++; +else + state->split_start =0 ;break ;case 9 : if (rdev->wiphy.extended_capabilities &&
samples/mic/mpssd/mpssd.c +2 -2
@@ -414,9 +414,9 @@ mic_virtio_copy(struct mic_info *mic, int fd,static inline unsigned _vring_size (unsigned int num,unsigned long align) { -return ((sizeof (struct vring_desc ) * num +sizeof (__u16) * (3 + num) +return _ALIGN_UP (((sizeof (struct vring_desc ) * num +sizeof (__u16) * (3 + num) + align -1 ) & ~(align -1 )) - +sizeof (__u16) *3 +sizeof (struct vring_used_elem ) * num; + +sizeof (__u16) *3 +sizeof (struct vring_used_elem ) * num,4 ); }/*
security/integrity/ima/ima_crypto.c +2 -0
@@ -683,6 +683,8 @@ static int __init ima_calc_boot_aggregate_tfm(char *digest,ima_pcrread (i, pcr_i);/* now accumulate with current aggregate */ rc =crypto_shash_update (shash, pcr_i,TPM_DIGEST_SIZE ); +if (rc !=0 ) +return rc; }if (!rc)crypto_shash_final (shash, digest);
sound/core/seq/oss/seq_oss.c +5 -2
@@ -187,9 +187,12 @@ odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)if (snd_BUG_ON (!dp))return -ENXIO ; -mutex_lock (®ister_mutex); +if (cmd !=SNDCTL_SEQ_SYNC && +mutex_lock_interruptible (®ister_mutex)) +return -ERESTARTSYS ; rc =snd_seq_oss_ioctl (dp, cmd, arg); -mutex_unlock (®ister_mutex); +if (cmd !=SNDCTL_SEQ_SYNC ) +mutex_unlock (®ister_mutex);return rc; }
sound/firewire/bebob/bebob_hwdep.c +1 -2
@@ -37,12 +37,11 @@ hwdep_read(struct snd_hwdep *hwdep, char __user *buf, long count, }memset (&event,0 ,sizeof (event)); + count =min_t (long, count,sizeof (event.lock_status));if (bebob->dev_lock_changed) { event.lock_status.type =SNDRV_FIREWIRE_EVENT_LOCK_STATUS ; event.lock_status.status = (bebob->dev_lock_count >0 ); bebob->dev_lock_changed = false; - - count =min_t (long, count,sizeof (event.lock_status)); }spin_unlock_irq (&bebob->lock);
sound/soc/qcom/lpass-platform.c +2 -1
@@ -68,7 +68,7 @@ static int lpass_platform_pcmops_open(struct snd_pcm_substream *substream)int ret, dma_ch, dir = substream->stream;
Lines of this file are not shown. View the 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.