Linux 5.10.183
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.183 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.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/devicetree/bindings/sound/tas2562.yaml | 6 Documentation/devicetree/bindings/sound/tas2764.yaml | 6 Documentation/devicetree/bindings/sound/tas2770.yaml | 6 Makefile | 6 arch/arm/boot/dts/stm32f7-pinctrl.dtsi | 82 ++++ arch/arm/configs/multi_v7_defconfig | 1 arch/arm/kernel/unwind.c | 25 + arch/arm64/mm/fault.c | 4 arch/x86/boot/boot.h | 36 + arch/x86/boot/main.c | 2 arch/x86/kvm/x86.c | 3 crypto/asymmetric_keys/public_key.c | 38 +- drivers/acpi/thermal.c | 2 drivers/ata/libata-scsi.c | 34 + drivers/base/regmap/regmap.c | 6 drivers/block/nbd.c | 4 drivers/block/rnbd/rnbd-proto.h | 2 drivers/char/tpm/tpm_tis_core.c | 7 drivers/crypto/ccp/sev-dev.c | 35 + drivers/crypto/ccp/sev-dev.h | 2 drivers/dma/at_xdmac.c | 50 +- drivers/dma/pl330.c | 8 drivers/gpu/drm/msm/msm_iommu.c | 7 drivers/gpu/drm/rcar-du/Kconfig | 25 - drivers/hid/hid-google-hammer.c | 2 drivers/hid/hid-ids.h | 1 drivers/hid/wacom_wac.c | 2 drivers/iio/adc/ad7192.c | 8 drivers/iio/adc/mxs-lradc-adc.c | 10 drivers/iio/dac/Makefile | 2 drivers/iio/dac/mcp4725.c | 16 drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c | 10 drivers/iio/light/vcnl4035.c | 3 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 45 -- drivers/infiniband/hw/bnxt_re/qplib_fp.c | 11 drivers/infiniband/hw/bnxt_re/qplib_res.c | 12 drivers/infiniband/hw/bnxt_re/qplib_sp.c | 22 - drivers/infiniband/hw/bnxt_re/qplib_sp.h | 2 drivers/infiniband/hw/efa/efa_verbs.c | 2 drivers/iommu/amd/iommu.c | 3 drivers/iommu/rockchip-iommu.c | 14 drivers/mailbox/mailbox-test.c | 13 drivers/media/dvb-core/dvb_ca_en50221.c | 49 ++ drivers/media/dvb-core/dvb_demux.c | 4 drivers/media/dvb-core/dvb_frontend.c | 16 drivers/media/dvb-core/dvb_net.c | 38 +- drivers/media/dvb-frontends/mn88443x.c | 2 drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 17 drivers/media/platform/rcar-vin/rcar-dma.c | 4 drivers/media/platform/ti-vpe/cal.h | 2 drivers/media/usb/dvb-usb-v2/ce6230.c | 8 drivers/media/usb/dvb-usb-v2/ec168.c | 12 drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 20 + drivers/media/usb/dvb-usb/az6027.c | 12 drivers/media/usb/dvb-usb/digitv.c | 4 drivers/media/usb/dvb-usb/dw2102.c | 2 drivers/media/usb/ttusb-dec/ttusb_dec.c | 3 drivers/misc/fastrpc.c | 7 drivers/mmc/host/vub300.c | 3 drivers/mtd/nand/raw/ingenic/ingenic_ecc.h | 8 drivers/mtd/nand/raw/marvell_nand.c | 10 drivers/net/dsa/mv88e6xxx/chip.c | 2 drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 12 drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 2 drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 drivers/net/ethernet/sun/cassini.c | 4 drivers/net/usb/qmi_wwan.c | 2 drivers/net/wireless/ath/ath6kl/htc.h | 19 - drivers/net/wireless/ath/ath6kl/htc_mbox.c | 15 drivers/net/wireless/broadcom/b43/b43.h | 2 drivers/net/wireless/broadcom/b43legacy/b43legacy.h | 2 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 drivers/s390/crypto/pkey_api.c | 3 drivers/scsi/Kconfig | 2 drivers/scsi/dpt_i2o.c | 278 --------------- drivers/scsi/dpti.h | 1 drivers/scsi/scsi_lib.c | 2 drivers/scsi/stex.c | 4 drivers/tty/serial/8250/8250_tegra.c | 4 drivers/tty/serial/fsl_lpuart.c | 44 +- drivers/usb/gadget/function/f_fs.c | 2 drivers/video/fbdev/core/bitblit.c | 3 drivers/video/fbdev/core/modedb.c | 5 drivers/video/fbdev/stifb.c | 1 drivers/watchdog/menz69_wdt.c | 16 fs/btrfs/ctree.c | 2 fs/btrfs/disk-io.c | 2 fs/ext4/ext4.h | 5 fs/ext4/inode.c | 34 + fs/ext4/super.c | 24 - fs/ext4/xattr.c | 41 -- fs/gfs2/super.c | 8 include/media/dvb_net.h | 4 include/net/sock.h | 4 kernel/trace/trace_probe.h | 2 lib/test_firmware.c | 19 - net/atm/resources.c | 2 net/core/sock.c | 2 net/ipv4/af_inet.c | 2 net/ipv4/inet_connection_sock.c | 1 net/ipv4/tcp.c | 9 net/netfilter/nf_conntrack_netlink.c | 4 net/netlink/af_netlink.c | 2 net/netrom/nr_subr.c | 7 net/packet/af_packet.c | 8 net/packet/diag.c | 2 net/sched/cls_flower.c | 3 net/sched/sch_api.c | 16 net/sched/sch_ingress.c | 16 net/xfrm/xfrm_policy.c | 11 security/selinux/Makefile | 6 sound/core/oss/pcm_plugin.h | 16 sound/pci/hda/hda_intel.c | 21 + sound/pci/hda/patch_hdmi.c | 22 + sound/soc/codecs/ssm2602.c | 15 sound/soc/dwc/dwc-i2s.c | 4 tools/testing/selftests/net/mptcp/Makefile | 2 tools/testing/selftests/net/mptcp/diag.sh | 4 tools/testing/selftests/net/mptcp/mptcp_connect.sh | 4 tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 tools/testing/selftests/net/mptcp/mptcp_lib.sh | 40 ++ tools/testing/selftests/net/mptcp/pm_netlink.sh | 4 tools/testing/selftests/net/mptcp/simult_flows.sh | 4 124 files changed, 950 insertions(+), 654 deletions(-)
Adam Borowski (1):
ACPI: thermal: drop an always true check
Andreas Svensson (1):
net: dsa: mv88e6xxx: Increase wait after reset deactivation
Arnd Bergmann (7):
mtd: rawnand: ingenic: fix empty stub helper definitions
wifi: b43: fix incorrect __packed annotation
ALSA: oss: avoid missing-prototype warnings
atm: hide unused procfs functions
media: ti-vpe: cal: avoid FIELD_GET assertion drm/rcar: stop using 'imply' for dependencies
ARM: defconfig: drop CONFIG_DRM_RCAR_LVDS
Bart Van Assche (1):
scsi: stex: Fix gcc 13 warnings
Ben Hutchings (2):
scsi: dpt_i2o: Remove broken pass-through ioctl (I2OUSERCMD)
scsi: dpt_i2o: Do not process completions with invalid addresses
Benedict Wong (1):
xfrm: Check if_id in inbound policy/secpath match
Bob Peterson (1):
gfs2: Don't deref jdesc in evict
Cambda Zhu (1):
tcp: Return user_mss for TCP_MAXSEG in CLOSE/LISTEN state if user_mss set
Chao Wang (1):
iommu/rockchip: Fix unwind goto issue
Chris Packham (2):
mtd: rawnand: marvell: ensure timing values are written
mtd: rawnand: marvell: don't set the NAND frequency select
Christophe JAILLET (1):
serial: 8250_tegra: Fix an error handling path in tegra_uart_probe()
Damien Le Moal (1):
ata: libata-scsi: Use correct device no in ata_find_dev()
Dan Carpenter (2):
dmaengine: at_xdmac: fix potential Oops in at_xdmac_prep_interleaved()
mailbox: mailbox-test: fix a locking issue in mbox_test_message_write()
Dario Binacchi (1):
ARM: dts: stm32: add pin map for CAN controller on stm32f7
Deren Wu (1):
mmc: vub300: fix invalid response handling
Eric Dumazet (3):
netrom: fix info-leak in nr_write_internal()
af_packet: do not use READ_ONCE() in packet_bind()
tcp: deny tcp_disconnect() when threads are waiting
Filipe Manana (1):
btrfs: abort transaction when sibling keys check fails for leaves
Frank Li (1):
iio: light: vcnl4035: fixed chip ID check
Greg Kroah-Hartman (1):
Linux 5.10.183
Guoqing Jiang (1):
block/rnbd: replace REQ_OP_FLUSH with REQ_OP_WRITE
Haibo Li (1):
ARM: 9295/1: unwind:fix unwind abort for uleb128 case
Hangyu Hua (1):
net/sched: flower: fix possible OOB write in fl_set_geneve_opt()
Helge Deller (3):
fbdev: modedb: Add 1920x1080 at 60 Hz video mode
fbdev: stifb: Fix info entry in sti_struct on error path
fbcon: Fix null-ptr-deref in soft_cursor
Holger Dengler (1):
s390/pkey: zeroize key blobs
Hyunwoo Kim (3):
media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb()
media: dvb-core: Fix use-after-free due on race condition at dvb_net
media: dvb-core: Fix use-after-free due to race condition at dvb_ca_en50221
Ivan Orlov (1):
nbd: Fix debugfs_create_dir error checking
Jean-Baptiste Maneyrol (1):
iio: imu: inv_icm42600: fix timestamp reset
Jiakai Luo (1):
iio: adc: mxs-lradc: fix the order of two cleanup operations
Jim Wylder (1):
regmap: Account for register length when chunking
Joao Martins (1):
iommu/amd: Don't block updates to GATag if guest mode is on
Johannes Thumshirn (1):
watchdog: menz069_wdt: fix watchdog initialisation
Kalesh AP (2):
RDMA/bnxt_re: Fix a possible memory leak RDMA/bnxt_re: Fix return value of bnxt_re_process_raw_qp_pkt_rx
Kees Cook (2):
x86/boot: Wrap literal addresses in absolute_pointer()
ath6kl: Use struct_group() to avoid size-mismatched casting
Krzysztof Kozlowski (1):
media: mn88443x: fix !CONFIG_OF error by drop of_match_ptr from ID table
Kuniyuki Iwashima (1):
af_packet: Fix data-races of pkt_sk(sk)->num.
Lee Jones (1):
mailbox: mailbox-test: Fix potential double-free in mbox_test_message_write()
Lino Sanfilippo (1):
tpm, tpm_tis: Request threaded interrupt handler
Linus Torvalds (1):
gcc-12: disable '-Wdangling-pointer' warning for now
Lukas Bulwahn (1):
iio: dac: build ad5758 driver when AD5758 is selected
Marek Vasut (1):
iio: dac: mcp4725: Fix i2c_master_send() return value handling
Martin Liška (1):
eth: sun: cassini: remove dead code
Martin Povišer (1):
ASoC: dt-bindings: Adjust #sound-dai-cells on TI's single-DAI codecs
Matthieu Baerts (5):
selftests: mptcp: connect: skip if MPTCP is not supported
selftests: mptcp: pm nl: skip if MPTCP is not supported
selftests: mptcp: diag: skip if MPTCP is not supported
selftests: mptcp: simult flows: skip if MPTCP is not supported
selftests: mptcp: join: skip if MPTCP is not supported
Maxim Kochetkov (1):
ASoC: dwc: limit the number of overrun messages
Min-Hua Chen (1):
arm64/mm: mark private VM_FAULT_X defines as vm_fault_t
Mirsad Goran Todorovac (1):
test_firmware: fix the memory leak of the allocated firmware buffer
Moshe Shemesh (1):
net/mlx5: Read embedded cpu after init bit cleared
Nikita Zhandarovich (1):
HID: wacom: avoid integer overflow in wacom_intuos_inout()
Niklas Söderlund (1):
media: rcar-vin: Select correct interrupt mode for V4L2_FIELD_ALTERNATE
Paul Cercueil (1):
iio: adc: ad7192: Change "shorted" channels to differential
Paul Moore (1):
selinux: don't use make's grouped targets feature yet
Paweł Anikiel (1):
ASoC: ssm2602: Add workaround for playback distortions
Pedro Tammela (1):
net/netlink: fix NETLINK_LIST_MEMBERSHIPS length report
Peilin Ye (4):
net/sched: sch_ingress: Only create under TC_H_INGRESS net/sched: sch_clsact: Only create under TC_H_CLSACT net/sched: Reserve TC_H_INGRESS (TC_H_CLSACT) for ingress (clsact) Qdiscs net/sched: Prohibit regrafting ingress or clsact Qdiscs
Pietro Borrello (1):
tracing/probe: trace_probe_primary_from_call(): checked list_first_entry
Raju Rangoju (1):
amd-xgbe: fix the false linkup in xgbe_phy_status
Randy Dunlap (1):
dmaengine: pl330: rename _start to prevent build error
Richard Acayan (2):
misc: fastrpc: return -EPIPE to invocations on device removal
misc: fastrpc: reject new invocations during device removal
Rob Clark (1):
drm/msm: Be more shouty if per-process pgtables aren't working
Roberto Sassu (1):
KEYS: asymmetric: Copy sig and digest in public_key_verify_signature()
Sean Christopherson (3):
KVM: x86: Account fastpath-only VM-Exits in vCPU stats
crypto: ccp: Reject SEV commands with mismatching command buffer
crypto: ccp: Play nice with vmalloc'd memory for SEV command structs
Sebastian Krzyszkowiak (1):
net: usb: qmi_wwan: Set DTR quirk for BroadMobi BM818
Selvin Xavier (2):
RDMA/bnxt_re: Code refactor while populating user MRs RDMA/bnxt_re: Fix the page_size used during the MR creation
Shay Drory (1):
net/mlx5: fw_tracer, Fix event handling
Sherry Sun (1):
tty: serial: fsl_lpuart: use UARTCTRL_TXINV to send break instead of UARTCTRL_SBK
Sung-Chi Li (1):
HID: google: add jewel USB id
Takashi Iwai (1):
media: dvb-core: Fix kernel WARNING for blocking operation in wait_event*()
Theodore Ts'o (5):
ext4: add EA_INODE checking to ext4_iget()
ext4: set lockdep subclass for the ea_inode in ext4_xattr_inode_cache_find()
ext4: disallow ea_inodes with extended attributes
ext4: add lockdep annotations for i_data_sem for ea_inode's
ext4: enable the lazy init thread when remounting read/write
Tom Rix (1):
netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT
Tudor Ambarus (3):
dmaengine: at_xdmac: Fix concurrency over chan's completed_cookie
dmaengine: at_xdmac: Fix race for the tx desc callback
dmaengine: at_xdmac: Move the free desc to the tail of the desc list
Uttkarsh Aggarwal (1):
usb: gadget: f_fs: Add unbind event before functionfs_unbind
Vladislav Efanov (1):
udp6: Fix race condition in udp6_sendmsg & connect
Wei Chen (6):
media: dvb-usb: az6027: fix three null-ptr-deref in az6027_i2c_xfer()
media: dvb-usb-v2: ec168: fix null-ptr-deref in ec168_i2c_xfer()
media: dvb-usb-v2: ce6230: fix null-ptr-deref in ce6230_i2c_master_xfer()
media: dvb-usb: digitv: fix null-ptr-deref in digitv_i2c_xfer()
media: dvb-usb: dw2102: fix uninit-value in su3000_read_mac_address
media: netup_unidvb: fix irq init by register it at the end of probe
Wenchao Hao (1):
scsi: core: Decrease scsi_device's iorequest_cnt if dispatch failed
Yonatan Nachum (1):
RDMA/efa: Fix unsupported page sizes in device
YongSu Yoo (2):
media: dvb_demux: fix a bug for the continuity counter
media: dvb_ca_en50221: fix a size write bug
Yun Lu (1):
wifi: rtl8xxxu: fix authentication timeout due to incorrect RCR value
Zhang Shurong (1):
media: dvb-usb-v2: rtl28xxu: fix null-ptr-deref in rtl28xxu_i2c_xfer
Zhengchao Shao (1):
net: sched: fix NULL pointer dereference in mq_attach
jasontao (1):
ALSA: hda: Glenfly: add HD Audio PCI IDs and HDMI Codec Vendor IDs.
pengfuyuan (1):
btrfs: fix csum_tree_block page iteration to avoid tripping on -Werror=array-bounds
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/sound/tas2562.yaml +4 -2
@@ -50,7 +50,9 @@ properties: description: TDM TX current sense time slot. '#sound-dai-cells': - const: 1 + # The codec has a single DAI, the #sound-dai-cells=<1>; case is left in for backward + # compatibility but is deprecated. + enum: [0, 1] required: - compatible
@@ -67,7 +69,7 @@ examples: codec: codec@4c { compatible = "ti,tas2562"; reg = <0x4c>; - #sound-dai-cells = <1>; + #sound-dai-cells = <0>; interrupt-parent = <&gpio1>; interrupts = <14>; shutdown-gpios = <&gpio1 15 0>;
Documentation/devicetree/bindings/sound/tas2764.yaml +4 -2
@@ -46,7 +46,9 @@ properties: description: TDM TX voltage sense time slot. '#sound-dai-cells': - const: 1 + # The codec has a single DAI, the #sound-dai-cells=<1>; case is left in for backward + # compatibility but is deprecated. + enum: [0, 1] required: - compatible
@@ -63,7 +65,7 @@ examples: codec: codec@38 { compatible = "ti,tas2764"; reg = <0x38>; - #sound-dai-cells = <1>; + #sound-dai-cells = <0>; interrupt-parent = <&gpio1>; interrupts = <14>; reset-gpios = <&gpio1 15 0>;
Documentation/devicetree/bindings/sound/tas2770.yaml +4 -2
@@ -52,7 +52,9 @@ properties: - 1 # Falling edge '#sound-dai-cells': - const: 1 + # The codec has a single DAI, the #sound-dai-cells=<1>; case is left in for backward + # compatibility but is deprecated. + enum: [0, 1] required: - compatible
@@ -69,7 +71,7 @@ examples: codec: codec@41 { compatible = "ti,tas2770"; reg = <0x41>; - #sound-dai-cells = <1>; + #sound-dai-cells = <0>; interrupt-parent = <&gpio1>; interrupts = <14>; reset-gpio = <&gpio1 15 0>;
Makefile +5 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 182 +SUBLEVEL = 183 EXTRAVERSION = NAME = Dare mighty things
@@ -808,6 +808,10 @@ endif KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) + +# These result in bogus false positives +KBUILD_CFLAGS += $(call cc-disable-warning, dangling-pointer) + ifdef CONFIG_FRAME_POINTER KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls else
arch/arm/boot/dts/stm32f7-pinctrl.dtsi +82 -0
88 lines not on this page · raw message
arch/arm/configs/multi_v7_defconfig +0 -1
@@ -672,7 +672,6 @@ CONFIG_DRM_IMX_LDB=m CONFIG_DRM_IMX_HDMI=m CONFIG_DRM_ATMEL_HLCDC=m CONFIG_DRM_RCAR_DU=m -CONFIG_DRM_RCAR_LVDS=y CONFIG_DRM_SUN4I=m CONFIG_DRM_MSM=m CONFIG_DRM_FSL_DCU=m
arch/arm/kernel/unwind.c +24 -1
@@ -300,6 +300,29 @@ static int unwind_exec_pop_subset_r0_to_r3(struct unwind_ctrl_block *ctrl,return URC_OK ; } +static unsigned long unwind_decode_uleb128 (struct unwind_ctrl_block *ctrl) +{ +unsigned long bytes =0 ; +unsigned long insn; +unsigned long result =0 ; + +/* +* unwind_get_byte() will advance `ctrl` one instruction at a time, so +* loop until we get an instruction byte where bit 7 is not set. +* +* Note: This decodes a maximum of 4 bytes to output 28 bits data where +* max is 0xfffffff: that will cover a vsp increment of 1073742336, hence +* it is sufficient for unwinding the stack. +*/ +do { + insn =unwind_get_byte (ctrl); + result |= (insn &0x7f ) << (bytes *7 ); + bytes++; + }while (!!(insn &0x80 ) && (bytes !=sizeof (result))); + +return result; +} +/* * Execute the current unwind instruction. */
@@ -353,7 +376,7 @@ static int unwind_exec_insn(struct unwind_ctrl_block *ctrl)if (ret) goto error; }else if (insn ==0xb2 ) { -unsigned long uleb128 =unwind_get_byte (ctrl); +unsigned long uleb128 =unwind_decode_uleb128 (ctrl); ctrl->vrs[SP ] +=0x204 + (uleb128 <<2 ); }else {
arch/arm64/mm/fault.c +2 -2
@@ -402,8 +402,8 @@ static void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *re } } -#define VM_FAULT_BADMAP 0x010000 -#define VM_FAULT_BADACCESS 0x020000 +#define VM_FAULT_BADMAP ((__force vm_fault_t)0x010000) +#define VM_FAULT_BADACCESS ((__force vm_fault_t)0x020000) static vm_fault_t __do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int mm_flags, unsigned long vm_flags,
arch/x86/boot/boot.h +24 -12
@@ -110,66 +110,78 @@ typedef unsigned int addr_t;static inline u8 rdfs8 (addr_t addr) { +u8 *ptr = (u8 *)absolute_pointer (addr);u8 v; - asmvolatile ("movb %%fs:%1,%0" :"=q" (v) :"m" (*(u8 *)addr)); + asmvolatile ("movb %%fs:%1,%0" :"=q" (v) :"m" (*ptr));return v; }static inline u16 rdfs16 (addr_t addr) { +u16 *ptr = (u16 *)absolute_pointer (addr);u16 v; - asmvolatile ("movw %%fs:%1,%0" :"=r" (v) :"m" (*(u16 *)addr)); + asmvolatile ("movw %%fs:%1,%0" :"=r" (v) :"m" (*ptr));return v; }static inline u32 rdfs32 (addr_t addr) { +u32 *ptr = (u32 *)absolute_pointer (addr);u32 v; - asmvolatile ("movl %%fs:%1,%0" :"=r" (v) :"m" (*(u32 *)addr)); + asmvolatile ("movl %%fs:%1,%0" :"=r" (v) :"m" (*ptr));return v; }static inline void wrfs8 (u8 v,addr_t addr) { - asmvolatile ("movb %1,%%fs:%0" :"+m" (*(u8 *)addr) :"qi" (v)); +u8 *ptr = (u8 *)absolute_pointer (addr); + asmvolatile ("movb %1,%%fs:%0" :"+m" (*ptr) :"qi" (v)); }static inline void wrfs16 (u16 v,addr_t addr) { - asmvolatile ("movw %1,%%fs:%0" :"+m" (*(u16 *)addr) :"ri" (v)); +u16 *ptr = (u16 *)absolute_pointer (addr); + asmvolatile ("movw %1,%%fs:%0" :"+m" (*ptr) :"ri" (v)); }static inline void wrfs32 (u32 v,addr_t addr) { - asmvolatile ("movl %1,%%fs:%0" :"+m" (*(u32 *)addr) :"ri" (v)); +u32 *ptr = (u32 *)absolute_pointer (addr); + asmvolatile ("movl %1,%%fs:%0" :"+m" (*ptr) :"ri" (v)); }static inline u8 rdgs8 (addr_t addr) { +u8 *ptr = (u8 *)absolute_pointer (addr);u8 v; - asmvolatile ("movb %%gs:%1,%0" :"=q" (v) :"m" (*(u8 *)addr)); + asmvolatile ("movb %%gs:%1,%0" :"=q" (v) :"m" (*ptr));return v; }static inline u16 rdgs16 (addr_t addr) { +u16 *ptr = (u16 *)absolute_pointer (addr);u16 v; - asmvolatile ("movw %%gs:%1,%0" :"=r" (v) :"m" (*(u16 *)addr)); + asmvolatile ("movw %%gs:%1,%0" :"=r" (v) :"m" (*ptr));return v; }static inline u32 rdgs32 (addr_t addr) { +u32 *ptr = (u32 *)absolute_pointer (addr);u32 v; - asmvolatile ("movl %%gs:%1,%0" :"=r" (v) :"m" (*(u32 *)addr)); + asmvolatile ("movl %%gs:%1,%0" :"=r" (v) :"m" (*ptr));return v; }static inline void wrgs8 (u8 v,addr_t addr) { - asmvolatile ("movb %1,%%gs:%0" :"+m" (*(u8 *)addr) :"qi" (v)); +u8 *ptr = (u8 *)absolute_pointer (addr); + asmvolatile ("movb %1,%%gs:%0" :"+m" (*ptr) :"qi" (v)); }static inline void wrgs16 (u16 v,addr_t addr) { - asmvolatile ("movw %1,%%gs:%0" :"+m" (*(u16 *)addr) :"ri" (v)); +u16 *ptr = (u16 *)absolute_pointer (addr); + asmvolatile ("movw %1,%%gs:%0" :"+m" (*ptr) :"ri" (v)); }static inline void wrgs32 (u32 v,addr_t addr) { - asmvolatile ("movl %1,%%gs:%0" :"+m" (*(u32 *)addr) :"ri" (v)); +u32 *ptr = (u32 *)absolute_pointer (addr); + asmvolatile ("movl %1,%%gs:%0" :"+m" (*ptr) :"ri" (v)); }/* Note: these only return true/false, not a signed return value! */
arch/x86/boot/main.c +1 -1
@@ -33,7 +33,7 @@ static void copy_boot_params(void)u16 cl_offset; };const struct old_cmdline *const oldcmd = - (const struct old_cmdline *)OLD_CL_ADDRESS ; +absolute_pointer (OLD_CL_ADDRESS );BUILD_BUG_ON (sizeof (boot_params) !=4096 );memcpy (&boot_params.hdr, &hdr,sizeof (hdr));
arch/x86/kvm/x86.c +3 -0
@@ -1588,6 +1588,9 @@ bool kvm_msr_allowed(struct kvm_vcpu *vcpu, u32 index, u32 type) allowed = !!test_bit (index - start, bitmap);break ; } + +/* Note, VM-Exits that go down the "slow" path are accounted below. */ + ++vcpu->stat.exits; } out:
crypto/asymmetric_keys/public_key.c +21 -17
@@ -316,9 +316,10 @@ int public_key_verify_signature(const struct public_key *pkey,struct crypto_wait cwait;struct crypto_akcipher *tfm;struct akcipher_request *req; -struct scatterlist src_sg[2 ]; +struct scatterlist src_sg;char alg_name[CRYPTO_MAX_ALG_NAME ]; -char *key, *ptr; +char *buf, *ptr; +size_t buf_len;int ret;pr_devel ("==>%s()\n" , __func__);
@@ -342,34 +343,37 @@ int public_key_verify_signature(const struct public_key *pkey,if (!req) goto error_free_tfm; - key =kmalloc (pkey->keylen +sizeof (u32) *2 + pkey->paramlen, -GFP_KERNEL ); -if (!key) + buf_len =max_t (size_t, pkey->keylen +sizeof (u32) *2 + pkey->paramlen, + sig->s_size + sig->digest_size); + + buf =kmalloc (buf_len,GFP_KERNEL ); +if (!buf) goto error_free_req; -memcpy (key, pkey->key, pkey->keylen); - ptr = key + pkey->keylen; +memcpy (buf, pkey->key, pkey->keylen); + ptr = buf + pkey->keylen; ptr =pkey_pack_u32 (ptr, pkey->algo); ptr =pkey_pack_u32 (ptr, pkey->paramlen);memcpy (ptr, pkey->params, pkey->paramlen);if (pkey->key_is_private) - ret =crypto_akcipher_set_priv_key (tfm, key, pkey->keylen); + ret =crypto_akcipher_set_priv_key (tfm, buf, pkey->keylen);else - ret =crypto_akcipher_set_pub_key (tfm, key, pkey->keylen); + ret =crypto_akcipher_set_pub_key (tfm, buf, pkey->keylen);if (ret) - goto error_free_key; + goto error_free_buf;if (strcmp (pkey->pkey_algo,"sm2" ) ==0 && sig->data_size) { ret =cert_sig_digest_update (sig, tfm);if (ret) - goto error_free_key; + goto error_free_buf; } -sg_init_table (src_sg,2 ); -sg_set_buf (&src_sg[0 ], sig->s, sig->s_size); -sg_set_buf (&src_sg[1 ], sig->digest, sig->digest_size); -akcipher_request_set_crypt (req, src_sg,NULL , sig->s_size, +memcpy (buf, sig->s, sig->s_size); +memcpy (buf + sig->s_size, sig->digest, sig->digest_size); + +sg_init_one (&src_sg, buf, sig->s_size + sig->digest_size); +akcipher_request_set_crypt (req, &src_sg,NULL , sig->s_size, sig->digest_size);crypto_init_wait (&cwait); akcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG |
@@ -377,8 +381,8 @@ int public_key_verify_signature(const struct public_key *pkey, crypto_req_done, &cwait); ret =crypto_wait_req (crypto_akcipher_verify (req), &cwait); -error_free_key: -kfree (key); +error_free_buf: +kfree (buf); error_free_req:akcipher_request_free (req); error_free_tfm:
drivers/acpi/thermal.c +0 -2
@@ -1120,8 +1120,6 @@ static int acpi_thermal_resume(struct device *dev)return -EINVAL ;for (i =0 ; i <ACPI_THERMAL_MAX_ACTIVE ; i++) { -if (!(&tz->trips.active[i])) -break ;if (!tz->trips.active[i].flags.valid)break ; tz->trips.active[i].flags.enabled =1 ;
drivers/ata/libata-scsi.c +26 -8
@@ -2742,18 +2742,36 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)return 0 ; } -static struct ata_device *ata_find_dev (struct ata_port *ap,int devno) +static struct ata_device *ata_find_dev (struct ata_port *ap,unsigned int devno) { -if (!sata_pmp_attached (ap)) { -if (likely (devno >=0 && - devno <ata_link_max_devices (&ap->link))) +/* +* For the non-PMP case, ata_link_max_devices() returns 1 (SATA case), +* or 2 (IDE master + slave case). However, the former case includes +* libsas hosted devices which are numbered per scsi host, leading +* to devno potentially being larger than 0 but with each struct +* ata_device having its own struct ata_port and struct ata_link. +* To accommodate these, ignore devno and always use device number 0. +*/ +if (likely (!sata_pmp_attached (ap))) { +int link_max_devices =ata_link_max_devices (&ap->link); + +if (link_max_devices ==1 ) +return &ap->link.device[0 ]; + +if (devno < link_max_devices)return &ap->link.device[devno]; - }else { -if (likely (devno >=0 && - devno < ap->nr_pmp_links)) -return &ap->pmp_link[devno].device[0 ]; + +return NULL ; } +/* +* For PMP-attached devices, the device number corresponds to C +* (channel) of SCSI [H:C:I:L], indicating the port pmp link +* for the device. +*/ +if (devno < ap->nr_pmp_links) +return &ap->pmp_link[devno].device[0 ]; +return NULL ; }
drivers/base/regmap/regmap.c +4 -2
@@ -1998,6 +1998,8 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg,size_t val_count = val_len / val_bytes;size_t chunk_count, chunk_bytes;size_t chunk_regs = val_count; +size_t max_data = map->max_raw_write - map->format.reg_bytes - + map->format.pad_bytes;int ret, i;if (!val_count)
@@ -2005,8 +2007,8 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg,if (map->use_single_write) chunk_regs =1 ; -else if (map->max_raw_write && val_len > map->max_raw_write) - chunk_regs = map->max_raw_write / val_bytes; +else if (map->max_raw_write && val_len > max_data) + chunk_regs = max_data / val_bytes; chunk_count = val_count / chunk_regs; chunk_bytes = chunk_regs * val_bytes;
drivers/block/nbd.c +2 -2
@@ -1624,7 +1624,7 @@ static int nbd_dev_dbg_init(struct nbd_device *nbd)return -EIO ; dir =debugfs_create_dir (nbd_name (nbd), nbd_dbg_dir); -if (!dir) { +if (IS_ERR (dir)) {dev_err (nbd_to_dev (nbd),"Failed to create debugfs dir for '%s'\n" ,nbd_name (nbd));return -EIO ;
@@ -1650,7 +1650,7 @@ static int nbd_dbg_init(void)struct dentry *dbg_dir; dbg_dir =debugfs_create_dir ("nbd" ,NULL ); -if (!dbg_dir) +if (IS_ERR (dbg_dir))return -EIO ; nbd_dbg_dir = dbg_dir;
drivers/block/rnbd/rnbd-proto.h +1 -1
@@ -234,7 +234,7 @@ static inline u32 rnbd_to_bio_flags(u32 rnbd_opf) bio_opf =REQ_OP_WRITE ;break ;case RNBD_OP_FLUSH : - bio_opf =REQ_OP_FLUSH |REQ_PREFLUSH ; + bio_opf =REQ_OP_WRITE |REQ_PREFLUSH ;break ;case RNBD_OP_DISCARD : bio_opf =REQ_OP_DISCARD ;
drivers/char/tpm/tpm_tis_core.c +5 -2
@@ -764,8 +764,11 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,int rc;u32 int_status; -if (devm_request_irq (chip->dev.parent, irq, tis_int_handler, flags, -dev_name (&chip->dev), chip) !=0 ) { + + rc =devm_request_threaded_irq (chip->dev.parent, irq,NULL , + tis_int_handler,IRQF_ONESHOT | flags, +dev_name (&chip->dev), chip); +if (rc) {dev_info (&chip->dev,"Unable to request irq: %d for probe\n" , irq);return -1 ;
drivers/crypto/ccp/sev-dev.c +29 -6
@@ -156,6 +156,7 @@ static int __sev_do_cmd_locked(int cmd, void *data, int *psp_ret)struct sev_device *sev;unsigned int phys_lsb, phys_msb;unsigned int reg, ret =0 ; +int buf_len;if (!psp || !psp->sev_data)return -ENODEV ;
@@ -165,18 +166,27 @@ static int __sev_do_cmd_locked(int cmd, void *data, int *psp_ret) sev = psp->sev_data; -if (data &&WARN_ON_ONCE (!virt_addr_valid (data))) + buf_len =sev_cmd_buffer_len (cmd); +if (WARN_ON_ONCE (!data != !buf_len))return -EINVAL ; +/* +* Copy the incoming data to driver's scratch buffer as __pa() will not +* work for some memory, e.g. vmalloc'd addresses, and @data may not be +* physically contiguous. +*/ +if (data) +memcpy (sev->cmd_buf, data, buf_len); +/* Get the physical address of the command buffer */ - phys_lsb = data ?lower_32_bits (__psp_pa (data)) :0 ; - phys_msb = data ?upper_32_bits (__psp_pa (data)) :0 ; + phys_lsb = data ?lower_32_bits (__psp_pa (sev->cmd_buf)) :0 ; + phys_msb = data ?upper_32_bits (__psp_pa (sev->cmd_buf)) :0 ;dev_dbg (sev->dev,"sev command id %#x buffer 0x%08x%08x timeout %us\n" , cmd, phys_msb, phys_lsb, psp_timeout);print_hex_dump_debug ("(in): " ,DUMP_PREFIX_OFFSET ,16 ,2 , data, -sev_cmd_buffer_len (cmd), false); + buf_len, false);iowrite32 (phys_lsb, sev->io_regs + sev->vdata->cmdbuff_addr_lo_reg);iowrite32 (phys_msb, sev->io_regs + sev->vdata->cmdbuff_addr_hi_reg);
@@ -212,7 +222,14 @@ static int __sev_do_cmd_locked(int cmd, void *data, int *psp_ret) }print_hex_dump_debug ("(out): " ,DUMP_PREFIX_OFFSET ,16 ,2 , data, -sev_cmd_buffer_len (cmd), false); + buf_len, false); + +/* +* Copy potential output from the PSP back to data. Do this even on +* failure in case the caller wants to glean something from the error. +*/ +if (data) +memcpy (data, sev->cmd_buf, buf_len);return ret; }
@@ -974,6 +991,10 @@ int sev_dev_init(struct psp_device *psp)if (!sev) goto e_err; + sev->cmd_buf = (void *)devm_get_free_pages (dev,GFP_KERNEL ,0 ); +if (!sev->cmd_buf) + goto e_sev; + psp->sev_data = sev; sev->dev = dev;
@@ -985,7 +1006,7 @@ int sev_dev_init(struct psp_device *psp)if (!sev->vdata) { ret = -ENODEV ;dev_err (dev,"sev: missing driver data\n" ); - goto e_sev; + goto e_buf; }psp_set_sev_irq_handler (psp, sev_irq_handler, sev);
@@ -1000,6 +1021,8 @@ int sev_dev_init(struct psp_device *psp) e_irq:psp_clear_sev_irq_handler (psp); +e_buf: +devm_free_pages (dev, (unsigned long )sev->cmd_buf); e_sev:devm_kfree (dev, sev); e_err:
drivers/crypto/ccp/sev-dev.h +2 -0
@@ -51,6 +51,8 @@ struct sev_device {u8 api_major;u8 api_minor;u8 build; + +void *cmd_buf; };int sev_dev_init (struct psp_device *psp);
drivers/dma/at_xdmac.c +24 -26
112 lines not on this page · raw message
drivers/dma/pl330.c +4 -4
@@ -1050,7 +1050,7 @@ static bool _trigger(struct pl330_thread *thrd)return true; } -static bool _start (struct pl330_thread *thrd) +static bool pl330_start_thread (struct pl330_thread *thrd) {switch (_state (thrd)) {case PL330_STATE_FAULT_COMPLETING :
@@ -1704,7 +1704,7 @@ static int pl330_update(struct pl330_dmac *pl330) thrd->req_running =-1 ;/* Get going again ASAP */ -_start (thrd); +pl330_start_thread (thrd);/* For now, just make a list of callbacks to be done */ list_add_tail (&descdone->rqd, &pl330->req_done);
@@ -2091,7 +2091,7 @@ static void pl330_tasklet(struct tasklet_struct *t) }else {/* Make sure the PL330 Channel thread is active */ spin_lock (&pch->thread->dmac->lock); -_start (pch->thread); +pl330_start_thread (pch->thread);spin_unlock (&pch->thread->dmac->lock); }
@@ -2109,7 +2109,7 @@ static void pl330_tasklet(struct tasklet_struct *t)if (power_down) { pch->active = true;spin_lock (&pch->thread->dmac->lock); -_start (pch->thread); +pl330_start_thread (pch->thread);spin_unlock (&pch->thread->dmac->lock); power_down = false; }
drivers/gpu/drm/msm/msm_iommu.c +6 -1
@@ -155,7 +155,12 @@ struct msm_mmu *msm_iommu_pagetable_create(struct msm_mmu *parent)/* Get the pagetable configuration from the domain */ if (adreno_smmu->cookie) ttbr1_cfg = adreno_smmu->get_ttbr1_cfg (adreno_smmu->cookie); -if (!ttbr1_cfg) + +/* +* If you hit this WARN_ONCE() you are probably missing an entry in +* qcom_smmu_impl_of_match[] in arm-smmu-qcom.c +*/ +if (WARN_ONCE (!ttbr1_cfg,"No per-process page tables" ))return ERR_PTR (-ENODEV ); pagetable =kzalloc (sizeof (*pagetable),GFP_KERNEL );
drivers/gpu/drm/rcar-du/Kconfig +16 -9
@@ -4,8 +4,6 @@ config DRM_RCAR_DU depends on DRM && OF depends on ARM || ARM64 depends on ARCH_RENESAS || COMPILE_TEST - imply DRM_RCAR_CMM - imply DRM_RCAR_LVDS select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER
@@ -14,13 +12,17 @@ config DRM_RCAR_DU Choose this option if you have an R-Car chipset. If M is selected the module will be called rcar-du-drm. -config DRM_RCAR_CMM - tristate "R-Car DU Color Management Module (CMM) Support" - depends on DRM && OF +config DRM_RCAR_USE_CMM + bool "R-Car DU Color Management Module (CMM) Support" depends on DRM_RCAR_DU + default DRM_RCAR_DU help Enable support for R-Car Color Management Module (CMM). +config DRM_RCAR_CMM + def_tristate DRM_RCAR_DU + depends on DRM_RCAR_USE_CMM + config DRM_RCAR_DW_HDMI tristate "R-Car Gen3 and RZ/G2 DU HDMI Encoder Support" depends on DRM && OF
@@ -28,15 +30,20 @@ config DRM_RCAR_DW_HDMI help Enable support for R-Car Gen3 or RZ/G2 internal HDMI encoder. +config DRM_RCAR_USE_LVDS + bool "R-Car DU LVDS Encoder Support" + depends on DRM_BRIDGE && OF + default DRM_RCAR_DU + help + Enable support for the R-Car Display Unit embedded LVDS encoders. + config DRM_RCAR_LVDS - tristate "R-Car DU LVDS Encoder Support" - depends on DRM && DRM_BRIDGE && OF + def_tristate DRM_RCAR_DU + depends on DRM_RCAR_USE_LVDS select DRM_KMS_HELPER select DRM_PANEL select OF_FLATTREE select OF_OVERLAY - help - Enable support for the R-Car Display Unit embedded LVDS encoders. config DRM_RCAR_VSP bool "R-Car DU VSP Compositor Support" if ARM
drivers/hid/hid-google-hammer.c +2 -0
@@ -532,6 +532,8 @@ static const struct hid_device_id hammer_devices[] = { USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_EEL) }, {HID_DEVICE (BUS_USB ,HID_GROUP_GENERIC , USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_HAMMER) }, + { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, + USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_JEWEL) }, { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_MAGNEMITE) }, { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC,
drivers/hid/hid-ids.h +1 -0
@@ -491,6 +491,7 @@#define USB_DEVICE_ID_GOOGLE_MOONBALL 0x5044#define USB_DEVICE_ID_GOOGLE_DON 0x5050#define USB_DEVICE_ID_GOOGLE_EEL 0x5057 +#define USB_DEVICE_ID_GOOGLE_JEWEL 0x5061#define USB_VENDOR_ID_GOTOP 0x08f2#define USB_DEVICE_ID_SUPER_Q2 0x007f
drivers/hid/wacom_wac.c +1 -1
@@ -831,7 +831,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)/* Enter report */ if ((data[1 ] &0xfc ) ==0xc0 ) {/* serial number of the tool */ - wacom->serial[idx] = ((data[3 ] &0x0f ) <<28 ) + + wacom->serial[idx] = ((__u64)(data[3 ] &0x0f ) <<28 ) + (data[4 ] <<20 ) + (data[5 ] <<12 ) + (data[6 ] <<4 ) + (data[7 ] >>4 );
drivers/iio/adc/ad7192.c +2 -6
@@ -835,10 +835,6 @@ static const struct iio_info ad7195_info = {__AD719x_CHANNEL (_si, _channel1,-1 , _address,NULL ,IIO_VOLTAGE , \ BIT(IIO_CHAN_INFO_SCALE), ad7192_calibsys_ext_info) -#define AD719x_SHORTED_CHANNEL (_si, _channel1, _address) \ - __AD719x_CHANNEL(_si, _channel1, -1, _address, "shorted", IIO_VOLTAGE, \ - BIT(IIO_CHAN_INFO_SCALE), ad7192_calibsys_ext_info) -#define AD719x_TEMP_CHANNEL (_si, _address) \ __AD719x_CHANNEL(_si, 0, -1, _address, NULL, IIO_TEMP, 0, NULL)
@@ -846,7 +842,7 @@ static const struct iio_chan_spec ad7192_channels[] = {AD719x_DIFF_CHANNEL (0 ,1 ,2 ,AD7192_CH_AIN1P_AIN2M ),AD719x_DIFF_CHANNEL (1 ,3 ,4 ,AD7192_CH_AIN3P_AIN4M ),AD719x_TEMP_CHANNEL (2 ,AD7192_CH_TEMP ), -AD719x_SHORTED_CHANNEL (3 ,2 ,AD7192_CH_AIN2P_AIN2M ), +AD719x_DIFF_CHANNEL (3 ,2 ,2 ,AD7192_CH_AIN2P_AIN2M ),AD719x_CHANNEL (4 ,1 ,AD7192_CH_AIN1 ),AD719x_CHANNEL (5 ,2 ,AD7192_CH_AIN2 ), AD719x_CHANNEL(6, 3, AD7192_CH_AIN3),
@@ -860,7 +856,7 @@ static const struct iio_chan_spec ad7193_channels[] = {AD719x_DIFF_CHANNEL (2 ,5 ,6 ,AD7193_CH_AIN5P_AIN6M ),AD719x_DIFF_CHANNEL (3 ,7 ,8 ,AD7193_CH_AIN7P_AIN8M ),AD719x_TEMP_CHANNEL (4 ,AD7193_CH_TEMP ), -AD719x_SHORTED_CHANNEL (5 ,2 ,AD7193_CH_AIN2P_AIN2M ), +AD719x_DIFF_CHANNEL (5 ,2 ,2 ,AD7193_CH_AIN2P_AIN2M ),AD719x_CHANNEL (6 ,1 ,AD7193_CH_AIN1 ),AD719x_CHANNEL (7 ,2 ,AD7193_CH_AIN2 ), AD719x_CHANNEL(8, 3, AD7193_CH_AIN3),
drivers/iio/adc/mxs-lradc-adc.c +5 -5
@@ -757,13 +757,13 @@ static int mxs_lradc_adc_probe(struct platform_device *pdev) ret =mxs_lradc_adc_trigger_init (iio);if (ret) - goto err_trig; +return ret; ret =iio_triggered_buffer_setup (iio, &iio_pollfunc_store_time, &mxs_lradc_adc_trigger_handler, &mxs_lradc_adc_buffer_ops);if (ret) -return ret; + goto err_trig; adc->vref_mv = mxs_lradc_adc_vref_mv[lradc->soc];
@@ -801,9 +801,9 @@ static int mxs_lradc_adc_probe(struct platform_device *pdev) err_dev:mxs_lradc_adc_hw_stop (adc); -mxs_lradc_adc_trigger_remove (iio); -err_trig:iio_triggered_buffer_cleanup (iio); +err_trig: +mxs_lradc_adc_trigger_remove (iio);return ret; }
@@ -814,8 +814,8 @@ static int mxs_lradc_adc_remove(struct platform_device *pdev)iio_device_unregister (iio);mxs_lradc_adc_hw_stop (adc); -mxs_lradc_adc_trigger_remove (iio);iio_triggered_buffer_cleanup (iio); +mxs_lradc_adc_trigger_remove (iio);return 0 ; }
drivers/iio/dac/Makefile +1 -1
@@ -16,7 +16,7 @@ obj-$(CONFIG_AD5592R_BASE) += ad5592r-base.o obj-$(CONFIG_AD5592R) += ad5592r.o obj-$(CONFIG_AD5593R) += ad5593r.o obj-$(CONFIG_AD5755) += ad5755.o -obj-$(CONFIG_AD5755) += ad5758.o +obj-$(CONFIG_AD5758) += ad5758.o obj-$(CONFIG_AD5761) += ad5761.o obj-$(CONFIG_AD5764) += ad5764.o obj-$(CONFIG_AD5770R) += ad5770r.o
drivers/iio/dac/mcp4725.c +14 -2
@@ -47,12 +47,18 @@ static int __maybe_unused mcp4725_suspend(struct device *dev)struct mcp4725_data *data =iio_priv (i2c_get_clientdata (to_i2c_client (dev)));u8 outbuf[2 ]; +int ret; outbuf[0 ] = (data->powerdown_mode +1 ) <<4 ; outbuf[1 ] =0 ; data->powerdown = true; -return i2c_master_send (data->client, outbuf,2 ); + ret =i2c_master_send (data->client, outbuf,2 ); +if (ret <0 ) +return ret; +else if (ret !=2 ) +return -EIO ; +return 0 ; }static int __maybe_unused mcp4725_resume (struct device *dev)
@@ -60,13 +66,19 @@ static int __maybe_unused mcp4725_resume(struct device *dev)struct mcp4725_data *data =iio_priv (i2c_get_clientdata (to_i2c_client (dev)));u8 outbuf[2 ]; +int ret;/* restore previous DAC value */ outbuf[0 ] = (data->dac_value >>8 ) &0xf ; outbuf[1 ] = data->dac_value &0xff ; data->powerdown = false; -return i2c_master_send (data->client, outbuf,2 ); + ret =i2c_master_send (data->client, outbuf,2 ); +if (ret <0 ) +return ret; +else if (ret !=2 ) +return -EIO ; +return 0 ; } static SIMPLE_DEV_PM_OPS(mcp4725_pm_ops, mcp4725_suspend, mcp4725_resume);
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c +5 -5
@@ -275,9 +275,14 @@ static int inv_icm42600_buffer_preenable(struct iio_dev *indio_dev) {struct inv_icm42600_state *st =iio_device_get_drvdata (indio_dev);struct device *dev =regmap_get_device (st->map); +struct inv_icm42600_timestamp *ts =iio_priv (indio_dev);pm_runtime_get_sync (dev); +mutex_lock (&st->lock); +inv_icm42600_timestamp_reset (ts); +mutex_unlock (&st->lock); +return 0 ; }
@@ -375,7 +380,6 @@ static int inv_icm42600_buffer_postdisable(struct iio_dev *indio_dev)struct device *dev =regmap_get_device (st->map);unsigned int sensor;unsigned int *watermark; -struct inv_icm42600_timestamp *ts;struct inv_icm42600_sensor_conf conf =INV_ICM42600_SENSOR_CONF_INIT ;unsigned int sleep_temp =0 ;unsigned int sleep_sensor =0 ;
@@ -385,11 +389,9 @@ static int inv_icm42600_buffer_postdisable(struct iio_dev *indio_dev)if (indio_dev == st->indio_gyro) { sensor =INV_ICM42600_SENSOR_GYRO ; watermark = &st->fifo.watermark.gyro; - ts =iio_priv (st->indio_gyro); }else if (indio_dev == st->indio_accel) { sensor =INV_ICM42600_SENSOR_ACCEL ; watermark = &st->fifo.watermark.accel; - ts =iio_priv (st->indio_accel); }else {return -EINVAL ; }
@@ -417,8 +419,6 @@ static int inv_icm42600_buffer_postdisable(struct iio_dev *indio_dev)if (!st->fifo.on) ret =inv_icm42600_set_temp_conf (st, false, &sleep_temp); -inv_icm42600_timestamp_reset (ts); - out_unlock:mutex_unlock (&st->lock);
drivers/iio/light/vcnl4035.c +3 -0
@@ -8,6 +8,7 @@* TODO: Proximity */ #include <linux/bitops.h> +#include <linux/bitfield.h> #include <linux/i2c.h> #include <linux/module.h> #include <linux/pm_runtime.h>
@@ -42,6 +43,7 @@#define VCNL4035_ALS_PERS_MASK GENMASK(3, 2)#define VCNL4035_INT_ALS_IF_H_MASK BIT(12)#define VCNL4035_INT_ALS_IF_L_MASK BIT(13) +#define VCNL4035_DEV_ID_MASK GENMASK(7, 0)/* Default values */ #define VCNL4035_MODE_ALS_ENABLE BIT(0)
@@ -415,6 +417,7 @@ static int vcnl4035_init(struct vcnl4035_data *data)return ret; } + id =FIELD_GET (VCNL4035_DEV_ID_MASK , id);if (id !=VCNL4035_DEV_ID_VAL ) {dev_err (&data->client->dev,"Wrong id, got %x, expected %x\n" , id,VCNL4035_DEV_ID_VAL );
drivers/infiniband/hw/bnxt_re/ib_verbs.c +7 -38
102 lines not on this page · raw message
drivers/infiniband/hw/bnxt_re/qplib_fp.c +6 -5
@@ -2041,6 +2041,12 @@ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq)u32 pg_sz_lvl;int rc; +if (!cq->dpi) { +dev_err (&rcfw->pdev->dev, +"FP: CREATE_CQ failed due to NULL DPI\n" ); +return -EINVAL ; + } + hwq_attr.res = res; hwq_attr.depth = cq->max_wqe; hwq_attr.stride =sizeof (struct cq_base );
@@ -2052,11 +2058,6 @@ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq)RCFW_CMD_PREP (req,CREATE_CQ , cmd_flags); -if (!cq->dpi) { -dev_err (&rcfw->pdev->dev, -"FP: CREATE_CQ failed due to NULL DPI\n" ); -return -EINVAL ; - } req.dpi =cpu_to_le32 (cq->dpi->dpi); req.cq_handle =cpu_to_le64 (cq->cq_handle); req.cq_size =cpu_to_le32 (cq->hwq.max_elements);
drivers/infiniband/hw/bnxt_re/qplib_res.c +2 -10
@@ -215,17 +215,9 @@ int bnxt_qplib_alloc_init_hwq(struct bnxt_qplib_hwq *hwq,return -EINVAL ; hwq_attr->sginfo->npages = npages; }else { -unsigned long sginfo_num_pages =ib_umem_num_dma_blocks ( - hwq_attr->sginfo->umem, hwq_attr->sginfo->pgsize); - + npages =ib_umem_num_dma_blocks (hwq_attr->sginfo->umem, + hwq_attr->sginfo->pgsize); hwq->is_user = true; - npages = sginfo_num_pages; - npages = (npages *PAGE_SIZE ) / -BIT_ULL (hwq_attr->sginfo->pgshft); -if ((sginfo_num_pages *PAGE_SIZE ) % -BIT_ULL (hwq_attr->sginfo->pgshft)) -if (!npages) - npages++; }if (npages ==MAX_PBL_LVL_0_PGS ) {
drivers/infiniband/hw/bnxt_re/qplib_sp.c +8 -14
@@ -650,16 +650,15 @@ int bnxt_qplib_dereg_mrw(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mrw, }int bnxt_qplib_reg_mr (struct bnxt_qplib_res *res,struct bnxt_qplib_mrw *mr, -u64 *pbl_tbl,int num_pbls,bool block,u32 buf_pg_size) +struct ib_umem *umem,int num_pbls,u32 buf_pg_size) {struct bnxt_qplib_rcfw *rcfw = res->rcfw;struct bnxt_qplib_hwq_attr hwq_attr = {};struct bnxt_qplib_sg_info sginfo = {};struct creq_register_mr_resp resp;struct cmdq_register_mr req; -int pg_ptrs, pages, i, rc;u16 cmd_flags =0 , level; -dma_addr_t **pbl_ptr; +int pages, rc, pg_ptrs;u32 pg_size;if (num_pbls) {
@@ -680,26 +679,21 @@ int bnxt_qplib_reg_mr(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mr,/* Free the hwq if it already exist, must be a rereg */ if (mr->hwq.max_elements)bnxt_qplib_free_hwq (res, &mr->hwq); -/* Use system PAGE_SIZE */ hwq_attr.res = res; hwq_attr.depth = pages; - hwq_attr.stride =PAGE_SIZE ; + hwq_attr.stride =sizeof (dma_addr_t); hwq_attr.type =HWQ_TYPE_MR ; hwq_attr.sginfo = &sginfo; + hwq_attr.sginfo->umem = umem; hwq_attr.sginfo->npages = pages; - hwq_attr.sginfo->pgsize =PAGE_SIZE ; - hwq_attr.sginfo->pgshft =PAGE_SHIFT ; + hwq_attr.sginfo->pgsize = buf_pg_size; + hwq_attr.sginfo->pgshft =ilog2 (buf_pg_size); rc =bnxt_qplib_alloc_init_hwq (&mr->hwq, &hwq_attr);if (rc) {dev_err (&res->pdev->dev,"SP: Reg MR memory allocation failed\n" );return -ENOMEM ; } -/* Write to the hwq */ - pbl_ptr = (dma_addr_t **)mr->hwq.pbl_ptr; -for (i =0 ; i < num_pbls; i++) - pbl_ptr[PTR_PG (i)][PTR_IDX (i)] = - (pbl_tbl[i] &PAGE_MASK ) |PTU_PTE_VALID ; }RCFW_CMD_PREP (req,REGISTER_MR , cmd_flags);
@@ -711,7 +705,7 @@ int bnxt_qplib_reg_mr(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mr, req.pbl =0 ; pg_size =PAGE_SIZE ; }else { - level = mr->hwq.level +1 ; + level = mr->hwq.level; req.pbl =cpu_to_le64 (mr->hwq.pbl[PBL_LVL_0 ].pg_map_arr[0 ]); } pg_size = buf_pg_size ? buf_pg_size :PAGE_SIZE ;
@@ -728,7 +722,7 @@ int bnxt_qplib_reg_mr(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mr, req.mr_size =cpu_to_le64 (mr->total_size); rc =bnxt_qplib_rcfw_send_message (rcfw, (void *)&req, - (void *)&resp,NULL , block); + (void *)&resp,NULL , false);if (rc) goto fail;
drivers/infiniband/hw/bnxt_re/qplib_sp.h +1 -1
@@ -254,7 +254,7 @@ int bnxt_qplib_alloc_mrw(struct bnxt_qplib_res *res,int bnxt_qplib_dereg_mrw (struct bnxt_qplib_res *res,struct bnxt_qplib_mrw *mrw,bool block);int bnxt_qplib_reg_mr (struct bnxt_qplib_res *res,struct bnxt_qplib_mrw *mr, -u64 *pbl_tbl,int num_pbls,bool block,u32 buf_pg_size); +struct ib_umem *umem,int num_pbls,u32 buf_pg_size);int bnxt_qplib_free_mrw (struct bnxt_qplib_res *res,struct bnxt_qplib_mrw *mr);int bnxt_qplib_alloc_fast_reg_mr (struct bnxt_qplib_res *res,struct bnxt_qplib_mrw *mr,int max);
drivers/infiniband/hw/efa/efa_verbs.c +1 -1
@@ -1328,7 +1328,7 @@ static int pbl_continuous_initialize(struct efa_dev *dev,*/ static int pbl_indirect_initialize (struct efa_dev *dev,struct pbl_context *pbl) { -u32 size_in_pages =DIV_ROUND_UP (pbl->pbl_buf_size_in_bytes,PAGE_SIZE ); +u32 size_in_pages =DIV_ROUND_UP (pbl->pbl_buf_size_in_bytes,EFA_CHUNK_PAYLOAD_SIZE );struct scatterlist *sgl;int sg_dma_cnt, err;
drivers/iommu/amd/iommu.c +1 -2
@@ -3914,8 +3914,7 @@ int amd_iommu_activate_guest_mode(void *data)struct irte_ga *entry = (struct irte_ga *) ir_data->entry;u64 valid; -if (!AMD_IOMMU_GUEST_IR_VAPIC (amd_iommu_guest_ir) || - !entry || entry->lo.fields_vapic.guest_mode) +if (!AMD_IOMMU_GUEST_IR_VAPIC (amd_iommu_guest_ir) || !entry)return 0 ; valid = entry->lo.fields_vapic.valid;
drivers/iommu/rockchip-iommu.c +8 -6
@@ -1218,18 +1218,20 @@ static int rk_iommu_probe(struct platform_device *pdev)for (i =0 ; i < iommu->num_irq; i++) {int irq =platform_get_irq (pdev, i); -if (irq <0 ) -return irq; +if (irq <0 ) { + err = irq; + goto err_pm_disable; + } err =devm_request_irq (iommu->dev, irq, rk_iommu_irq,IRQF_SHARED ,dev_name (dev), iommu); -if (err) { -pm_runtime_disable (dev); - goto err_remove_sysfs; - } +if (err) + goto err_pm_disable; }return 0 ; +err_pm_disable: +pm_runtime_disable (dev); err_remove_sysfs:iommu_device_sysfs_remove (&iommu->iommu); err_put_group:
drivers/mailbox/mailbox-test.c +11 -2
@@ -12,6 +12,7 @@#include <linux/kernel.h> #include <linux/mailbox_client.h> #include <linux/module.h> +#include <linux/mutex.h> #include <linux/of.h> #include <linux/platform_device.h> #include <linux/poll.h>
@@ -38,6 +39,7 @@ struct mbox_test_device {char *signal;char *message;spinlock_t lock; +struct mutex mutex;wait_queue_head_t waitq;struct fasync_struct *async_queue;struct dentry *root_debugfs_dir;
@@ -95,6 +97,7 @@ static ssize_t mbox_test_message_write(struct file *filp, size_t count, loff_t *ppos) { struct mbox_test_device *tdev = filp->private_data; +char *message;void *data;int ret;
@@ -110,10 +113,13 @@ static ssize_t mbox_test_message_write(struct file *filp,return -EINVAL ; } - tdev->message =kzalloc (MBOX_MAX_MSG_LEN ,GFP_KERNEL ); -if (!tdev->message) + message =kzalloc (MBOX_MAX_MSG_LEN ,GFP_KERNEL ); +if (!message)return -ENOMEM ; +mutex_lock (&tdev->mutex); + + tdev->message = message; ret =copy_from_user (tdev->message, userbuf, count);if (ret) { ret = -EFAULT ;
@@ -144,6 +150,8 @@ static ssize_t mbox_test_message_write(struct file *filp,kfree (tdev->message); tdev->signal =NULL ; +mutex_unlock (&tdev->mutex); +return ret <0 ? ret : count; }
@@ -392,6 +400,7 @@ static int mbox_test_probe(struct platform_device *pdev)platform_set_drvdata (pdev, tdev);spin_lock_init (&tdev->lock); +mutex_init (&tdev->mutex);if (tdev->rx_channel) { tdev->rx_buffer = devm_kzalloc(&pdev->dev,
drivers/media/dvb-core/dvb_ca_en50221.c +43 -6
130 lines not on this page · raw message
drivers/media/dvb-core/dvb_demux.c +2 -2
@@ -125,12 +125,12 @@ static inline int dvb_dmx_swfilter_payload(struct dvb_demux_feed *feed, cc = buf[3 ] &0x0f ; ccok = ((feed->cc +1 ) &0x0f ) == cc; - feed->cc = cc;if (!ccok) {set_buf_flags (feed,DMX_BUFFER_FLAG_DISCONTINUITY_DETECTED );dprintk_sect_loss ("missed packet: %d instead of %d!\n" , cc, (feed->cc +1 ) &0x0f ); } + feed->cc = cc;if (buf[1 ] &0x40 )// PUSI ? feed->peslen =0xfffa ;
@@ -310,7 +310,6 @@ static int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed, cc = buf[3 ] &0x0f ; ccok = ((feed->cc +1 ) &0x0f ) == cc; - feed->cc = cc;if (buf[3 ] &0x20 ) {/* adaption field present, check for discontinuity_indicator */
@@ -346,6 +345,7 @@ static int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed, feed->pusi_seen = false;dvb_dmx_swfilter_section_new (feed); } + feed->cc = cc;if (buf[1 ] &0x40 ) {/* PUSI=1 (is set), section boundary is here */
drivers/media/dvb-core/dvb_frontend.c +12 -4
@@ -292,14 +292,22 @@ static int dvb_frontend_get_event(struct dvb_frontend *fe, }if (events->eventw == events->eventr) { -int ret; +struct wait_queue_entry wait; +int ret =0 ;if (flags &O_NONBLOCK )return -EWOULDBLOCK ; - ret =wait_event_interruptible (events->wait_queue, -dvb_frontend_test_event (fepriv, events)); - +init_waitqueue_entry (&wait, current); +add_wait_queue (&events->wait_queue, &wait); +while (!dvb_frontend_test_event (fepriv, events)) { +wait_woken (&wait,TASK_INTERRUPTIBLE ,0 ); +if (signal_pending (current)) { + ret = -ERESTARTSYS ; +break ; + } + } +remove_wait_queue (&events->wait_queue, &wait);if (ret <0 )return ret; }
drivers/media/dvb-core/dvb_net.c +35 -3
@@ -1564,15 +1564,43 @@ static long dvb_net_ioctl(struct file *file,return dvb_usercopy (file, cmd, arg, dvb_net_do_ioctl); } +static int locked_dvb_net_open (struct inode *inode,struct file *file) +{ +struct dvb_device *dvbdev = file->private_data; +struct dvb_net *dvbnet = dvbdev->priv; +int ret; + +if (mutex_lock_interruptible (&dvbnet->remove_mutex)) +return -ERESTARTSYS ; + +if (dvbnet->exit) { +mutex_unlock (&dvbnet->remove_mutex); +return -ENODEV ; + } + + ret =dvb_generic_open (inode, file); + +mutex_unlock (&dvbnet->remove_mutex); + +return ret; +} +static int dvb_net_close (struct inode *inode,struct file *file) {struct dvb_device *dvbdev = file->private_data;struct dvb_net *dvbnet = dvbdev->priv; +mutex_lock (&dvbnet->remove_mutex); +dvb_generic_release (inode, file); -if (dvbdev->users ==1 && dvbnet->exit ==1 ) +if (dvbdev->users ==1 && dvbnet->exit ==1 ) { +mutex_unlock (&dvbnet->remove_mutex);wake_up (&dvbdev->wait_queue); + }else { +mutex_unlock (&dvbnet->remove_mutex); + } +return 0 ; }
@@ -1580,7 +1608,7 @@ static int dvb_net_close(struct inode *inode, struct file *file)static const struct file_operations dvb_net_fops = { .owner =THIS_MODULE , .unlocked_ioctl = dvb_net_ioctl, - .open = dvb_generic_open, + .open = locked_dvb_net_open, .release = dvb_net_close, .llseek = noop_llseek, };
@@ -1599,10 +1627,13 @@ void dvb_net_release (struct dvb_net *dvbnet) {int i; +mutex_lock (&dvbnet->remove_mutex); dvbnet->exit =1 ; +mutex_unlock (&dvbnet->remove_mutex); +if (dvbnet->dvbdev->users <1 )wait_event (dvbnet->dvbdev->wait_queue, - dvbnet->dvbdev->users==1 ); + dvbnet->dvbdev->users ==1 );dvb_unregister_device (dvbnet->dvbdev);
@@ -1621,6 +1652,7 @@ int dvb_net_init (struct dvb_adapter *adap, struct dvb_net *dvbnet,int i;mutex_init (&dvbnet->ioctl_mutex); +mutex_init (&dvbnet->remove_mutex); dvbnet->demux = dmx;for (i=0 ; i<DVB_NET_DEVICES_MAX ; i++)
drivers/media/dvb-frontends/mn88443x.c +1 -1
@@ -800,7 +800,7 @@ MODULE_DEVICE_TABLE(i2c, mn88443x_i2c_id);static struct i2c_driver mn88443x_driver = { .driver = { .name ="mn88443x" , - .of_match_table =of_match_ptr (mn88443x_of_match), + .of_match_table = mn88443x_of_match, }, .probe = mn88443x_probe, .remove = mn88443x_remove,
drivers/media/pci/netup_unidvb/netup_unidvb_core.c +9 -8
@@ -887,12 +887,7 @@ static int netup_unidvb_initdev(struct pci_dev *pci_dev, ndev->lmmio0, (u32 )pci_resource_len (pci_dev,0 ), ndev->lmmio1, (u32 )pci_resource_len (pci_dev,1 ), pci_dev->irq); -if (request_irq (pci_dev->irq, netup_unidvb_isr,IRQF_SHARED , -"netup_unidvb" , pci_dev) <0 ) { -dev_err (&pci_dev->dev, -"%s(): can't get IRQ %d\n" , __func__, pci_dev->irq); - goto irq_request_err; - } + ndev->dma_size =2 *188 *NETUP_DMA_BLOCKS_COUNT *NETUP_DMA_PACKETS_COUNT ; ndev->dma_virt = dma_alloc_coherent(&pci_dev->dev,
@@ -933,6 +928,14 @@ static int netup_unidvb_initdev(struct pci_dev *pci_dev,dev_err (&pci_dev->dev,"netup_unidvb: DMA setup failed\n" ); goto dma_setup_err; } + +if (request_irq (pci_dev->irq, netup_unidvb_isr,IRQF_SHARED , +"netup_unidvb" , pci_dev) <0 ) { +dev_err (&pci_dev->dev, +"%s(): can't get IRQ %d\n" , __func__, pci_dev->irq); + goto dma_setup_err; + } +dev_info (&pci_dev->dev,"netup_unidvb: device has been initialized\n" );return 0 ;
@@ -951,8 +954,6 @@ static int netup_unidvb_initdev(struct pci_dev *pci_dev,dma_free_coherent (&pci_dev->dev, ndev->dma_size, ndev->dma_virt, ndev->dma_phys); dma_alloc_err: -free_irq (pci_dev->irq, pci_dev); -irq_request_err:iounmap (ndev->lmmio1); pci_bar1_error:iounmap (ndev->lmmio0);
drivers/media/platform/rcar-vin/rcar-dma.c +1 -3
@@ -645,11 +645,9 @@ static int rvin_setup(struct rvin_dev *vin)case V4L2_FIELD_SEQ_TB :case V4L2_FIELD_SEQ_BT :case V4L2_FIELD_NONE : - vnmc =VNMC_IM_ODD_EVEN ; - progressive = true; -break ;case V4L2_FIELD_ALTERNATE : vnmc =VNMC_IM_ODD_EVEN ; + progressive = true;break ;default : vnmc =VNMC_IM_ODD ;
drivers/media/platform/ti-vpe/cal.h +1 -1
@@ -215,7 +215,7 @@ static inline void cal_write(struct cal_dev *cal, u32 offset, u32 val)iowrite32 (val, cal->base + offset); } -static inline u32 cal_read_field (struct cal_dev *cal,u32 offset,u32 mask) +static __always_inline u32 cal_read_field(struct cal_dev *cal, u32 offset, u32 mask) {return FIELD_GET (mask,cal_read (cal, offset)); }
drivers/media/usb/dvb-usb-v2/ce6230.c +8 -0
@@ -101,6 +101,10 @@ static int ce6230_i2c_master_xfer(struct i2c_adapter *adap,if (num > i +1 && (msg[i+1 ].flags &I2C_M_RD )) {if (msg[i].addr == ce6230_zl10353_config.demod_address) { +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } req.cmd =DEMOD_READ ; req.value = msg[i].addr >>1 ; req.index = msg[i].buf[0 ];
@@ -117,6 +121,10 @@ static int ce6230_i2c_master_xfer(struct i2c_adapter *adap, }else {if (msg[i].addr == ce6230_zl10353_config.demod_address) { +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } req.cmd =DEMOD_WRITE ; req.value = msg[i].addr >>1 ; req.index = msg[i].buf[0 ];
drivers/media/usb/dvb-usb-v2/ec168.c +12 -0
@@ -115,6 +115,10 @@ static int ec168_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],while (i < num) {if (num > i +1 && (msg[i+1 ].flags &I2C_M_RD )) {if (msg[i].addr == ec168_ec100_config.demod_address) { +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } req.cmd =READ_DEMOD ; req.value =0 ; req.index =0xff00 + msg[i].buf[0 ];/* reg */
@@ -131,6 +135,10 @@ static int ec168_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], } }else {if (msg[i].addr == ec168_ec100_config.demod_address) { +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } req.cmd =WRITE_DEMOD ; req.value = msg[i].buf[1 ];/* val */ req.index =0xff00 + msg[i].buf[0 ];/* reg */
@@ -139,6 +147,10 @@ static int ec168_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], ret =ec168_ctrl_msg (d, &req); i +=1 ; }else { +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } req.cmd =WRITE_I2C ; req.value = msg[i].buf[0 ];/* val */ req.index =0x0100 + msg[i].addr;/* I2C addr */
drivers/media/usb/dvb-usb-v2/rtl28xxu.c +20 -0
@@ -176,6 +176,10 @@ static int rtl28xxu_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], ret = -EOPNOTSUPP ; goto err_mutex_unlock; }else if (msg[0 ].addr ==0x10 ) { +if (msg[0 ].len <1 || msg[1 ].len <1 ) { + ret = -EOPNOTSUPP ; + goto err_mutex_unlock; + }/* method 1 - integrated demod */ if (msg[0 ].buf[0 ] ==0x00 ) {/* return demod page from driver cache */
@@ -189,6 +193,10 @@ static int rtl28xxu_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], ret =rtl28xxu_ctrl_msg (d, &req); } }else if (msg[0 ].len <2 ) { +if (msg[0 ].len <1 ) { + ret = -EOPNOTSUPP ; + goto err_mutex_unlock; + }/* method 2 - old I2C */ req.value = (msg[0 ].buf[0 ] <<8 ) | (msg[0 ].addr <<1 ); req.index =CMD_I2C_RD ;
@@ -217,8 +225,16 @@ static int rtl28xxu_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], ret = -EOPNOTSUPP ; goto err_mutex_unlock; }else if (msg[0 ].addr ==0x10 ) { +if (msg[0 ].len <1 ) { + ret = -EOPNOTSUPP ; + goto err_mutex_unlock; + }/* method 1 - integrated demod */ if (msg[0 ].buf[0 ] ==0x00 ) { +if (msg[0 ].len <2 ) { + ret = -EOPNOTSUPP ; + goto err_mutex_unlock; + }/* save demod page for later demod access */ dev->page = msg[0 ].buf[1 ]; ret =0 ;
@@ -231,6 +247,10 @@ static int rtl28xxu_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], ret =rtl28xxu_ctrl_msg (d, &req); } }else if ((msg[0 ].len <23 ) && (!dev->new_i2c_write)) { +if (msg[0 ].len <1 ) { + ret = -EOPNOTSUPP ; + goto err_mutex_unlock; + }/* method 2 - old I2C */ req.value = (msg[0 ].buf[0 ] <<8 ) | (msg[0 ].addr <<1 ); req.index =CMD_I2C_WR ;
drivers/media/usb/dvb-usb/az6027.c +12 -0
@@ -988,6 +988,10 @@ static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n/* write/read request */ if (i +1 < num && (msg[i +1 ].flags &I2C_M_RD )) { req =0xB9 ; +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } index = (((msg[i].buf[0 ] <<8 ) &0xff00 ) | (msg[i].buf[1 ] &0x00ff )); value = msg[i].addr + (msg[i].len <<8 ); length = msg[i +1 ].len +6 ;
@@ -1001,6 +1005,10 @@ static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n/* demod 16bit addr */ req =0xBD ; +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } index = (((msg[i].buf[0 ] <<8 ) &0xff00 ) | (msg[i].buf[1 ] &0x00ff )); value = msg[i].addr + (2 <<8 ); length = msg[i].len -2 ;
@@ -1026,6 +1034,10 @@ static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n }else { req =0xBD ; +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } index = msg[i].buf[0 ] &0x00FF ; value = msg[i].addr + (1 <<8 ); length = msg[i].len -1 ;
drivers/media/usb/dvb-usb/digitv.c +4 -0
@@ -63,6 +63,10 @@ static int digitv_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int numwarn ("more than 2 i2c messages at a time is not handled yet. TODO." );for (i =0 ; i < num; i++) { +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + }/* write/read request */ if (i+1 < num && (msg[i+1 ].flags &I2C_M_RD )) { if (digitv_ctrl_msg(d, USB_READ_COFDM, msg[i].buf[0], NULL, 0,
drivers/media/usb/dvb-usb/dw2102.c +1 -1
@@ -946,7 +946,7 @@ static int su3000_read_mac_address(struct dvb_usb_device *d, u8 mac[6])for (i =0 ; i <6 ; i++) { obuf[1 ] =0xf0 + i;if (i2c_transfer (&d->i2c_adap, msg,2 ) !=2 ) -break ; +return -1 ;else mac[i] = ibuf[0 ]; }
drivers/media/usb/ttusb-dec/ttusb_dec.c +1 -2
@@ -1551,8 +1551,7 @@ static void ttusb_dec_exit_dvb(struct ttusb_dec *dec)dvb_dmx_release (&dec->demux);if (dec->fe) {dvb_unregister_frontend (dec->fe); -if (dec->fe->ops.release) - dec->fe->ops.release (dec->fe); +dvb_frontend_detach (dec->fe); }dvb_unregister_adapter (&dec->adapter); }
drivers/misc/fastrpc.c +5 -2
@@ -1675,8 +1675,10 @@ static void fastrpc_notify_users(struct fastrpc_user *user)struct fastrpc_invoke_ctx *ctx;spin_lock (&user->lock); -list_for_each_entry (ctx, &user->pending, node) +list_for_each_entry (ctx, &user->pending, node) { + ctx->retval = -EPIPE ;complete (&ctx->work); + }spin_unlock (&user->lock); }
@@ -1686,7 +1688,9 @@ static void fastrpc_rpmsg_remove(struct rpmsg_device *rpdev)struct fastrpc_user *user;unsigned long flags; +/* No invocations past this point */ spin_lock_irqsave (&cctx->lock, flags); + cctx->rpdev =NULL ;list_for_each_entry (user, &cctx->users, user)fastrpc_notify_users (user);spin_unlock_irqrestore (&cctx->lock, flags);
@@ -1694,7 +1698,6 @@ static void fastrpc_rpmsg_remove(struct rpmsg_device *rpdev)misc_deregister (&cctx->miscdev);of_platform_depopulate (&rpdev->dev); - cctx->rpdev =NULL ;fastrpc_channel_ctx_put (cctx); }
drivers/mmc/host/vub300.c +3 -0
@@ -1715,6 +1715,9 @@ static void construct_request_response(struct vub300_mmc_host *vub300,int bytes =3 & less_cmd;int words = less_cmd >>2 ;u8 *r = vub300->resp.response.command_response; + +if (!resp_len) +return ;if (bytes ==3 ) { cmd->resp[words] = (r[1 + (words <<2 )] <<24 ) | (r[2 + (words <<2 )] <<16 )
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h +4 -4
@@ -36,25 +36,25 @@ int ingenic_ecc_correct(struct ingenic_ecc *ecc,void ingenic_ecc_release (struct ingenic_ecc *ecc);struct ingenic_ecc *of_ingenic_ecc_get (struct device_node *np);#else /* CONFIG_MTD_NAND_INGENIC_ECC */ -int ingenic_ecc_calculate (struct ingenic_ecc *ecc, +static inline int ingenic_ecc_calculate (struct ingenic_ecc *ecc,struct ingenic_ecc_params *params,const u8 *buf,u8 *ecc_code) {return -ENODEV ; } -int ingenic_ecc_correct (struct ingenic_ecc *ecc, +static inline int ingenic_ecc_correct (struct ingenic_ecc *ecc,struct ingenic_ecc_params *params,u8 *buf,u8 *ecc_code) {return -ENODEV ; } -void ingenic_ecc_release (struct ingenic_ecc *ecc) +static inline void ingenic_ecc_release (struct ingenic_ecc *ecc) { } -struct ingenic_ecc *of_ingenic_ecc_get (struct device_node *np) +static inline struct ingenic_ecc *of_ingenic_ecc_get (struct device_node *np) {return ERR_PTR (-ENODEV ); }
drivers/mtd/nand/raw/marvell_nand.c +6 -4
@@ -2443,6 +2443,12 @@ static int marvell_nfc_setup_interface(struct nand_chip *chip, int chipnr,NDTR1_WAIT_MODE ; } +/* +* Reset nfc->selected_chip so the next command will cause the timing +* registers to be updated in marvell_nfc_select_target(). +*/ + nfc->selected_chip =NULL ; +return 0 ; }
@@ -2885,10 +2891,6 @@ static int marvell_nfc_init(struct marvell_nfc *nfc)regmap_update_bits (sysctrl_base,GENCONF_CLK_GATING_CTRL ,GENCONF_CLK_GATING_CTRL_ND_GATE ,GENCONF_CLK_GATING_CTRL_ND_GATE ); - -regmap_update_bits (sysctrl_base,GENCONF_ND_CLK_CTRL , -GENCONF_ND_CLK_CTRL_EN , -GENCONF_ND_CLK_CTRL_EN ); }/* Configure the DMA if appropriate */
drivers/net/dsa/mv88e6xxx/chip.c +1 -1
@@ -5547,7 +5547,7 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev) goto out; }if (chip->reset) -usleep_range (1000 ,2000 ); +usleep_range (10000 ,20000 ); err =mv88e6xxx_detect (chip);if (err)
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +9 -3
@@ -1312,7 +1312,7 @@ static enum xgbe_mode xgbe_phy_status_aneg(struct xgbe_prv_data *pdata)return pdata->phy_if.phy_impl.an_outcome (pdata); } -static void xgbe_phy_status_result (struct xgbe_prv_data *pdata) +static bool xgbe_phy_status_result (struct xgbe_prv_data *pdata) {struct ethtool_link_ksettings *lks = &pdata->phy.lks;enum xgbe_mode mode;
@@ -1347,8 +1347,13 @@ static void xgbe_phy_status_result(struct xgbe_prv_data *pdata) pdata->phy.duplex =DUPLEX_FULL ; -if (xgbe_set_mode (pdata, mode) && pdata->an_again) +if (!xgbe_set_mode (pdata, mode)) +return false; + +if (pdata->an_again)xgbe_phy_reconfig_aneg (pdata); + +return true; }static void xgbe_phy_status (struct xgbe_prv_data *pdata)
@@ -1378,7 +1383,8 @@ static void xgbe_phy_status(struct xgbe_prv_data *pdata)return ; } -xgbe_phy_status_result (pdata); +if (xgbe_phy_status_result (pdata)) +return ;if (test_bit (XGBE_LINK_INIT , &pdata->dev_state))clear_bit (XGBE_LINK_INIT , &pdata->dev_state);
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c +1 -1
@@ -483,7 +483,7 @@ static void poll_trace(struct mlx5_fw_tracer *tracer, (u64 )timestamp_low;break ;default : -if (tracer_event->event_id >= tracer->str_db.first_string_trace || +if (tracer_event->event_id >= tracer->str_db.first_string_trace && tracer_event->event_id <= tracer->str_db.first_string_trace + tracer->str_db.num_string_trace) { tracer_event->type =TRACER_EVENT_TYPE_STRING ;
drivers/net/ethernet/mellanox/mlx5/core/main.c +1 -1
@@ -783,7 +783,6 @@ static int mlx5_pci_init(struct mlx5_core_dev *dev, struct pci_dev *pdev, }mlx5_pci_vsc_init (dev); - dev->caps.embedded_cpu =mlx5_read_embedded_cpu (dev);return 0 ; err_clr_master:
@@ -978,6 +977,7 @@ static int mlx5_function_setup(struct mlx5_core_dev *dev, bool boot) goto err_cmd_cleanup; } + dev->caps.embedded_cpu =mlx5_read_embedded_cpu (dev);mlx5_cmd_set_state (dev,MLX5_CMDIF_STATE_UP ); err =mlx5_core_enable_hca (dev,0 );
drivers/net/ethernet/sun/cassini.c +2 -2
@@ -1325,7 +1325,7 @@ static void cas_init_rx_dma(struct cas *cp)writel (val, cp->regs +REG_RX_PAGE_SIZE );/* enable the header parser if desired */ -if (CAS_HP_FIRMWARE == cas_prog_null) +if (&CAS_HP_FIRMWARE [0 ] == &cas_prog_null[0 ])return ; val =CAS_BASE (HP_CFG_NUM_CPU ,CAS_NCPUS >63 ?0 :CAS_NCPUS );
@@ -3793,7 +3793,7 @@ static void cas_reset(struct cas *cp, int blkflag)/* program header parser */ if ((cp->cas_flags &CAS_FLAG_TARGET_ABORT ) || - (CAS_HP_ALT_FIRMWARE == cas_prog_null)) { + (&CAS_HP_ALT_FIRMWARE [0 ] == &cas_prog_null[0 ])) {cas_load_firmware (cp,CAS_HP_FIRMWARE ); }else {cas_load_firmware (cp,CAS_HP_ALT_FIRMWARE );
drivers/net/usb/qmi_wwan.c +1 -1
@@ -1260,7 +1260,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x2001, 0x7e3d, 4)}, /* D-Link DWM-222 A2 */ {QMI_FIXED_INTF(0x2020, 0x2031, 4)}, /* Olicard 600 */ {QMI_FIXED_INTF(0x2020, 0x2033, 4)}, /* BroadMobi BM806U */ - {QMI_FIXED_INTF(0x2020, 0x2060, 4)}, /* BroadMobi BM818 */ + {QMI_QUIRK_SET_DTR(0x2020, 0x2060, 4)}, /* BroadMobi BM818 */ {QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */ {QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */ {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */
drivers/net/wireless/ath/ath6kl/htc.h +13 -6
@@ -153,12 +153,19 @@* implementations. */ struct htc_frame_hdr { -u8 eid; -u8 flags; - -/* length of data (including trailer) that follows the header */ -__le16 payld_len; - + struct_group_tagged(htc_frame_look_ahead, header, +union { +struct { +u8 eid; +u8 flags; + +/* length of data (including trailer) that follows the header */ +__le16 payld_len; + + }; +u32 word; + }; + );/* end of 4-byte lookahead */ u8 ctrl[2 ];
drivers/net/wireless/ath/ath6kl/htc_mbox.c +6 -9
@@ -2260,19 +2260,16 @@ int ath6kl_htc_rxmsg_pending_handler(struct htc_target *target,static struct htc_packet *htc_wait_for_ctrl_msg (struct htc_target *target) {struct htc_packet *packet =NULL ; -struct htc_frame_hdr *htc_hdr; -u32 look_ahead; +struct htc_frame_look_ahead look_ahead; -if (ath6kl_hif_poll_mboxmsg_rx (target->dev, &look_ahead, +if (ath6kl_hif_poll_mboxmsg_rx (target->dev, &look_ahead.word,HTC_TARGET_RESPONSE_TIMEOUT ))return NULL ;ath6kl_dbg (ATH6KL_DBG_HTC , -"htc rx wait ctrl look_ahead 0x%X\n" , look_ahead); - - htc_hdr = (struct htc_frame_hdr *)&look_ahead; +"htc rx wait ctrl look_ahead 0x%X\n" , look_ahead.word); -if (htc_hdr->eid !=ENDPOINT_0 ) +if (look_ahead.eid !=ENDPOINT_0 )return NULL ; packet =htc_get_control_buf (target, false);
@@ -2281,8 +2278,8 @@ static struct htc_packet *htc_wait_for_ctrl_msg(struct htc_target *target)return NULL ; packet->info.rx.rx_flags =0 ; - packet->info.rx.exp_hdr = look_ahead; - packet->act_len =le16_to_cpu (htc_hdr->payld_len) +HTC_HDR_LENGTH ; + packet->info.rx.exp_hdr = look_ahead.word; + packet->act_len =le16_to_cpu (look_ahead.payld_len) +HTC_HDR_LENGTH ;if (packet->act_len > packet->buf_len) goto fail_ctrl_rx;
drivers/net/wireless/broadcom/b43/b43.h +1 -1
@@ -651,7 +651,7 @@ struct b43_iv {union {__be16 d16;__be32 d32; - } data __packed; + } __packed data; } __packed;
drivers/net/wireless/broadcom/b43legacy/b43legacy.h +1 -1
@@ -379,7 +379,7 @@ struct b43legacy_iv {union {__be16 d16;__be32 d32; - } data __packed; + } __packed data; } __packed;#define B43legacy_PHYMODE (phytype) (1 << (phytype))
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h +1 -0
@@ -1346,6 +1346,7 @@ struct rtl8xxxu_priv {u32 rege9c;u32 regeb4;u32 regebc; +u32 regrcr;int next_mbox;int nr_out_eps;
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +3 -1
@@ -4045,6 +4045,7 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)RCR_ACCEPT_MGMT_FRAME |RCR_HTC_LOC_CTRL |RCR_APPEND_PHYSTAT |RCR_APPEND_ICV |RCR_APPEND_MIC ;rtl8xxxu_write32 (priv,REG_RCR , val32); + priv->regrcr = val32;/* * Accept all multicast
@@ -5999,7 +6000,7 @@ static void rtl8xxxu_configure_filter(struct ieee80211_hw *hw, unsigned int *total_flags, u64 multicast) {struct rtl8xxxu_priv *priv = hw->priv; -u32 rcr =rtl8xxxu_read32 (priv,REG_RCR ); +u32 rcr = priv->regrcr;dev_dbg (&priv->udev->dev,"%s: changed_flags %08x, total_flags %08x\n" , __func__, changed_flags, *total_flags);
@@ -6045,6 +6046,7 @@ static void rtl8xxxu_configure_filter(struct ieee80211_hw *hw,*/ rtl8xxxu_write32 (priv,REG_RCR , rcr); + priv->regrcr = rcr; *total_flags &= (FIF_ALLMULTI | FIF_FCSFAIL | FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL | FIF_OTHER_BSS | FIF_PSPOLL |
drivers/s390/crypto/pkey_api.c +3 -0
@@ -1271,6 +1271,7 @@ static long pkey_unlocked_ioctl(struct file *filp, unsigned int cmd,return PTR_ERR (kkey); rc =pkey_keyblob2pkey (kkey, ktp.keylen, &ktp.protkey);DEBUG_DBG ("%s pkey_keyblob2pkey()=%d\n" , __func__, rc); +memzero_explicit (kkey, ktp.keylen);kfree (kkey);if (rc)break ;
@@ -1404,6 +1405,7 @@ static long pkey_unlocked_ioctl(struct file *filp, unsigned int cmd, kkey, ktp.keylen, &ktp.protkey);DEBUG_DBG ("%s pkey_keyblob2pkey2()=%d\n" , __func__, rc);kfree (apqns); +memzero_explicit (kkey, ktp.keylen);kfree (kkey);if (rc)break ;
@@ -1530,6 +1532,7 @@ static long pkey_unlocked_ioctl(struct file *filp, unsigned int cmd, protkey, &protkeylen);DEBUG_DBG ("%s pkey_keyblob2pkey3()=%d\n" , __func__, rc);kfree (apqns); +memzero_explicit (kkey, ktp.keylen);kfree (kkey);if (rc) {kfree (protkey);
drivers/scsi/Kconfig +1 -1
@@ -444,7 +444,7 @@ config SCSI_MVUMI config SCSI_DPT_I2O tristate "Adaptec I2O RAID support " - depends on SCSI && PCI && VIRT_TO_BUS + depends on SCSI && PCI help This driver supports all of Adaptec's I2O based RAID controllers as well as the DPT SmartRaid V cards. This is an Adaptec maintained
drivers/scsi/dpt_i2o.c +10 -268
320 lines not on this page · raw message
drivers/scsi/dpti.h +0 -1
@@ -248,7 +248,6 @@ typedef struct _adpt_hba {void __iomem *FwDebugBLEDflag_P;// Virtual Addr Of FW Debug BLED void __iomem *FwDebugBLEDvalue_P;// Virtual Addr Of FW Debug BLED u32 FwDebugFlags; -u32 *ioctl_reply_context[4 ]; } adpt_hba;struct sg_simple_element {
drivers/scsi/scsi_lib.c +2 -0
@@ -1490,6 +1490,7 @@ static int scsi_dispatch_cmd(struct scsi_cmnd *cmd)*/ SCSI_LOG_MLQUEUE (3 ,scmd_printk (KERN_INFO , cmd,"queuecommand : device blocked\n" )); +atomic_dec (&cmd->device->iorequest_cnt);return SCSI_MLQUEUE_DEVICE_BUSY ; }
@@ -1522,6 +1523,7 @@ static int scsi_dispatch_cmd(struct scsi_cmnd *cmd)trace_scsi_dispatch_cmd_start (cmd); rtn = host->hostt->queuecommand (host, cmd);if (rtn) { +atomic_dec (&cmd->device->iorequest_cnt);trace_scsi_dispatch_cmd_error (cmd, rtn);if (rtn !=SCSI_MLQUEUE_DEVICE_BUSY && rtn !=SCSI_MLQUEUE_TARGET_BUSY )
drivers/scsi/stex.c +4 -0
@@ -109,7 +109,9 @@ enum {TASK_ATTRIBUTE_HEADOFQUEUE =0x1 ,TASK_ATTRIBUTE_ORDERED =0x2 , TASK_ATTRIBUTE_ACA = 0x4, +}; +enum {SS_STS_NORMAL =0x80000000 ,SS_STS_DONE =0x40000000 , SS_STS_HANDSHAKE = 0x20000000,
@@ -121,7 +123,9 @@ enum {SS_I2H_REQUEST_RESET =0x2000 , SS_MU_OPERATIONAL = 0x80000000, +}; +enum {STEX_CDB_LENGTH =16 , STATUS_VAR_LEN = 128,
drivers/tty/serial/8250/8250_tegra.c +3 -1
@@ -111,13 +111,15 @@ static int tegra_uart_probe(struct platform_device *pdev) ret =serial8250_register_8250_port (&port8250);if (ret <0 ) - goto err_clkdisable; + goto err_ctrl_assert;platform_set_drvdata (pdev, uart); uart->line = ret;return 0 ; +err_ctrl_assert: +reset_control_assert (uart->rst); err_clkdisable:clk_disable_unprepare (uart->clk);
drivers/tty/serial/fsl_lpuart.c +23 -21
57 lines not on this page · raw message
drivers/usb/gadget/function/f_fs.c +1 -1
@@ -3609,6 +3609,7 @@ static void ffs_func_unbind(struct usb_configuration *c,/* Drain any pending AIO completions */ drain_workqueue (ffs->io_completion_wq); +ffs_event_add (ffs,FUNCTIONFS_UNBIND );if (!--opts->refcnt)functionfs_unbind (ffs);
@@ -3633,7 +3634,6 @@ static void ffs_func_unbind(struct usb_configuration *c, func->function.ssp_descriptors =NULL ; func->interfaces_nums =NULL ; -ffs_event_add (ffs,FUNCTIONFS_UNBIND ); }static struct usb_function *ffs_alloc (struct usb_function_instance *fi)
drivers/video/fbdev/core/bitblit.c +3 -0
@@ -247,6 +247,9 @@ static void bit_cursor(struct vc_data *vc, struct fb_info *info, int mode, cursor.set =0 ; +if (!vc->vc_font.data) +return ; + c =scr_readw ((u16 *) vc->vc_pos); attribute =get_attribute (info, c); src = vc->vc_font.data + ((c & charmask) * (w * vc->vc_font.height));
drivers/video/fbdev/core/modedb.c +5 -0
@@ -257,6 +257,11 @@ static const struct fb_videomode modedb[] = { {NULL ,72 ,480 ,300 ,33386 ,40 ,24 ,11 ,19 ,80 ,3 ,0 , FB_VMODE_DOUBLE }, +/* 1920x1080 @ 60 Hz, 67.3 kHz hsync */ + { NULL, 60, 1920, 1080, 6734, 148, 88, 36, 4, 44, 5, 0, +FB_SYNC_HOR_HIGH_ACT |FB_SYNC_VERT_HIGH_ACT , + FB_VMODE_NONINTERLACED }, +/* 1920x1200 @ 60 Hz, 74.5 Khz hsync */ { NULL, 60, 1920, 1200, 5177, 128, 336, 1, 38, 208, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
drivers/video/fbdev/stifb.c +1 -0
@@ -1413,6 +1413,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)iounmap (info->screen_base); out_err0:kfree (fb); + sti->info =NULL ;return -ENXIO ; }
drivers/watchdog/menz69_wdt.c +6 -10
@@ -98,14 +98,6 @@ static const struct watchdog_ops men_z069_ops = { .set_timeout = men_z069_wdt_set_timeout, }; -static struct watchdog_device men_z069_wdt = { - .info = &men_z069_info, - .ops = &men_z069_ops, - .timeout =MEN_Z069_DEFAULT_TIMEOUT , - .min_timeout =1 , - .max_timeout =MEN_Z069_WDT_COUNTER_MAX /MEN_Z069_TIMER_FREQ , -}; -static int men_z069_probe (struct mcb_device *dev,const struct mcb_device_id *id) {
@@ -125,15 +117,19 @@ static int men_z069_probe(struct mcb_device *dev, goto release_mem; drv->mem = mem; + drv->wdt.info = &men_z069_info; + drv->wdt.ops = &men_z069_ops; + drv->wdt.timeout =MEN_Z069_DEFAULT_TIMEOUT ; + drv->wdt.min_timeout =1 ; + drv->wdt.max_timeout =MEN_Z069_WDT_COUNTER_MAX /MEN_Z069_TIMER_FREQ ; - drv->wdt = men_z069_wdt;watchdog_init_timeout (&drv->wdt,0 , &dev->dev);watchdog_set_nowayout (&drv->wdt, nowayout);watchdog_set_drvdata (&drv->wdt, drv); drv->wdt.parent = &dev->dev;mcb_set_drvdata (dev, drv); -return watchdog_register_device (&men_z069_wdt); +return watchdog_register_device (&drv->wdt); release_mem:mcb_release_mem (mem);
fs/btrfs/ctree.c +2 -0
@@ -3872,6 +3872,7 @@ static int push_leaf_right(struct btrfs_trans_handle *trans, struct btrfs_rootif (check_sibling_keys (left, right)) { ret = -EUCLEAN ; +btrfs_abort_transaction (trans, ret);btrfs_tree_unlock (right);free_extent_buffer (right);return ret;
@@ -4116,6 +4117,7 @@ static int push_leaf_left(struct btrfs_trans_handle *trans, struct btrfs_rootif (check_sibling_keys (left, right)) { ret = -EUCLEAN ; +btrfs_abort_transaction (trans, ret); goto out; } return __push_leaf_left(path, min_data_size,
fs/btrfs/disk-io.c +1 -1
@@ -220,7 +220,7 @@ static void csum_tree_block(struct extent_buffer *buf, u8 *result)crypto_shash_update (shash, kaddr +BTRFS_CSUM_SIZE ,PAGE_SIZE -BTRFS_CSUM_SIZE ); -for (i =1 ; i < num_pages; i++) { +for (i =1 ; i < num_pages &&INLINE_EXTENT_BUFFER_PAGES >1 ; i++) { kaddr =page_address (buf->pages[i]);crypto_shash_update (shash, kaddr,PAGE_SIZE ); }
fs/ext4/ext4.h +4 -1
@@ -980,11 +980,13 @@ do { \* where the second inode has larger inode number * than the first * I_DATA_SEM_QUOTA - Used for quota inodes only +* I_DATA_SEM_EA - Used for ea_inodes only */ enum {I_DATA_SEM_NORMAL =0 ,I_DATA_SEM_OTHER ,I_DATA_SEM_QUOTA , +I_DATA_SEM_EA };
@@ -2849,7 +2851,8 @@ typedef enum {EXT4_IGET_NORMAL =0 ,EXT4_IGET_SPECIAL =0x0001 ,/* OK to iget a system inode */ EXT4_IGET_HANDLE =0x0002 ,/* Inode # is from a handle */ - EXT4_IGET_BAD = 0x0004 /* Allow to iget a bad inode */ +EXT4_IGET_BAD =0x0004 ,/* Allow to iget a bad inode */ + EXT4_IGET_EA_INODE = 0x0008 /* Inode should contain an EA value */ } ext4_iget_flags; extern struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
fs/ext4/inode.c +29 -5
@@ -4680,6 +4680,24 @@ static inline u64 ext4_inode_peek_iversion(const struct inode *inode)return inode_peek_iversion (inode); } +static const char *check_igot_inode (struct inode *inode,ext4_iget_flags flags) + +{ +if (flags &EXT4_IGET_EA_INODE ) { +if (!(EXT4_I (inode)->i_flags &EXT4_EA_INODE_FL )) +return "missing EA_INODE flag" ; +if (ext4_test_inode_state (inode,EXT4_STATE_XATTR ) || +EXT4_I (inode)->i_file_acl) +return "ea_inode with extended attributes" ; + }else { +if ((EXT4_I (inode)->i_flags &EXT4_EA_INODE_FL )) +return "unexpected EA_INODE flag" ; + } +if (is_bad_inode (inode) && !(flags &EXT4_IGET_BAD )) +return "unexpected bad inode w/o EXT4_IGET_BAD" ; +return NULL ; +} +struct inode *__ext4_iget (struct super_block *sb,unsigned long ino,ext4_iget_flags flags,const char *function,unsigned int line)
@@ -4688,6 +4706,7 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,struct ext4_inode *raw_inode;struct ext4_inode_info *ei;struct inode *inode; +const char *err_str;journal_t *journal =EXT4_SB (sb)->s_journal;long ret;loff_t size;
@@ -4711,8 +4730,14 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino, inode =iget_locked (sb, ino);if (!inode)return ERR_PTR (-ENOMEM ); -if (!(inode->i_state &I_NEW )) +if (!(inode->i_state &I_NEW )) { +if ((err_str =check_igot_inode (inode, flags)) !=NULL ) { +ext4_error_inode (inode, function, line,0 , err_str); +iput (inode); +return ERR_PTR (-EFSCORRUPTED ); + }return inode; + } ei =EXT4_I (inode); iloc.bh =NULL ;
@@ -4981,10 +5006,9 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,if (IS_CASEFOLDED (inode) && !ext4_has_feature_casefold (inode->i_sb))ext4_error_inode (inode, function, line,0 ,"casefold flag without casefold feature" ); -if (is_bad_inode (inode) && !(flags &EXT4_IGET_BAD )) { -ext4_error_inode (inode, function, line,0 , -"bad inode without EXT4_IGET_BAD flag" ); - ret = -EUCLEAN ; +if ((err_str =check_igot_inode (inode, flags)) !=NULL ) { +ext4_error_inode (inode, function, line,0 , err_str); + ret = -EFSCORRUPTED ; goto bad_inode; }
fs/ext4/super.c +12 -12
@@ -6005,18 +6005,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) } } -/* -* Reinitialize lazy itable initialization thread based on -* current settings -*/ -if (sb_rdonly (sb) || !test_opt (sb,INIT_INODE_TABLE )) -ext4_unregister_li_request (sb); -else { -ext4_group_t first_not_zeroed; - first_not_zeroed =ext4_has_uninit_itable (sb); -ext4_register_li_request (sb, first_not_zeroed); - } -/* * Handle creation of system zone data early because it can fail. * Releasing of existing data is done when we are sure remount will
@@ -6054,6 +6042,18 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)if (enable_rw) sb->s_flags &= ~SB_RDONLY ; +/* +* Reinitialize lazy itable initialization thread based on +* current settings +*/ +if (sb_rdonly (sb) || !test_opt (sb,INIT_INODE_TABLE )) +ext4_unregister_li_request (sb); +else { +ext4_group_t first_not_zeroed; + first_not_zeroed =ext4_has_uninit_itable (sb); +ext4_register_li_request (sb, first_not_zeroed); + } +if (!ext4_has_feature_mmp (sb) ||sb_rdonly (sb))ext4_stop_mmpd (sbi);
fs/ext4/xattr.c +12 -29
78 lines not on this page · raw message
fs/gfs2/super.c +8 -0
@@ -1416,6 +1416,14 @@ static void gfs2_evict_inode(struct inode *inode)if (inode->i_nlink ||sb_rdonly (sb)) goto out; +/* +* In case of an incomplete mount, gfs2_evict_inode() may be called for +* system files without having an active journal to write to. In that +* case, skip the filesystem evict. +*/ +if (!sdp->sd_jdesc) + goto out; +gfs2_holder_mark_uninitialized (&gh); ret =evict_should_delete (inode, &gh);if (ret ==SHOULD_DEFER_EVICTION )
include/media/dvb_net.h +4 -0
@@ -41,6 +41,9 @@* @exit: flag to indicate when the device is being removed. * @demux: pointer to &struct dmx_demux. * @ioctl_mutex: protect access to this struct. +* @remove_mutex: mutex that avoids a race condition between a callback +* called when the hardware is disconnected and the +* file_operations of dvb_net. * * Currently, the core supports up to %DVB_NET_DEVICES_MAX (10) network * devices.
@@ -53,6 +56,7 @@ struct dvb_net { unsigned int exit:1;struct dmx_demux *demux;struct mutex ioctl_mutex; +struct mutex remove_mutex; };/**
include/net/sock.h +4 -0
@@ -326,6 +326,7 @@ struct bpf_local_storage;* @sk_cgrp_data: cgroup data for this cgroup * @sk_memcg: this socket's memory cgroup association * @sk_write_pending: a write to stream socket waits to start +* @sk_wait_pending: number of threads blocked on this socket * @sk_state_change: callback to indicate change in the state of the sock * @sk_data_ready: callback to indicate there is data to be processed * @sk_write_space: callback to indicate there is bf sending space available
@@ -410,6 +411,7 @@ struct sock {unsigned int sk_napi_id;#endif int sk_rcvbuf; +int sk_wait_pending;struct sk_filter __rcu *sk_filter;union {
@@ -1095,6 +1097,7 @@ static inline void sock_rps_reset_rxhash(struct sock *sk)#define sk_wait_event (__sk, __timeo, __condition, __wait) \ ({ int __rc; \ + __sk->sk_wait_pending++; \ release_sock(__sk); \ __rc = __condition; \ if (!__rc) { \
@@ -1104,6 +1107,7 @@ static inline void sock_rps_reset_rxhash(struct sock *sk) } \sched_annotate_sleep (); \lock_sock (__sk); \ + __sk->sk_wait_pending--; \ __rc = __condition; \ __rc; \ })
kernel/trace/trace_probe.h +1 -1
@@ -301,7 +301,7 @@ trace_probe_primary_from_call(struct trace_event_call *call) {struct trace_probe_event *tpe =trace_probe_event_from_call (call); - return list_first_entry(&tpe->probes, struct trace_probe, list); + return list_first_entry_or_null(&tpe->probes, struct trace_probe, list); }static inline struct list_head *trace_probe_probe_list (struct trace_probe *tp)
lib/test_firmware.c +18 -1
@@ -41,6 +41,7 @@ struct test_batched_req {bool sent;const struct firmware *fw;const char *name; +const char *fw_buf;struct completion completion;struct task_struct *task;struct device *dev;
@@ -143,8 +144,14 @@ static void __test_release_all_firmware(void)for (i =0 ; i < test_fw_config->num_requests; i++) { req = &test_fw_config->reqs[i]; -if (req->fw) +if (req->fw) { +if (req->fw_buf) { +kfree_const (req->fw_buf); + req->fw_buf =NULL ; + }release_firmware (req->fw); + req->fw =NULL ; + } }vfree (test_fw_config->reqs);
@@ -589,6 +596,8 @@ static ssize_t trigger_request_store(struct device *dev,mutex_lock (&test_fw_mutex);release_firmware (test_firmware); +if (test_fw_config->reqs) +__test_release_all_firmware (); test_firmware =NULL ; rc =request_firmware (&test_firmware, name, dev);if (rc) {
@@ -689,6 +698,8 @@ static ssize_t trigger_async_request_store(struct device *dev,mutex_lock (&test_fw_mutex);release_firmware (test_firmware); test_firmware =NULL ; +if (test_fw_config->reqs) +__test_release_all_firmware (); rc =request_firmware_nowait (THIS_MODULE ,1 , name, dev,GFP_KERNEL ,NULL , trigger_async_request_cb);if (rc) {
@@ -731,6 +742,8 @@ static ssize_t trigger_custom_fallback_store(struct device *dev,mutex_lock (&test_fw_mutex);release_firmware (test_firmware); +if (test_fw_config->reqs) +__test_release_all_firmware (); test_firmware =NULL ; rc = request_firmware_nowait(THIS_MODULE, FW_ACTION_NOHOTPLUG, name, dev, GFP_KERNEL, NULL,
@@ -793,6 +806,8 @@ static int test_fw_run_batch_request(void *data) test_fw_config->buf_size);if (!req->fw)kfree (test_buf); +else + req->fw_buf = test_buf; }else { req->rc = test_fw_config->req_firmware(&req->fw, req->name,
@@ -848,6 +863,7 @@ static ssize_t trigger_batched_requests_store(struct device *dev, req->fw =NULL ; req->idx = i; req->name = test_fw_config->name; + req->fw_buf =NULL ; req->dev = dev;init_completion (&req->completion); req->task = kthread_run(test_fw_run_batch_request, req,
@@ -947,6 +963,7 @@ ssize_t trigger_batched_requests_async_store(struct device *dev,for (i =0 ; i < test_fw_config->num_requests; i++) { req = &test_fw_config->reqs[i]; req->name = test_fw_config->name; + req->fw_buf =NULL ; req->fw =NULL ; req->idx = i;init_completion (&req->completion);
net/atm/resources.c +2 -0
@@ -403,6 +403,7 @@ int atm_dev_ioctl(unsigned int cmd, void __user *buf, int __user *sioc_len,return error; } +#ifdef CONFIG_PROC_FS void *atm_dev_seq_start (struct seq_file *seq,loff_t *pos) {mutex_lock (&atm_dev_mutex);
@@ -418,3 +419,4 @@ void *atm_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos) {return seq_list_next (v, &atm_devs, pos); } +#endif
net/core/sock.c +1 -1
@@ -2016,7 +2016,6 @@ void sk_setup_caps(struct sock *sk, struct dst_entry *dst) {u32 max_segs =1 ; -sk_dst_set (sk, dst); sk->sk_route_caps = dst->dev->features | sk->sk_route_forced_caps;if (sk->sk_route_caps &NETIF_F_GSO ) sk->sk_route_caps |=NETIF_F_GSO_SOFTWARE ;
@@ -2031,6 +2030,7 @@ void sk_setup_caps(struct sock *sk, struct dst_entry *dst) } } sk->sk_gso_max_segs = max_segs; +sk_dst_set (sk, dst); }EXPORT_SYMBOL_GPL (sk_setup_caps);
net/ipv4/af_inet.c +2 -0
@@ -584,6 +584,7 @@ static long inet_wait_for_connect(struct sock *sk, long timeo, int writebias)add_wait_queue (sk_sleep (sk), &wait); sk->sk_write_pending += writebias; + sk->sk_wait_pending++;/* Basic assumption: if someone sets sk->sk_err, he _must_ * change state of the socket from TCP_SYN_*.
@@ -599,6 +600,7 @@ static long inet_wait_for_connect(struct sock *sk, long timeo, int writebias) }remove_wait_queue (sk_sleep (sk), &wait); sk->sk_write_pending -= writebias; + sk->sk_wait_pending--;return timeo; }
net/ipv4/inet_connection_sock.c +1 -0
@@ -839,6 +839,7 @@ struct sock *inet_csk_clone_lock(const struct sock *sk,if (newsk) {struct inet_connection_sock *newicsk =inet_csk (newsk); + newsk->sk_wait_pending =0 ;inet_sk_set_state (newsk,TCP_SYN_RECV ); newicsk->icsk_bind_hash =NULL ;
net/ipv4/tcp.c +8 -1
@@ -2748,6 +2748,12 @@ int tcp_disconnect(struct sock *sk, int flags)int old_state = sk->sk_state;u32 seq; +/* Deny disconnect if other threads are blocked in sk_wait_event() +* or inet_wait_for_connect(). +*/ +if (sk->sk_wait_pending) +return -EBUSY ; +if (old_state !=TCP_CLOSE )tcp_set_state (sk,TCP_CLOSE );
@@ -3713,7 +3719,8 @@ static int do_tcp_getsockopt(struct sock *sk, int level,switch (optname) {case TCP_MAXSEG : val = tp->mss_cache; -if (!val && ((1 << sk->sk_state) & (TCPF_CLOSE |TCPF_LISTEN ))) +if (tp->rx_opt.user_mss && + ((1 << sk->sk_state) & (TCPF_CLOSE |TCPF_LISTEN ))) val = tp->rx_opt.user_mss;if (tp->repair) val = tp->rx_opt.mss_clamp;
tools/testing/selftests/net/mptcp/Makefile +1 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/diag.sh +4 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/mptcp_connect.sh +4 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/mptcp_join.sh +4 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/mptcp_lib.sh new file +40 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/pm_netlink.sh +4 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/simult_flows.sh +4 -0
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.