Linux 4.9.144
Greg KH
maintainerI'm announcing the release of the 4.9.144 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 5 arch/arc/Kconfig | 2 arch/arc/Makefile | 2 arch/arc/configs/axs101_defconfig | 2 arch/arc/configs/axs103_defconfig | 1 arch/arc/configs/axs103_smp_defconfig | 1 arch/arc/configs/nps_defconfig | 2 arch/arc/configs/nsim_700_defconfig | 1 arch/arc/configs/nsimosci_defconfig | 2 arch/arc/configs/nsimosci_hs_defconfig | 1 arch/arc/configs/nsimosci_hs_smp_defconfig | 1 arch/arc/configs/tb10x_defconfig | 1 arch/arc/configs/vdk_hs38_defconfig | 1 arch/arc/configs/vdk_hs38_smp_defconfig | 1 arch/mips/include/asm/syscall.h | 2 arch/mips/ralink/mt7620.c | 2 arch/x86/include/asm/suspend_64.h | 5 arch/x86/kvm/svm.c | 19 arch/x86/power/hibernate_64.c | 6 drivers/android/binder.c | 41 + drivers/gpu/drm/ast/ast_main.c | 3 drivers/gpu/drm/drm_auth.c | 2 drivers/gpu/drm/gma500/mdfld_intel_display.c | 2 drivers/gpu/drm/mediatek/mtk_hdmi.c | 5 drivers/infiniband/hw/mlx5/main.c | 29 - drivers/infiniband/ulp/iser/iser_verbs.c | 7 drivers/input/joystick/xpad.c | 16 drivers/input/keyboard/matrix_keypad.c | 23 drivers/input/mouse/elan_i2c_core.c | 3 drivers/net/ethernet/qlogic/qed/qed_debug.c | 8 drivers/net/wireless/ath/wil6210/wmi.c | 8 drivers/reset/core.c | 79 ++- drivers/scsi/bfa/bfa_fcbuild.c | 8 drivers/scsi/bfa/bfa_fcs.c | 78 +-- drivers/scsi/bfa/bfa_fcs_lport.c | 62 -- drivers/scsi/bfa/bfa_ioc.c | 2 drivers/scsi/bfa/bfa_svc.c | 4 drivers/scsi/bfa/bfad.c | 20 drivers/scsi/bfa/bfad_attr.c | 2 drivers/scsi/bfa/bfad_bsg.c | 6 drivers/scsi/csiostor/csio_lnode.c | 43 + drivers/scsi/scsi_devinfo.c | 22 drivers/staging/rts5208/sd.c | 6 drivers/tty/serial/kgdboc.c | 43 - drivers/usb/gadget/udc/dummy_hcd.c | 9 fs/btrfs/Makefile | 2 fs/btrfs/ctree.h | 128 ++--- fs/btrfs/disk-io.c | 162 ------ fs/btrfs/extent-tree.c | 86 +++ fs/btrfs/extent_io.c | 24 fs/btrfs/extent_io.h | 19 fs/btrfs/free-space-cache.c | 2 fs/btrfs/struct-funcs.c | 9 fs/btrfs/tree-checker.c | 649 +++++++++++++++++++++++++++ fs/btrfs/tree-checker.h | 38 + fs/btrfs/volumes.c | 30 + fs/btrfs/volumes.h | 2 fs/ceph/mds_client.c | 15 fs/f2fs/checkpoint.c | 46 + fs/f2fs/data.c | 33 + fs/f2fs/f2fs.h | 41 + fs/f2fs/file.c | 21 fs/f2fs/inode.c | 68 ++ fs/f2fs/node.c | 73 ++- fs/f2fs/recovery.c | 6 fs/f2fs/segment.c | 34 + fs/f2fs/segment.h | 48 + fs/f2fs/super.c | 107 ++++ fs/hugetlbfs/inode.c | 30 + fs/kernfs/symlink.c | 2 fs/udf/super.c | 16 fs/udf/unicode.c | 14 fs/xfs/libxfs/xfs_attr.c | 9 include/linux/bpf_verifier.h | 1 include/linux/ceph/auth.h | 13 include/linux/ceph/ceph_features.h | 4 include/linux/ceph/messenger.h | 8 include/linux/ceph/msgr.h | 2 include/linux/reset.h | 92 +-- include/uapi/linux/btrfs_tree.h | 1 kernel/bpf/verifier.c | 90 ++- kernel/debug/kdb/kdb_support.c | 4 kernel/events/uprobes.c | 12 lib/kobject.c | 2 lib/test_hexdump.c | 2 mm/hugetlb.c | 10 mm/truncate.c | 8 net/ceph/auth.c | 20 net/ceph/auth_x.c | 225 +++++++-- net/ceph/auth_x_protocol.h | 7 net/ceph/messenger.c | 101 ++-- net/ceph/osd_client.c | 15 net/ipv4/ip_tunnel.c | 4 net/tipc/subscr.c | 2 scripts/Makefile.extrawarn | 3 scripts/unifdef.c | 4 sound/pci/trident/trident.c | 2 97 files changed, 2157 insertions(+), 777 deletions(-)
Adam Wong (1):
Input: elan_i2c - add support for ELAN0621 touchpad
Alexei Starovoitov (1):
bpf: Prevent memory disambiguation attack
Alexey Brodkin (1):
arc: [devboards] Add support of NFSv3 ACL
Andrea Parri (1):
uprobes: Fix handle_swbp() vs. unregister() + register() race once more
Arnd Bergmann (7):
drm: gma500: fix logic error
scsi: bfa: convert to strlcpy/strlcat
staging: rts5208: fix gcc-8 logic error warning
kdb: use memmove instead of overlapping memcpy
usb: gadget: dummy: fix nonsensical comparisons
net: qed: use correct strncpy() size
btrfs: tree-checker: use %zu format string for size_t
Ben Hutchings (3):
bpf/verifier: Add spi variable to check_stack_write() bpf/verifier: Pass instruction index to check_mem_access() and check_xadd()
f2fs: Add sanity_check_inode() function
Cameron Gutman (1):
Input: xpad - quirk all PDP Xbox One gamepads
Chao Yu (9):
f2fs: fix race condition in between free nid allocator/initializer
f2fs: clean up with is_valid_blkaddr()
f2fs: introduce and spread verify_blkaddr
f2fs: fix to do sanity check with secs_per_zone
f2fs: fix to do sanity check with user_block_count
f2fs: fix to do sanity check with node footer and iblocks
f2fs: fix to do sanity check with block address in main area
f2fs: fix to do sanity check with block address in main area v2
f2fs: fix to do sanity check with cp_pack_start_sum
Christian Hoff (1):
Input: matrix_keypad - check for errors from of_get_named_gpio()
Darrick J. Wong (1):
xfs: don't fail when converting shortform attr to long form during ATTR_REPLACE
David Sterba (1):
btrfs: tree-check: reduce stack consumption in check_dir_item
Dmitry V. Levin (1):
mips: fix mips_get_syscall_arg o32 check
Filipe Manana (1):
Btrfs: fix use-after-free when dumping free space
Greg Kroah-Hartman (1):
Linux 4.9.144
Gu Jinxiang (1):
btrfs: validate type when reading a chunk
Guenter Roeck (2):
kobject: Replace strncpy with memcpy
kernfs: Replace strncpy with memcpy
Guoqing Jiang (1):
tipc: use destination length for copy string
Heiner Kallweit (1):
reset: core: fix reset_control_put
Ilya Dryomov (10):
libceph: drop len argument of *verify_authorizer_reply()
libceph: no need to drop con->mutex for ->get_authorizer()
libceph: store ceph_auth_handshake pointer in ceph_connection
libceph: factor out __prepare_write_connect()
libceph: factor out __ceph_x_decrypt()
libceph: factor out encrypt_authorizer()
libceph: add authorizer challenge
libceph: implement CEPHX_V2 calculation mode
libceph: weaken sizeof check in ceph_x_verify_authorizer_reply()
libceph: check authorizer reply/challenge length before reading
Jaegeuk Kim (6):
f2fs: detect wrong layout
f2fs: return error during fill_super
f2fs: sanity check on sit entry
f2fs: enhance sanity_check_raw_super() to avoid potential overflow
f2fs: fix missing up_read
f2fs: free meta pages if sanity check for ckpt is failed
Jan Kara (1):
udf: Allow mounting volumes with incorrect identification strings
Jeff Mahoney (1):
btrfs: struct-funcs, constify readers
Johan Hovold (1):
drm/mediatek: fix OF sibling-node lookup
Kees Cook (2):
x86/power/64: Use char arrays for asm function names
scsi: csiostor: Avoid content leaks and casts
Kevin Hilman (1):
ARC: change defconfig defaults to ARCv2
Laura Abbott (2):
kgdboc: Fix restrict error
kgdboc: Fix warning with module build
Linus Torvalds (2):
test_hexdump: use memcpy instead of strncpy
unifdef: use memcpy instead of strncpy
Lior David (1):
wil6210: missing length check in wmi_set_ie
Martin Wilck (1):
scsi: scsi_devinfo: cleanly zero-pad devinfo strings
Masahiro Yamada (2):
reset: make device_reset_optional() really optional
reset: remove remaining WARN_ON() in <linux/reset.h>
Mathias Kresin (1):
MIPS: ralink: Fix mt7620 nd_sd pinmux
Michael Guralnik (1):
IB/mlx5: Avoid load failure due to unknown link width
Mike Kravetz (4):
mm/hugetlb.c: don't call region_abort if region_chg fails
hugetlbfs: fix offset overflow in hugetlbfs mmap
hugetlbfs: check for pgoff value overflow
hugetlbfs: fix bug in pgoff overflow checking
Nikolay Borisov (1):
btrfs: Always try all copies when reading extent buffers
Noah Westervelt (1):
Input: elan_i2c - add ACPI ID for Lenovo IdeaPad 330-15ARR
Patrick Gaskin (1):
Input: elan_i2c - add ELAN0620 to the ACPI table
Pavel Tikhomirov (1):
mm: cleancache: fix corruption on missed inode invalidation
Philipp Zabel (2):
reset: fix optional reset_control_get stubs to return NULL
reset: add exported __reset_control_get, return NULL if optional
Qu Wenruo (13):
btrfs: Verify that every chunk has corresponding block group at mount time
btrfs: Refactor check_leaf function for later expansion
btrfs: Check if item pointer overlaps with the item itself
btrfs: Add sanity check for EXTENT_DATA when reading out leaf
btrfs: Add checker for EXTENT_CSUM
btrfs: Move leaf and node validation checker to tree-checker.c
btrfs: tree-checker: Enhance btrfs_check_node output
btrfs: tree-checker: Fix false panic for sanity test
btrfs: tree-checker: Add checker for dir item
btrfs: tree-checker: Verify block_group_item
btrfs: tree-checker: Detect invalid and empty essential trees
btrfs: Check that each block group has corresponding chunk at mount time
btrfs: tree-checker: Check level for leaves and nodes
Ramiro Oliveira (1):
reset: make optional functions really optional
Sagi Grimberg (1):
iser: set sector for ambiguous mr status errors
Sam Bobroff (1):
drm/ast: Fix incorrect free on ioregs
Sergio Correia (1):
drm: set is_master to 0 upon drm_new_set_master() failure
Shaokun Zhang (1):
btrfs: tree-checker: Fix misleading group system information
Stephen Rothwell (1):
disable stringop truncation warnings for now
Sultan Alsawaf (1):
ip_tunnel: Fix name string concatenate in __ip_tunnel_create()
Takashi Iwai (1):
ALSA: trident: Suppress gcc string warning
Todd Kjos (1):
binder: fix proc->files use-after-free
Wei Wang (1):
svm: Add mutex_lock to protect apic_access_page_done on AMD systems
Xiongfeng Wang (1):
Kbuild: suppress packed-not-aligned warning for default setting only
Yunlei He (2):
f2fs: fix a panic caused by NULL flush_cmd_control
f2fs: check blkaddr more accuratly before issue a bio
Greg KH
maintainerMakefile +4 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 143 +SUBLEVEL = 144 EXTRAVERSION = NAME = Roaring Lionus
@@ -802,6 +802,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) # disable pointer signed / unsigned warnings in gcc 4.0 KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign) +# disable stringop warnings in gcc 8+ +KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation) + # disable invalid "can't wrap" optimizations for signed / pointers KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
arch/arc/Kconfig +1 -1
@@ -105,7 +105,7 @@ endmenu choice prompt "ARC Instruction Set" - default ISA_ARCOMPACT + default ISA_ARCV2 config ISA_ARCOMPACT bool "ARCompact ISA"
arch/arc/Makefile +1 -1
@@ -8,7 +8,7 @@ UTS_MACHINE := arc -KBUILD_DEFCONFIG := nsim_700_defconfig +KBUILD_DEFCONFIG := nsim_hs_defconfig cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__ cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
arch/arc/configs/axs101_defconfig +2 -0
@@ -15,6 +15,7 @@ CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set # CONFIG_SLUB_DEBUG is not set # CONFIG_COMPAT_BRK is not set +CONFIG_ISA_ARCOMPACT=y CONFIG_MODULES=y CONFIG_MODULE_FORCE_LOAD=y CONFIG_MODULE_UNLOAD=y
@@ -96,6 +97,7 @@ CONFIG_VFAT_FS=y CONFIG_NTFS_FS=y CONFIG_TMPFS=y CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y # CONFIG_ENABLE_WARN_DEPRECATED is not set
arch/arc/configs/axs103_defconfig +1 -0
@@ -97,6 +97,7 @@ CONFIG_VFAT_FS=y CONFIG_NTFS_FS=y CONFIG_TMPFS=y CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y # CONFIG_ENABLE_WARN_DEPRECATED is not set
arch/arc/configs/axs103_smp_defconfig +1 -0
@@ -98,6 +98,7 @@ CONFIG_VFAT_FS=y CONFIG_NTFS_FS=y CONFIG_TMPFS=y CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y # CONFIG_ENABLE_WARN_DEPRECATED is not set
arch/arc/configs/nps_defconfig +2 -0
@@ -15,6 +15,7 @@ CONFIG_SYSCTL_SYSCALL=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_COMPAT_BRK is not set +CONFIG_ISA_ARCOMPACT=y CONFIG_KPROBES=y CONFIG_MODULES=y CONFIG_MODULE_FORCE_LOAD=y
@@ -75,6 +76,7 @@ CONFIG_PROC_KCORE=y CONFIG_TMPFS=y # CONFIG_MISC_FILESYSTEMS is not set CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y CONFIG_ROOT_NFS=y CONFIG_DEBUG_INFO=y # CONFIG_ENABLE_WARN_DEPRECATED is not set
arch/arc/configs/nsim_700_defconfig +1 -0
@@ -16,6 +16,7 @@ CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_SLUB_DEBUG is not set # CONFIG_COMPAT_BRK is not set +CONFIG_ISA_ARCOMPACT=y CONFIG_KPROBES=y CONFIG_MODULES=y # CONFIG_LBDAF is not set
arch/arc/configs/nsimosci_defconfig +2 -0
@@ -16,6 +16,7 @@ CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_SLUB_DEBUG is not set # CONFIG_COMPAT_BRK is not set +CONFIG_ISA_ARCOMPACT=y CONFIG_KPROBES=y CONFIG_MODULES=y # CONFIG_LBDAF is not set
@@ -70,5 +71,6 @@ CONFIG_EXT2_FS_XATTR=y CONFIG_TMPFS=y # CONFIG_MISC_FILESYSTEMS is not set CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set
arch/arc/configs/nsimosci_hs_defconfig +1 -0
@@ -69,5 +69,6 @@ CONFIG_EXT2_FS_XATTR=y CONFIG_TMPFS=y # CONFIG_MISC_FILESYSTEMS is not set CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set
arch/arc/configs/nsimosci_hs_smp_defconfig +1 -0
@@ -80,6 +80,7 @@ CONFIG_EXT2_FS_XATTR=y CONFIG_TMPFS=y # CONFIG_MISC_FILESYSTEMS is not set CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_FTRACE=y
arch/arc/configs/tb10x_defconfig +1 -0
@@ -19,6 +19,7 @@ CONFIG_KALLSYMS_ALL=y # CONFIG_AIO is not set CONFIG_EMBEDDED=y # CONFIG_COMPAT_BRK is not set +CONFIG_ISA_ARCOMPACT=y CONFIG_SLAB=y CONFIG_MODULES=y CONFIG_MODULE_FORCE_LOAD=y
arch/arc/configs/vdk_hs38_defconfig +1 -0
@@ -88,6 +88,7 @@ CONFIG_NTFS_FS=y CONFIG_TMPFS=y CONFIG_JFFS2_FS=y CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y # CONFIG_ENABLE_WARN_DEPRECATED is not set
arch/arc/configs/vdk_hs38_smp_defconfig +1 -0
@@ -87,6 +87,7 @@ CONFIG_NTFS_FS=y CONFIG_TMPFS=y CONFIG_JFFS2_FS=y CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y # CONFIG_ENABLE_WARN_DEPRECATED is not set
arch/mips/include/asm/syscall.h +1 -1
@@ -51,7 +51,7 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg,#ifdef CONFIG_64BIT case 4 :case 5 :case 6 :case 7 :#ifdef CONFIG_MIPS32_O32 -if (test_thread_flag (TIF_32BIT_REGS )) +if (test_tsk_thread_flag (task,TIF_32BIT_REGS ))return get_user (*arg, (int *)usp + n); else#endif
arch/mips/ralink/mt7620.c +1 -1
@@ -81,7 +81,7 @@ static struct rt2880_pmx_func pcie_rst_grp[] = { };static struct rt2880_pmx_func nd_sd_grp[] = {FUNC ("nand" ,MT7620_GPIO_MODE_NAND ,45 ,15 ), -FUNC ("sd" ,MT7620_GPIO_MODE_SD ,45 ,15 ) +FUNC ("sd" ,MT7620_GPIO_MODE_SD ,47 ,13 ) };static struct rt2880_pmx_group mt7620a_pinmux_data[] = {
arch/x86/include/asm/suspend_64.h +2 -3
@@ -42,8 +42,7 @@ struct saved_context { set_debugreg((thread)->debugreg##register, register)/* routines for saving/restoring kernel state */ -extern int acpi_save_state_mem (void ); -extern char core_restore_code; -extern char restore_registers; +extern char core_restore_code[]; +extern char restore_registers[];#endif /* _ASM_X86_SUSPEND_64_H */
arch/x86/kvm/svm.c +11 -8
@@ -1333,20 +1333,23 @@ static u64 *avic_get_physical_id_entry(struct kvm_vcpu *vcpu, int index)static int avic_init_access_page (struct kvm_vcpu *vcpu) {struct kvm *kvm = vcpu->kvm; -int ret; +int ret =0 ; +mutex_lock (&kvm->slots_lock);if (kvm->arch.apic_access_page_done) -return 0 ; + goto out; - ret =x86_set_memory_region (kvm, -APIC_ACCESS_PAGE_PRIVATE_MEMSLOT , -APIC_DEFAULT_PHYS_BASE , -PAGE_SIZE ); + ret =__x86_set_memory_region (kvm, +APIC_ACCESS_PAGE_PRIVATE_MEMSLOT , +APIC_DEFAULT_PHYS_BASE , +PAGE_SIZE );if (ret) -return ret; + goto out; kvm->arch.apic_access_page_done = true; -return 0 ; +out: +mutex_unlock (&kvm->slots_lock); +return ret; }static int avic_init_backing_page (struct kvm_vcpu *vcpu)
arch/x86/power/hibernate_64.c +3 -3
@@ -126,7 +126,7 @@ static int relocate_restore_code(void)if (!relocated_restore_code)return -ENOMEM ; -memcpy ((void *)relocated_restore_code, &core_restore_code,PAGE_SIZE ); +memcpy ((void *)relocated_restore_code, core_restore_code,PAGE_SIZE );/* Make the page containing the relocated code executable */ pgd = (pgd_t *)__va (read_cr3 ()) +pgd_index (relocated_restore_code);
@@ -197,8 +197,8 @@ int arch_hibernation_header_save(void *addr, unsigned int max_size)if (max_size <sizeof (struct restore_data_record ))return -EOVERFLOW ; - rdr->jump_address = (unsigned long )&restore_registers; - rdr->jump_address_phys =__pa_symbol (&restore_registers); + rdr->jump_address = (unsigned long )restore_registers; + rdr->jump_address_phys =__pa_symbol (restore_registers); rdr->cr3 = restore_cr3; rdr->magic =RESTORE_MAGIC ;return 0 ;
drivers/android/binder.c +29 -12
101 lines not on this page · raw message
drivers/gpu/drm/ast/ast_main.c +2 -1
@@ -556,7 +556,8 @@ int ast_driver_unload(struct drm_device *dev)drm_mode_config_cleanup (dev);ast_mm_fini (ast); -pci_iounmap (dev->pdev, ast->ioregs); +if (ast->ioregs != ast->regs +AST_IO_MM_OFFSET ) +pci_iounmap (dev->pdev, ast->ioregs);pci_iounmap (dev->pdev, ast->regs);kfree (ast);return 0 ;
drivers/gpu/drm/drm_auth.c +2 -0
@@ -133,6 +133,7 @@ static int drm_new_set_master(struct drm_device *dev, struct drm_file *fpriv)lockdep_assert_held_once (&dev->master_mutex); +WARN_ON (fpriv->is_master); old_master = fpriv->master; fpriv->master =drm_master_create (dev);if (!fpriv->master) {
@@ -161,6 +162,7 @@ static int drm_new_set_master(struct drm_device *dev, struct drm_file *fpriv)/* drop references and restore old master on failure */ drm_master_put (&fpriv->master); fpriv->master = old_master; + fpriv->is_master =0 ;return ret; }
drivers/gpu/drm/gma500/mdfld_intel_display.c +1 -1
@@ -99,7 +99,7 @@ void mdfldWaitForPipeEnable(struct drm_device *dev, int pipe)/* Wait for for the pipe enable to take effect. */ for (count =0 ; count <COUNT_MAX ; count++) { temp =REG_READ (map->conf); -if ((temp &PIPEACONF_PIPE_STATE ) ==1 ) +if (temp &PIPEACONF_PIPE_STATE )break ; } }
drivers/gpu/drm/mediatek/mtk_hdmi.c +3 -2
@@ -1446,8 +1446,7 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, }/* The CEC module handles HDMI hotplug detection */ - cec_np =of_find_compatible_node (np->parent,NULL , -"mediatek,mt8173-cec" ); + cec_np =of_get_compatible_child (np->parent,"mediatek,mt8173-cec" );if (!cec_np) {dev_err (dev,"Failed to find CEC node\n" );return -EINVAL ;
@@ -1457,8 +1456,10 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,if (!cec_pdev) {dev_err (hdmi->dev,"Waiting for CEC device %s\n" , cec_np->full_name); +of_node_put (cec_np);return -EPROBE_DEFER ; } +of_node_put (cec_np); hdmi->cec_dev = &cec_pdev->dev;/*
drivers/infiniband/hw/mlx5/main.c +11 -18
@@ -710,31 +710,26 @@ enum mlx5_ib_width { MLX5_IB_WIDTH_12X = 1 << 4 }; -static int translate_active_width (struct ib_device *ibdev,u8 active_width, +static void translate_active_width (struct ib_device *ibdev,u8 active_width,u8 *ib_width) {struct mlx5_ib_dev *dev =to_mdev (ibdev); -int err =0 ; -if (active_width &MLX5_IB_WIDTH_1X ) { +if (active_width &MLX5_IB_WIDTH_1X ) *ib_width =IB_WIDTH_1X ; - }else if (active_width &MLX5_IB_WIDTH_2X ) { -mlx5_ib_dbg (dev,"active_width %d is not supported by IB spec\n" , - (int )active_width); - err = -EINVAL ; - }else if (active_width &MLX5_IB_WIDTH_4X ) { +else if (active_width &MLX5_IB_WIDTH_4X ) *ib_width =IB_WIDTH_4X ; - }else if (active_width &MLX5_IB_WIDTH_8X ) { +else if (active_width &MLX5_IB_WIDTH_8X ) *ib_width =IB_WIDTH_8X ; - }else if (active_width &MLX5_IB_WIDTH_12X ) { +else if (active_width &MLX5_IB_WIDTH_12X ) *ib_width =IB_WIDTH_12X ; - }else { -mlx5_ib_dbg (dev,"Invalid active_width %d\n" , +else { +mlx5_ib_dbg (dev,"Invalid active_width %d, setting width to default value: 4x\n" , (int )active_width); - err = -EINVAL ; + *ib_width =IB_WIDTH_4X ; } -return err; +return ; }static int mlx5_mtu_to_ib_mtu (int mtu)
@@ -842,10 +837,8 @@ static int mlx5_query_hca_port(struct ib_device *ibdev, u8 port,if (err) goto out; - err =translate_active_width (ibdev, ib_link_width_oper, - &props->active_width); -if (err) - goto out; +translate_active_width (ibdev, ib_link_width_oper, &props->active_width); + err =mlx5_query_port_ib_proto_oper (mdev, &props->active_speed, port);if (err) goto out;
drivers/infiniband/ulp/iser/iser_verbs.c +3 -4
@@ -1110,7 +1110,9 @@ u8 iser_check_task_pi_status(struct iscsi_iser_task *iser_task, IB_MR_CHECK_SIG_STATUS, &mr_status);if (ret) {pr_err ("ib_check_mr_status failed, ret %d\n" , ret); - goto err; +/* Not a lot we can do, return ambiguous guard error */ + *sector =0 ; +return 0x1 ; }if (mr_status.fail_status &IB_MR_CHECK_SIG_STATUS ) {
@@ -1138,9 +1140,6 @@ u8 iser_check_task_pi_status(struct iscsi_iser_task *iser_task, }return 0 ; -err: -/* Not alot we can do here, return ambiguous guard error */ -return 0x1 ; }void iser_err_comp (struct ib_wc *wc,const char *type)
drivers/input/joystick/xpad.c +6 -10
@@ -483,18 +483,18 @@ static const u8 xboxone_hori_init[] = { };/* -* This packet is required for some of the PDP pads to start +* This packet is required for most (all?) of the PDP pads to start * sending input reports. These pads include: (0x0e6f:0x02ab), -* (0x0e6f:0x02a4). +* (0x0e6f:0x02a4), (0x0e6f:0x02a6). */ static const u8 xboxone_pdp_init1[] = {0x0a ,0x20 ,0x00 ,0x03 ,0x00 ,0x01 ,0x14 };/* -* This packet is required for some of the PDP pads to start +* This packet is required for most (all?) of the PDP pads to start * sending input reports. These pads include: (0x0e6f:0x02ab), -* (0x0e6f:0x02a4). +* (0x0e6f:0x02a4), (0x0e6f:0x02a6). */ static const u8 xboxone_pdp_init2[] = {0x06 ,0x20 ,0x00 ,0x02 ,0x01 ,0x00
@@ -530,12 +530,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = {XBOXONE_INIT_PKT (0x0e6f ,0x0165 , xboxone_hori_init),XBOXONE_INIT_PKT (0x0f0d ,0x0067 , xboxone_hori_init),XBOXONE_INIT_PKT (0x0000 ,0x0000 , xboxone_fw2015_init), -XBOXONE_INIT_PKT (0x0e6f ,0x02ab , xboxone_pdp_init1), -XBOXONE_INIT_PKT (0x0e6f ,0x02ab , xboxone_pdp_init2), -XBOXONE_INIT_PKT (0x0e6f ,0x02a4 , xboxone_pdp_init1), -XBOXONE_INIT_PKT (0x0e6f ,0x02a4 , xboxone_pdp_init2), -XBOXONE_INIT_PKT (0x0e6f ,0x02a6 , xboxone_pdp_init1), -XBOXONE_INIT_PKT (0x0e6f ,0x02a6 , xboxone_pdp_init2), +XBOXONE_INIT_PKT (0x0e6f ,0x0000 , xboxone_pdp_init1), +XBOXONE_INIT_PKT (0x0e6f ,0x0000 , xboxone_pdp_init2),XBOXONE_INIT_PKT (0x24c6 ,0x541a , xboxone_rumblebegin_init),XBOXONE_INIT_PKT (0x24c6 ,0x542a , xboxone_rumblebegin_init), XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),
drivers/input/keyboard/matrix_keypad.c +14 -9
@@ -405,7 +405,7 @@ matrix_keypad_parse_dt(struct device *dev)struct matrix_keypad_platform_data *pdata;struct device_node *np = dev->of_node;unsigned int *gpios; -int i, nrow, ncol; +int ret, i, nrow, ncol;if (!np) {dev_err (dev,"device lacks DT data\n" );
@@ -447,12 +447,19 @@ matrix_keypad_parse_dt(struct device *dev)return ERR_PTR (-ENOMEM ); } -for (i =0 ; i < pdata->num_row_gpios; i++) - gpios[i] =of_get_named_gpio (np,"row-gpios" , i); +for (i =0 ; i < nrow; i++) { + ret =of_get_named_gpio (np,"row-gpios" , i); +if (ret <0 ) +return ERR_PTR (ret); + gpios[i] = ret; + } -for (i =0 ; i < pdata->num_col_gpios; i++) - gpios[pdata->num_row_gpios + i] = -of_get_named_gpio (np,"col-gpios" , i); +for (i =0 ; i < ncol; i++) { + ret =of_get_named_gpio (np,"col-gpios" , i); +if (ret <0 ) +return ERR_PTR (ret); + gpios[nrow + i] = ret; + } pdata->row_gpios = gpios; pdata->col_gpios = &gpios[pdata->num_row_gpios];
@@ -479,10 +486,8 @@ static int matrix_keypad_probe(struct platform_device *pdev) pdata =dev_get_platdata (&pdev->dev);if (!pdata) { pdata =matrix_keypad_parse_dt (&pdev->dev); -if (IS_ERR (pdata)) { -dev_err (&pdev->dev,"no platform data defined\n" ); +if (IS_ERR (pdata))return PTR_ERR (pdata); - } }else if (!pdata->keymap_data) {dev_err (&pdev->dev,"no keymap data defined\n" );return -EINVAL ;
drivers/input/mouse/elan_i2c_core.c +3 -0
@@ -1253,6 +1253,9 @@ static const struct acpi_device_id elan_acpi_id[] = { { "ELAN0618", 0 }, { "ELAN061C", 0 }, { "ELAN061D", 0 }, + { "ELAN061E", 0 }, + { "ELAN0620", 0 }, + { "ELAN0621", 0 }, { "ELAN0622", 0 }, { "ELAN1000", 0 }, { }
drivers/net/ethernet/qlogic/qed/qed_debug.c +4 -4
@@ -3039,10 +3039,10 @@ static u32 qed_grc_dump_big_ram(struct qed_hwfn *p_hwfn, s_big_ram_defs[big_ram_id].num_of_blocks[dev_data->chip_id]; ram_size = total_blocks *BIG_RAM_BLOCK_SIZE_DWORDS ; -strncpy (type_name, s_big_ram_defs[big_ram_id].instance_name, -strlen (s_big_ram_defs[big_ram_id].instance_name)); -strncpy (mem_name, s_big_ram_defs[big_ram_id].instance_name, -strlen (s_big_ram_defs[big_ram_id].instance_name)); +strscpy (type_name, s_big_ram_defs[big_ram_id].instance_name, +sizeof (type_name)); +strscpy (mem_name, s_big_ram_defs[big_ram_id].instance_name, +sizeof (mem_name));/* Dump memory header */ offset += qed_grc_dump_mem_hdr(p_hwfn,
drivers/net/wireless/ath/wil6210/wmi.c +7 -1
@@ -1302,8 +1302,14 @@ int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie) };int rc;u16 len =sizeof (struct wmi_set_appie_cmd ) + ie_len; -struct wmi_set_appie_cmd *cmd =kzalloc (len,GFP_KERNEL ); +struct wmi_set_appie_cmd *cmd; +if (len < ie_len) { + rc = -EINVAL ; + goto out; + } + + cmd =kzalloc (len,GFP_KERNEL );if (!cmd) { rc = -ENOMEM ; goto out;
drivers/reset/core.c +58 -21
196 lines not on this page · raw message
drivers/scsi/bfa/bfa_fcbuild.c +4 -4
@@ -1250,8 +1250,8 @@ fc_rspnid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id,memset (rspnid,0 ,sizeof (struct fcgs_rspnid_req_s )); rspnid->dap = s_id; - rspnid->spn_len = (u8 )strlen ((char *)name); -strncpy ((char *)rspnid->spn, (char *)name, rspnid->spn_len); +strlcpy (rspnid->spn, name,sizeof (rspnid->spn)); + rspnid->spn_len = (u8 )strlen (rspnid->spn);return sizeof (struct fcgs_rspnid_req_s ) +sizeof (struct ct_hdr_s ); }
@@ -1271,8 +1271,8 @@ fc_rsnn_nn_build(struct fchs_s *fchs, void *pyld, u32 s_id,memset (rsnn_nn,0 ,sizeof (struct fcgs_rsnn_nn_req_s )); rsnn_nn->node_name = node_name; - rsnn_nn->snn_len = (u8 )strlen ((char *)name); -strncpy ((char *)rsnn_nn->snn, (char *)name, rsnn_nn->snn_len); +strlcpy (rsnn_nn->snn, name,sizeof (rsnn_nn->snn)); + rsnn_nn->snn_len = (u8 )strlen (rsnn_nn->snn);return sizeof (struct fcgs_rsnn_nn_req_s ) +sizeof (struct ct_hdr_s ); }
drivers/scsi/bfa/bfa_fcs.c +39 -39
112 lines not on this page · raw message
drivers/scsi/bfa/bfa_fcs_lport.c +24 -38
134 lines not on this page · raw message
drivers/scsi/bfa/bfa_ioc.c +1 -1
@@ -2803,7 +2803,7 @@ void bfa_ioc_get_adapter_manufacturer(struct bfa_ioc_s *ioc, char *manufacturer) { memset((void *)manufacturer, 0, BFA_ADAPTER_MFG_NAME_LEN); -strncpy (manufacturer,BFA_MFG_NAME ,BFA_ADAPTER_MFG_NAME_LEN ); +strlcpy (manufacturer,BFA_MFG_NAME ,BFA_ADAPTER_MFG_NAME_LEN ); }void
drivers/scsi/bfa/bfa_svc.c +2 -2
@@ -366,8 +366,8 @@ bfa_plog_str(struct bfa_plog_s *plog, enum bfa_plog_mid mid, lp.eid = event; lp.log_type =BFA_PL_LOG_TYPE_STRING ; lp.misc = misc; -strncpy (lp.log_entry.string_log, log_str, -BFA_PL_STRING_LOG_SZ -1 ); +strlcpy (lp.log_entry.string_log, log_str, +BFA_PL_STRING_LOG_SZ ); lp.log_entry.string_log[BFA_PL_STRING_LOG_SZ -1 ] ='\0' ;bfa_plog_add (plog, &lp); }
drivers/scsi/bfa/bfad.c +10 -10
@@ -983,20 +983,20 @@ bfad_start_ops(struct bfad_s *bfad) {/* Fill the driver_info info to fcs*/ memset (&driver_info,0 ,sizeof (driver_info)); -strncpy (driver_info.version,BFAD_DRIVER_VERSION , -sizeof (driver_info.version) -1 ); +strlcpy (driver_info.version,BFAD_DRIVER_VERSION , +sizeof (driver_info.version));if (host_name) -strncpy (driver_info.host_machine_name, host_name, -sizeof (driver_info.host_machine_name) -1 ); +strlcpy (driver_info.host_machine_name, host_name, +sizeof (driver_info.host_machine_name));if (os_name) -strncpy (driver_info.host_os_name, os_name, -sizeof (driver_info.host_os_name) -1 ); +strlcpy (driver_info.host_os_name, os_name, +sizeof (driver_info.host_os_name));if (os_patch) -strncpy (driver_info.host_os_patch, os_patch, -sizeof (driver_info.host_os_patch) -1 ); +strlcpy (driver_info.host_os_patch, os_patch, +sizeof (driver_info.host_os_patch)); -strncpy (driver_info.os_device_name, bfad->pci_name, -sizeof (driver_info.os_device_name) -1 ); +strlcpy (driver_info.os_device_name, bfad->pci_name, +sizeof (driver_info.os_device_name));/* FCS driver info init */ spin_lock_irqsave (&bfad->bfad_lock, flags);
drivers/scsi/bfa/bfad_attr.c +1 -1
@@ -843,7 +843,7 @@ bfad_im_symbolic_name_show(struct device *dev, struct device_attribute *attr,char symname[BFA_SYMNAME_MAXLEN ];bfa_fcs_lport_get_attr (&bfad->bfa_fcs.fabric.bport, &port_attr); -strncpy (symname, port_attr.port_cfg.sym_name.symname, +strlcpy (symname, port_attr.port_cfg.sym_name.symname,BFA_SYMNAME_MAXLEN );return snprintf (buf,PAGE_SIZE ,"%s\n" , symname); }
drivers/scsi/bfa/bfad_bsg.c +3 -3
@@ -127,7 +127,7 @@ bfad_iocmd_ioc_get_attr(struct bfad_s *bfad, void *cmd)/* fill in driver attr info */ strcpy (iocmd->ioc_attr.driver_attr.driver,BFAD_DRIVER_NAME ); -strncpy (iocmd->ioc_attr.driver_attr.driver_ver, +strlcpy (iocmd->ioc_attr.driver_attr.driver_ver,BFAD_DRIVER_VERSION ,BFA_VERSION_LEN );strcpy (iocmd->ioc_attr.driver_attr.fw_ver, iocmd->ioc_attr.adapter_attr.fw_ver);
@@ -315,9 +315,9 @@ bfad_iocmd_port_get_attr(struct bfad_s *bfad, void *cmd) iocmd->attr.port_type = port_attr.port_type; iocmd->attr.loopback = port_attr.loopback; iocmd->attr.authfail = port_attr.authfail; -strncpy (iocmd->attr.port_symname.symname, +strlcpy (iocmd->attr.port_symname.symname, port_attr.port_cfg.sym_name.symname, -sizeof (port_attr.port_cfg.sym_name.symname)); +sizeof (iocmd->attr.port_symname.symname)); iocmd->status =BFA_STATUS_OK ;return 0 ;
drivers/scsi/csiostor/csio_lnode.c +26 -17
109 lines not on this page · raw message
drivers/scsi/scsi_devinfo.c +7 -15
@@ -33,7 +33,6 @@ struct scsi_dev_info_list_table { }; -static const char spaces[] =" " ;/* 16 of them */ static unsigned scsi_default_dev_flags;static LIST_HEAD (scsi_dev_info_list);static char scsi_dev_flags[256 ];
@@ -298,20 +297,13 @@ static void scsi_strcpy_devinfo(char *name, char *to, size_t to_length,size_t from_length; from_length =strlen (from); -strncpy (to, from,min (to_length, from_length)); -if (from_length < to_length) { -if (compatible) { -/* -* NUL terminate the string if it is short. -*/ - to[from_length] ='\0' ; - }else { -/* -* space pad the string if it is short. -*/ -strncpy (&to[from_length], spaces, - to_length - from_length); - } +/* this zero-pads the destination */ +strncpy (to, from, to_length); +if (from_length < to_length && !compatible) { +/* +* space pad the string if it is short. +*/ +memset (&to[from_length],' ' , to_length - from_length); }if (from_length > to_length) printk(KERN_WARNING "%s: %s string '%s' is too long\n",
drivers/staging/rts5208/sd.c +0 -6
@@ -4110,12 +4110,6 @@ int ext_sd_send_cmd_get_rsp(struct rtsx_chip *chip, u8 cmd_idx,rtsx_trace (chip);return STATUS_FAIL ; } - - }else if (rsp_type ==SD_RSP_TYPE_R0 ) { -if ((ptr[3 ] &0x1E ) !=0x03 ) { -rtsx_trace (chip); -return STATUS_FAIL ; - } } } }
drivers/tty/serial/kgdboc.c +21 -22
66 lines not on this page · raw message
drivers/usb/gadget/udc/dummy_hcd.c +4 -5
@@ -379,11 +379,10 @@ static void set_link_state_by_speed(struct dummy_hcd *dum_hcd) USB_PORT_STAT_CONNECTION) == 0) dum_hcd->port_status |= (USB_PORT_STAT_C_CONNECTION <<16 ); -if ((dum_hcd->port_status & -USB_PORT_STAT_ENABLE ) ==1 && - (dum_hcd->port_status & -USB_SS_PORT_LS_U0 ) ==1 && - dum_hcd->rh_state !=DUMMY_RH_SUSPENDED ) +if ((dum_hcd->port_status &USB_PORT_STAT_ENABLE ) && + (dum_hcd->port_status & +USB_PORT_STAT_LINK_STATE ) ==USB_SS_PORT_LS_U0 && + dum_hcd->rh_state !=DUMMY_RH_SUSPENDED ) dum_hcd->active =1 ; } }else {
fs/btrfs/Makefile +1 -1
@@ -9,7 +9,7 @@ btrfs-y += super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \ export.o tree-log.o free-space-cache.o zlib.o lzo.o \ compression.o delayed-ref.o relocation.o delayed-inode.o scrub.o \ reada.o backref.o ulist.o qgroup.o send.o dev-replace.o raid56.o \ - uuid-tree.o props.o hash.o free-space-tree.o + uuid-tree.o props.o hash.o free-space-tree.o tree-checker.o btrfs-$(CONFIG_BTRFS_FS_POSIX_ACL) += acl.o btrfs-$(CONFIG_BTRFS_FS_CHECK_INTEGRITY) += check-integrity.o
fs/btrfs/ctree.h +66 -62
354 lines not on this page · raw message
fs/btrfs/disk-io.c +11 -151
204 lines not on this page · raw message
fs/btrfs/extent-tree.c +84 -2
111 lines not on this page · raw message
fs/btrfs/extent_io.c +11 -13
@@ -5442,9 +5442,8 @@ int read_extent_buffer_pages(struct extent_io_tree *tree,return ret; } -void read_extent_buffer (struct extent_buffer *eb,void *dstv, -unsigned long start, -unsigned long len) +void read_extent_buffer (const struct extent_buffer *eb,void *dstv, +unsigned long start,unsigned long len) {size_t cur;size_t offset;
@@ -5473,9 +5472,9 @@ void read_extent_buffer(struct extent_buffer *eb, void *dstv, } } -int read_extent_buffer_to_user (struct extent_buffer *eb,void __user *dstv, -unsigned long start, -unsigned long len) +int read_extent_buffer_to_user (const struct extent_buffer *eb, +void __user *dstv, +unsigned long start,unsigned long len) {size_t cur;size_t offset;
@@ -5515,10 +5514,10 @@ int read_extent_buffer_to_user(struct extent_buffer *eb, void __user *dstv,* return 1 if the item spans two pages. * return -EINVAL otherwise. */ -int map_private_extent_buffer (struct extent_buffer *eb,unsigned long start, -unsigned long min_len,char **map, -unsigned long *map_start, -unsigned long *map_len) +int map_private_extent_buffer (const struct extent_buffer *eb, +unsigned long start,unsigned long min_len, +char **map,unsigned long *map_start, +unsigned long *map_len) {size_t offset = start & (PAGE_SIZE -1 );char *kaddr;
@@ -5552,9 +5551,8 @@ int map_private_extent_buffer(struct extent_buffer *eb, unsigned long start,return 0 ; } -int memcmp_extent_buffer (struct extent_buffer *eb,const void *ptrv, -unsigned long start, -unsigned long len) +int memcmp_extent_buffer (const struct extent_buffer *eb,const void *ptrv, +unsigned long start,unsigned long len) {size_t cur;size_t offset;
fs/btrfs/extent_io.h +9 -10
@@ -396,14 +396,13 @@ static inline void extent_buffer_get(struct extent_buffer *eb)atomic_inc (&eb->refs); } -int memcmp_extent_buffer (struct extent_buffer *eb,const void *ptrv, -unsigned long start, -unsigned long len); -void read_extent_buffer (struct extent_buffer *eb,void *dst, +int memcmp_extent_buffer (const struct extent_buffer *eb,const void *ptrv, +unsigned long start,unsigned long len); +void read_extent_buffer (const struct extent_buffer *eb,void *dst,unsigned long start,unsigned long len); -int read_extent_buffer_to_user (struct extent_buffer *eb,void __user *dst, -unsigned long start, +int read_extent_buffer_to_user (const struct extent_buffer *eb, +void __user *dst,unsigned long start,unsigned long len);void write_extent_buffer (struct extent_buffer *eb,const void *src,unsigned long start,unsigned long len);
@@ -428,10 +427,10 @@ void set_extent_buffer_uptodate(struct extent_buffer *eb);void clear_extent_buffer_uptodate (struct extent_buffer *eb);int extent_buffer_uptodate (struct extent_buffer *eb);int extent_buffer_under_io (struct extent_buffer *eb); -int map_private_extent_buffer (struct extent_buffer *eb,unsigned long offset, -unsigned long min_len,char **map, -unsigned long *map_start, -unsigned long *map_len); +int map_private_extent_buffer (const struct extent_buffer *eb, +unsigned long offset,unsigned long min_len, +char **map,unsigned long *map_start, +unsigned long *map_len);void extent_range_clear_dirty_for_io (struct inode *inode,u64 start,u64 end);void extent_range_redirty_for_io (struct inode *inode,u64 start,u64 end); void extent_clear_unlock_delalloc(struct inode *inode, u64 start, u64 end,
fs/btrfs/free-space-cache.c +2 -0
@@ -2464,6 +2464,7 @@ void btrfs_dump_free_space(struct btrfs_block_group_cache *block_group,struct rb_node *n;int count =0 ; +spin_lock (&ctl->tree_lock);for (n =rb_first (&ctl->free_space_offset); n; n =rb_next (n)) { info = rb_entry(n, struct btrfs_free_space, offset_index);if (info->bytes >= bytes && !block_group->ro)
@@ -2473,6 +2474,7 @@ void btrfs_dump_free_space(struct btrfs_block_group_cache *block_group, info->offset, info->bytes, (info->bitmap) ? "yes" : "no"); } +spin_unlock (&ctl->tree_lock);btrfs_info (block_group->fs_info,"block group has cluster?: %s" ,list_empty (&block_group->cluster_list) ?"no" :"yes" ); btrfs_info(block_group->fs_info,
fs/btrfs/struct-funcs.c +5 -4
@@ -50,8 +50,8 @@ static inline void put_unaligned_le8(u8 val, void *p)*/ #define DEFINE_BTRFS_SETGET_BITS (bits) \ -u##bits btrfs_get_token_##bits(struct extent_buffer *eb, void *ptr, \ - unsigned long off, \ +u##bits btrfs_get_token_##bits(const struct extent_buffer *eb, \ + const void *ptr, unsigned long off, \ struct btrfs_map_token *token) \ { \ unsigned long part_offset = (unsigned long)ptr; \
@@ -90,7 +90,8 @@ u##bits btrfs_get_token_##bits(struct extent_buffer *eb, void *ptr, \return res; \ } \ void btrfs_set_token_##bits(struct extent_buffer *eb, \ - void *ptr, unsigned long off, u##bits val, \ + const void *ptr, unsigned long off, \ + u##bits val, \ struct btrfs_map_token *token) \ { \ unsigned long part_offset = (unsigned long)ptr; \
@@ -133,7 +134,7 @@ DEFINE_BTRFS_SETGET_BITS(16) DEFINE_BTRFS_SETGET_BITS(32) DEFINE_BTRFS_SETGET_BITS(64) -void btrfs_node_key (struct extent_buffer *eb, +void btrfs_node_key (const struct extent_buffer *eb,struct btrfs_disk_key *disk_key,int nr) {unsigned long ptr =btrfs_node_key_ptr_offset (nr);
fs/btrfs/tree-checker.c new file +649 -0
649 lines not on this page · raw message
fs/btrfs/tree-checker.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Copyright (C) Qu Wenruo 2017. All rights reserved. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public +* License v2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public +* License along with this program. +*/ + +#ifndef __BTRFS_TREE_CHECKER__ +#define __BTRFS_TREE_CHECKER__ + +#include "ctree.h" +#include "extent_io.h" + +/* +* Comprehensive leaf checker. +* Will check not only the item pointers, but also every possible member +* in item data. +*/ +int btrfs_check_leaf_full (struct btrfs_root *root,struct extent_buffer *leaf); + +/* +* Less strict leaf checker. +* Will only check item pointers, not reading item data. +*/ +int btrfs_check_leaf_relaxed (struct btrfs_root *root, +struct extent_buffer *leaf); +int btrfs_check_node (struct btrfs_root *root,struct extent_buffer *node); + +#endif
fs/btrfs/volumes.c +29 -1
@@ -4656,7 +4656,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,if (type &BTRFS_BLOCK_GROUP_DATA ) { max_stripe_size =SZ_1G ; - max_chunk_size =10 * max_stripe_size; + max_chunk_size =BTRFS_MAX_DATA_CHUNK_SIZE ;if (!devs_max) devs_max =BTRFS_MAX_DEVS (info->chunk_root); }else if (type &BTRFS_BLOCK_GROUP_METADATA ) {
@@ -6370,6 +6370,8 @@ static int btrfs_check_chunk_valid(struct btrfs_root *root,u16 num_stripes;u16 sub_stripes;u64 type; +u64 features; +bool mixed = false; length =btrfs_chunk_length (leaf, chunk); stripe_len =btrfs_chunk_stripe_len (leaf, chunk);
@@ -6410,6 +6412,32 @@ static int btrfs_check_chunk_valid(struct btrfs_root *root, btrfs_chunk_type(leaf, chunk));return -EIO ; } + +if ((type &BTRFS_BLOCK_GROUP_TYPE_MASK ) ==0 ) { +btrfs_err (root->fs_info,"missing chunk type flag: 0x%llx" , type); +return -EIO ; + } + +if ((type &BTRFS_BLOCK_GROUP_SYSTEM ) && + (type & (BTRFS_BLOCK_GROUP_METADATA |BTRFS_BLOCK_GROUP_DATA ))) { +btrfs_err (root->fs_info, +"system chunk with data or metadata type: 0x%llx" , type); +return -EIO ; + } + + features =btrfs_super_incompat_flags (root->fs_info->super_copy); +if (features &BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS ) + mixed = true; + +if (!mixed) { +if ((type &BTRFS_BLOCK_GROUP_METADATA ) && + (type &BTRFS_BLOCK_GROUP_DATA )) { +btrfs_err (root->fs_info, +"mixed chunk type in non-mixed mode: 0x%llx" , type); +return -EIO ; + } + } + if ((type & BTRFS_BLOCK_GROUP_RAID10 && sub_stripes != 2) || (type & BTRFS_BLOCK_GROUP_RAID1 && num_stripes < 1) || (type & BTRFS_BLOCK_GROUP_RAID5 && num_stripes < 2) ||
fs/btrfs/volumes.h +2 -0
@@ -24,6 +24,8 @@#include <linux/btrfs.h> #include "async-thread.h" +#define BTRFS_MAX_DATA_CHUNK_SIZE (10ULL * SZ_1G) +extern struct mutex uuid_mutex;#define BTRFS_STRIPE_LEN SZ_64K
fs/ceph/mds_client.c +13 -2
@@ -3983,14 +3983,24 @@ static struct ceph_auth_handshake *get_authorizer(struct ceph_connection *con,return auth; } +static int add_authorizer_challenge (struct ceph_connection *con, +void *challenge_buf,int challenge_buf_len) +{ +struct ceph_mds_session *s = con->private; +struct ceph_mds_client *mdsc = s->s_mdsc; +struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth; + +return ceph_auth_add_authorizer_challenge (ac, s->s_auth.authorizer, + challenge_buf, challenge_buf_len); +} -static int verify_authorizer_reply (struct ceph_connection *con,int len) +static int verify_authorizer_reply (struct ceph_connection *con) {struct ceph_mds_session *s = con->private;struct ceph_mds_client *mdsc = s->s_mdsc;struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth; -return ceph_auth_verify_authorizer_reply (ac, s->s_auth.authorizer, len); +return ceph_auth_verify_authorizer_reply (ac, s->s_auth.authorizer); }static int invalidate_authorizer (struct ceph_connection *con)
@@ -4046,6 +4056,7 @@ static const struct ceph_connection_operations mds_con_ops = { .put = con_put, .dispatch = dispatch, .get_authorizer = get_authorizer, + .add_authorizer_challenge = add_authorizer_challenge, .verify_authorizer_reply = verify_authorizer_reply, .invalidate_authorizer = invalidate_authorizer, .peer_reset = peer_reset,
fs/f2fs/checkpoint.c +37 -9
106 lines not on this page · raw message
fs/f2fs/data.c +28 -5
@@ -240,6 +240,10 @@ int f2fs_submit_page_bio(struct f2fs_io_info *fio)struct page *page = fio->encrypted_page ? fio->encrypted_page : fio->page; + if (!f2fs_is_valid_blkaddr(fio->sbi, fio->new_blkaddr,
Lines of this file are not shown. View the raw message.
fs/f2fs/f2fs.h +39 -2
41 lines not on this page · raw message
fs/f2fs/inode.c +63 -5
68 lines not on this page · raw message
fs/f2fs/node.c +51 -22
73 lines not on this page · raw message
fs/f2fs/segment.h +37 -11
48 lines not on this page · raw message
fs/f2fs/super.c +99 -8
107 lines not on this page · raw message
include/linux/reset.h +46 -46
92 lines not on this page · raw message
kernel/bpf/verifier.c +71 -19
90 lines not on this page · raw message
net/ceph/auth_x.c +183 -42
225 lines not on this page · raw message
net/ceph/messenger.c +59 -42
101 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.