Linux 5.10.197
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.197 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/arm64/silicon-errata.rst | 3 Makefile | 2 arch/arm/kernel/hw_breakpoint.c | 8 arch/arm64/kernel/hw_breakpoint.c | 4 arch/powerpc/platforms/pseries/ibmebus.c | 1 arch/x86/boot/compressed/ident_map_64.c | 8 arch/x86/include/asm/boot.h | 45 - crypto/lrw.c | 6 crypto/xts.c | 6 drivers/acpi/acpica/psopcode.c | 2 drivers/acpi/arm64/iort.c | 5 drivers/acpi/video_detect.c | 27 drivers/ata/ahci.c | 9 drivers/ata/libata-sata.c | 19 drivers/bus/ti-sysc.c | 2 drivers/char/tpm/tpm_tis_core.c | 15 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 18 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 drivers/gpu/drm/bridge/tc358762.c | 2 drivers/gpu/drm/exynos/exynos_drm_crtc.c | 5 drivers/gpu/drm/tiny/gm12u320.c | 10 drivers/i2c/busses/i2c-aspeed.c | 7 drivers/md/raid1.c | 3 drivers/media/pci/cx23885/cx23885-video.c | 2 drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 drivers/media/tuners/qt1010.c | 11 drivers/media/usb/dvb-usb-v2/af9035.c | 14 drivers/media/usb/dvb-usb-v2/anysee.c | 2 drivers/media/usb/dvb-usb-v2/az6007.c | 8 drivers/media/usb/dvb-usb-v2/gl861.c | 2 drivers/media/usb/dvb-usb/af9005.c | 5 drivers/media/usb/dvb-usb/dw2102.c | 24 drivers/mmc/host/sdhci-esdhc-imx.c | 7 drivers/mtd/nand/raw/brcmnand/brcmnand.c | 102 +- drivers/mtd/nand/raw/brcmnand/brcmnand.h | 29 drivers/net/ethernet/atheros/alx/ethtool.c | 5 drivers/net/wireless/ath/ath9k/ahb.c | 4 drivers/net/wireless/ath/ath9k/mac.h | 6 drivers/net/wireless/ath/ath9k/pci.c | 4 drivers/net/wireless/ath/ath9k/xmit.c | 4 drivers/net/wireless/ath/wil6210/txrx.c | 2 drivers/net/wireless/ath/wil6210/txrx.h | 6 drivers/net/wireless/ath/wil6210/txrx_edma.c | 2 drivers/net/wireless/ath/wil6210/txrx_edma.h | 6 drivers/net/wireless/mac80211_hwsim.c | 7 drivers/net/wireless/marvell/mwifiex/tdls.c | 9 drivers/perf/arm_smmuv3_pmu.c | 46 + drivers/scsi/lpfc/lpfc_debugfs.c | 10 drivers/scsi/megaraid/megaraid_sas.h | 2 drivers/scsi/megaraid/megaraid_sas_base.c | 21 drivers/scsi/pm8001/pm8001_init.c | 51 - drivers/scsi/qla2xxx/qla_dfs.c | 6 drivers/target/iscsi/iscsi_target_configfs.c | 54 - drivers/tty/serial/cpm_uart/cpm_uart_core.c | 13 drivers/usb/gadget/udc/fsl_qe_udc.c | 6 fs/attr.c | 20 fs/autofs/waitq.c | 3 fs/btrfs/ctree.h | 2 fs/btrfs/delayed-inode.c | 19 fs/btrfs/disk-io.c | 8 fs/btrfs/extent-tree.c | 5 fs/btrfs/ioctl.c | 8 fs/btrfs/volumes.c | 8 fs/btrfs/volumes.h | 3 fs/ext2/xattr.c | 4 fs/ext4/namei.c | 26 fs/jfs/jfs_dmap.c | 1 fs/jfs/jfs_imap.c | 1 fs/locks.c | 2 fs/nfsd/nfs4proc.c | 4 fs/overlayfs/file.c | 9 fs/proc/base.c | 46 + fs/tracefs/inode.c | 3 include/linux/acpi_iort.h | 1 include/linux/libata.h | 4 include/linux/perf_event.h | 22 include/linux/sched/task.h | 28 include/uapi/linux/netfilter_bridge/ebtables.h | 14 kernel/fork.c | 8 kernel/rcu/rcuscale.c | 2 kernel/scftorture.c | 6 kernel/trace/trace.c | 26 lib/kobject.c | 5 lib/mpi/mpi-cmp.c | 8 mm/filemap.c | 3 net/bridge/netfilter/ebtables.c | 3 net/core/devlink.c | 4 net/sched/Kconfig | 28 net/sched/Makefile | 2 net/sched/cls_rsvp.c | 24 net/sched/cls_rsvp.h | 777 ---------------------- net/sched/cls_rsvp6.c | 24 samples/hw_breakpoint/data_breakpoint.c | 4 sound/hda/intel-dsp-config.c | 8 tools/perf/Makefile.config | 47 - tools/perf/pmu-events/Build | 5 tools/testing/selftests/ftrace/ftracetest | 8 97 files changed, 745 insertions(+), 1174 deletions(-)
Abhishek Mainkar (1):
ACPICA: Add AML_NO_OPERAND_RESOLVE flag to Timer
Alexander Steffen (1):
tpm_tis: Resend command to recover from data transfer errors
Amir Goldstein (1):
ovl: fix incorrect fdput() on aio completion
Anand Jain (2):
btrfs: add a helper to read the superblock metadata_uuid
btrfs: compare the correct fsid/metadata_uuid in btrfs_validate_super
Andrew Kanner (1):
fs/jfs: prevent double-free in dbUnmount() after failed jfs_remount()
Arnd Bergmann (1):
samples/hw_breakpoint: fix building without module unloading
Azeem Shaikh (1):
crypto: lrw,xts - Replace strlcpy with strscpy
Christian Brauner (1):
attr: block mode changes of symlinks
Christian König (1):
drm/amdgpu: fix amdgpu_cs_p1_user_fence
Christophe Leroy (1):
serial: cpm_uart: Avoid suspicious locking
Damien Le Moal (1):
scsi: pm8001: Setup IRQs on resume
Dmitry Antipov (3):
wifi: ath9k: fix fortify warnings
wifi: mwifiex: fix fortify warning
wifi: wil6210: fix fortify warnings
Dongliang Mu (1):
wifi: ath9k: fix printk specifier
Fedor Pchelkin (1):
autofs: fix memory leak of waitqueues in autofs_catatonic_mode
Filipe Manana (2):
btrfs: fix lockdep splat and potential deadlock after failure running delayed items
btrfs: release path before inode lookup during the ino lookup ioctl
Florian Fainelli (1):
mtd: rawnand: brcmnand: Allow SoC to provide I/O operations
GONG, Ruiqi (2):
alx: fix OOB-read compiler warning
netfilter: ebtables: fix fortify warnings in size_entry_mwt()
Georg Ottinger (1):
ext2: fix datatype of block number in ext2_xattr_set2()
Giulio Benetti (1):
mmc: sdhci-esdhc-imx: improve ESDHC_FLAG_ERR010450
Greg Kroah-Hartman (1):
Linux 5.10.197
Hans Verkuil (2):
media: tuners: qt1010: replace BUG_ON with a regular error
media: pci: cx23885: replace BUG with error return
Hans de Goede (1):
ACPI: video: Add backlight=native DMI quirk for Apple iMac12,1 and iMac12,2
Ian Rogers (1):
perf tools: Add an option to build without libbfd
Jamal Hadi Salim (1):
net/sched: Retire rsvp classifier
Jeff Layton (1):
nfsd: fix change_info in NFSv4 RENAME replies
Jinjie Ruan (3):
drm: gm12u320: Fix the timeout usage for usb_bulk_msg()
scsi: qla2xxx: Fix NULL vs IS_ERR() bug for debugfs_create_dir()
scsi: lpfc: Fix the NULL vs IS_ERR() bug for debugfs_create_file()
Jiri Pirko (1):
devlink: remove reload failed checks in params get/set callbacks
Jiri Slaby (SUSE) (1):
ACPI: video: Add backlight=native DMI quirk for Lenovo Ideapad Z470
Johannes Berg (1):
wifi: mac80211_hwsim: drop short frames
John Garry (1):
perf jevents: Make build dependency on test JSONs
Josef Bacik (1):
btrfs: move btrfs_pinned_by_swapfile prototype into volumes.h
Junxiao Bi (1):
scsi: megaraid_sas: Fix deadlock on firmware crashdump
Kent Overstreet (1):
mm/filemap: fix infinite loop in generic_file_buffered_read()
Kirill A. Shutemov (1):
x86/boot/compressed: Reserve more memory for page tables
Konstantin Shelekhin (1):
scsi: target: iscsi: Fix buffer overflow in lio_target_nacl_info_show()
Liu Shixin via Jfs-discussion (1):
jfs: fix invalid free of JFS_IP(ipimap)->i_imap in diUnmount
Ma Ke (1):
usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc
Marek Vasut (1):
drm/bridge: tc358762: Instruct DSI host to generate HSE packets
Mark O'Donovan (1):
crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui()
Masami Hiramatsu (Google) (1):
selftests: tracing: Fix to unmount tracefs for recovering environment
Melissa Wen (1):
drm/amd/display: enable cursor degamma for DCN3+ DRM legacy gamma
Nigel Croxon (1):
md/raid1: fix error: ISO C90 forbids mixed declarations
Niklas Cassel (1):
ata: libata: disallow dev-initiated LPM transitions to unsupported states
Paul E. McKenney (1):
scftorture: Forgive memory-allocation failure if KASAN
Pierre-Louis Bossart (1):
ALSA: hda: intel-dsp-cfg: add LunarLake support
Qu Wenruo (1):
btrfs: output extra debug info if we failed to find an inline backref
Rong Tao (1):
samples/hw_breakpoint: Fix kernel BUG 'invalid opcode: 0000'
Sakari Ailus (1):
media: pci: ipu3-cio2: Initialise timing struct to avoid a compiler warning
Shida Zhang (1):
ext4: fix rec_len verify error
Steven Rostedt (Google) (3):
tracing: Have current_trace inc the trace array ref count
tracing: Have option files inc the trace array ref count
tracefs: Add missing lockdown check to tracefs_create_dir()
Tomislav Novak (1):
hw_breakpoint: fix single-stepping when using bpf_overflow_handler
Tommy Huang (1):
i2c: aspeed: Reset the i2c controller when timeout occurs
Tony Lindgren (1):
bus: ti-sysc: Configure uart quirks for k3 SoC
Tuo Li (1):
drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable()
Wander Lairson Costa (1):
kernel/fork: beware of __put_task_struct() calling context
Will Shiu (1):
locks: fix KASAN: use-after-free in trace_event_raw_event_filelock_lock
William Zhang (1):
mtd: rawnand: brcmnand: Fix ECC level field setting for v7.2 controller
Yicong Yang (1):
perf/smmuv3: Enable HiSilicon Erratum 162001900 quirk for HIP08/09
Zhang Shurong (7):
md: raid1: fix potential OOB in raid1_remove_disk()
media: dvb-usb-v2: af9035: Fix null-ptr-deref in af9035_i2c_master_xfer
media: dw2102: Fix null-ptr-deref in dw2102_i2c_transfer()
media: af9005: Fix null-ptr-deref in af9005_i2c_xfer
media: anysee: fix null-ptr-deref in anysee_master_xfer
media: az6007: Fix null-ptr-deref in az6007_i2c_xfer()
media: dvb-usb-v2: gl861: Fix null-ptr-deref in gl861_i2c_master_xferZhen Lei (1):
kobject: Add sanity check for kset->kobj.ktype in kset_register()
Zhihao Cheng (1):
proc: fix a dentry lock race between release_task and lookup
Zqiang (1):
rcuscale: Move rcu_scale_writer() schedule_timeout_uninterruptible() to _idle()
ruanjinjie (1):
powerpc/pseries: fix possible memory leak in ibmebus_bus_init()
Greg Kroah-Hartman
maintainerDocumentation/arm64/silicon-errata.rst +3 -0
@@ -149,6 +149,9 @@ stable kernels. +----------------+-----------------+-----------------+-----------------------------+ | Hisilicon | Hip08 SMMU PMCG | #162001800 | N/A | +----------------+-----------------+-----------------+-----------------------------+ +| Hisilicon | Hip08 SMMU PMCG | #162001900 | N/A | +| | Hip09 SMMU PMCG | | | ++----------------+-----------------+-----------------+-----------------------------+ +----------------+-----------------+-----------------+-----------------------------+ | Qualcomm Tech. | Kryo/Falkor v1 | E1003 | QCOM_FALKOR_ERRATUM_1003 | +----------------+-----------------+-----------------+-----------------------------+
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 196 +SUBLEVEL = 197 EXTRAVERSION = NAME = Dare mighty things
arch/arm/kernel/hw_breakpoint.c +4 -4
@@ -626,7 +626,7 @@ int hw_breakpoint_arch_parse(struct perf_event *bp, hw->address &= ~alignment_mask; hw->ctrl.len <<= offset; -if (is_default_overflow_handler (bp)) { +if (uses_default_overflow_handler (bp)) {/* * Mismatch breakpoints are required for single-stepping * breakpoints.
@@ -798,7 +798,7 @@ static void watchpoint_handler(unsigned long addr, unsigned int fsr,* Otherwise, insert a temporary mismatch breakpoint so that * we can single-step over the watchpoint trigger. */ -if (!is_default_overflow_handler (wp)) +if (!uses_default_overflow_handler (wp))continue ; step:enable_single_step (wp,instruction_pointer (regs));
@@ -811,7 +811,7 @@ static void watchpoint_handler(unsigned long addr, unsigned int fsr, info->trigger = addr;pr_debug ("watchpoint fired: address = 0x%x\n" , info->trigger);perf_bp_event (wp, regs); -if (is_default_overflow_handler (wp)) +if (uses_default_overflow_handler (wp))enable_single_step (wp,instruction_pointer (regs)); }
@@ -886,7 +886,7 @@ static void breakpoint_handler(unsigned long unknown, struct pt_regs *regs) info->trigger = addr;pr_debug ("breakpoint fired: address = 0x%x\n" , addr);perf_bp_event (bp, regs); -if (is_default_overflow_handler (bp)) +if (uses_default_overflow_handler (bp))enable_single_step (bp, addr); goto unlock; }
arch/arm64/kernel/hw_breakpoint.c +2 -2
@@ -654,7 +654,7 @@ static int breakpoint_handler(unsigned long unused, unsigned int esr,perf_bp_event (bp, regs);/* Do we need to handle the stepping? */ -if (is_default_overflow_handler (bp)) +if (uses_default_overflow_handler (bp)) step =1 ; unlock:rcu_read_unlock ();
@@ -733,7 +733,7 @@ static u64 get_distance_from_watchpoint(unsigned long addr, u64 val,static int watchpoint_report (struct perf_event *wp,unsigned long addr,struct pt_regs *regs) { -int step =is_default_overflow_handler (wp); +int step =uses_default_overflow_handler (wp);struct arch_hw_breakpoint *info =counter_arch_bp (wp); info->trigger = addr;
arch/powerpc/platforms/pseries/ibmebus.c +1 -0
@@ -451,6 +451,7 @@ static int __init ibmebus_bus_init(void)if (err) {printk (KERN_WARNING "%s: device_register returned %i\n" , __func__, err); +put_device (&ibmebus_bus_device);bus_unregister (&ibmebus_bus_type);return err;
arch/x86/boot/compressed/ident_map_64.c +8 -0
@@ -67,6 +67,14 @@ static void *alloc_pgt_page(void *context)return NULL ; } +/* Consumed more tables than expected? */ +if (pages->pgt_buf_offset ==BOOT_PGT_SIZE_WARN ) { +debug_putstr ("pgt_buf running low in " __FILE__"\n" ); +debug_putstr ("Need to raise BOOT_PGT_SIZE?\n" ); +debug_putaddr (pages->pgt_buf_offset); +debug_putaddr (pages->pgt_buf_size); + } + entry = pages->pgt_buf + pages->pgt_buf_offset; pages->pgt_buf_offset +=PAGE_SIZE ;
arch/x86/include/asm/boot.h +31 -14
54 lines not on this page · raw message
crypto/lrw.c +3 -3
@@ -357,10 +357,10 @@ static int lrw_create(struct crypto_template *tmpl, struct rtattr **tb)* cipher name. */ if (!strncmp (cipher_name,"ecb(" ,4 )) { -unsigned len; +int len; - len =strlcpy (ecb_name, cipher_name +4 ,sizeof (ecb_name)); -if (len <2 || len >=sizeof (ecb_name)) + len =strscpy (ecb_name, cipher_name +4 ,sizeof (ecb_name)); +if (len <2 ) goto err_free_inst;if (ecb_name[len -1 ] !=')' )
crypto/xts.c +3 -3
@@ -395,10 +395,10 @@ static int xts_create(struct crypto_template *tmpl, struct rtattr **tb)* cipher name. */ if (!strncmp (cipher_name,"ecb(" ,4 )) { -unsigned len; +int len; - len =strlcpy (ctx->name, cipher_name +4 ,sizeof (ctx->name)); -if (len <2 || len >=sizeof (ctx->name)) + len =strscpy (ctx->name, cipher_name +4 ,sizeof (ctx->name)); +if (len <2 ) goto err_free_inst;if (ctx->name[len -1 ] !=')' )
drivers/acpi/acpica/psopcode.c +1 -1
@@ -603,7 +603,7 @@ const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = {/* 7E */ ACPI_OP ("Timer" ,ARGP_TIMER_OP ,ARGI_TIMER_OP ,ACPI_TYPE_ANY ,AML_CLASS_EXECUTE ,AML_TYPE_EXEC_0A_0T_1R , - AML_FLAGS_EXEC_0A_0T_1R), + AML_FLAGS_EXEC_0A_0T_1R | AML_NO_OPERAND_RESOLVE),/* ACPI 5.0 opcodes */
drivers/acpi/arm64/iort.c +4 -1
@@ -1474,7 +1474,10 @@ static void __init arm_smmu_v3_pmcg_init_resources(struct resource *res,static struct acpi_platform_list pmcg_plat_info[]__initdata = {/* HiSilicon Hip08 Platform */ {"HISI " ,"HIP08 " ,0 ,ACPI_SIG_IORT , greater_than_or_equal, -"Erratum #162001800" ,IORT_SMMU_V3_PMCG_HISI_HIP08 }, +"Erratum #162001800, Erratum #162001900" ,IORT_SMMU_V3_PMCG_HISI_HIP08 }, +/* HiSilicon Hip09 Platform */ + {"HISI " ,"HIP09 " ,0 ,ACPI_SIG_IORT , greater_than_or_equal, +"Erratum #162001900" ,IORT_SMMU_V3_PMCG_HISI_HIP09 }, { } };
drivers/acpi/video_detect.c +27 -0
@@ -307,6 +307,15 @@ static const struct dmi_system_id video_detect_dmi_table[] = { DMI_MATCH(DMI_BOARD_NAME, "Lenovo IdeaPad S405"), }, }, + { +/* https://bugzilla.suse.com/show_bug.cgi?id=1208724 */ + .callback = video_detect_force_native, +/* Lenovo Ideapad Z470 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"LENOVO" ), + DMI_MATCH(DMI_PRODUCT_VERSION, "IdeaPad Z470"), + }, + }, {/* https://bugzilla.redhat.com/show_bug.cgi?id=1187004 */ .callback = video_detect_force_native,
@@ -348,6 +357,24 @@ static const struct dmi_system_id video_detect_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "iMac11,3"), }, }, + { +/* https://gitlab.freedesktop.org/drm/amd/-/issues/1838 */ + .callback = video_detect_force_native, +/* Apple iMac12,1 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Apple Inc." ), + DMI_MATCH(DMI_PRODUCT_NAME, "iMac12,1"), + }, + }, + { +/* https://gitlab.freedesktop.org/drm/amd/-/issues/2753 */ + .callback = video_detect_force_native, +/* Apple iMac12,2 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Apple Inc." ), + DMI_MATCH(DMI_PRODUCT_NAME, "iMac12,2"), + }, + }, {/* https://bugzilla.redhat.com/show_bug.cgi?id=1217249 */ .callback = video_detect_force_native,
drivers/ata/ahci.c +9 -0
@@ -1882,6 +1882,15 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)else dev_info (&pdev->dev,"SSS flag set, parallel bus scan disabled\n" ); +if (!(hpriv->cap &HOST_CAP_PART )) + host->flags |=ATA_HOST_NO_PART ; + +if (!(hpriv->cap &HOST_CAP_SSC )) + host->flags |=ATA_HOST_NO_SSC ; + +if (!(hpriv->cap2 &HOST_CAP2_SDS )) + host->flags |=ATA_HOST_NO_DEVSLP ; +if (pi.flags &ATA_FLAG_EM )ahci_reset_em (host);
drivers/ata/libata-sata.c +16 -3
@@ -394,10 +394,23 @@ int sata_link_scr_lpm(struct ata_link *link, enum ata_lpm_policy policy,case ATA_LPM_MED_POWER_WITH_DIPM :case ATA_LPM_MIN_POWER_WITH_PARTIAL :case ATA_LPM_MIN_POWER : -if (ata_link_nr_enabled (link) >0 ) -/* no restrictions on LPM transitions */ +if (ata_link_nr_enabled (link) >0 ) { +/* assume no restrictions on LPM transitions */ scontrol &= ~(0x7 <<8 ); -else { + +/* +* If the controller does not support partial, slumber, +* or devsleep, then disallow these transitions. +*/ +if (link->ap->host->flags &ATA_HOST_NO_PART ) + scontrol |= (0x1 <<8 ); + +if (link->ap->host->flags &ATA_HOST_NO_SSC ) + scontrol |= (0x2 <<8 ); + +if (link->ap->host->flags &ATA_HOST_NO_DEVSLP ) + scontrol |= (0x4 <<8 ); + }else {/* empty port, power off */ scontrol &= ~0xf ; scontrol |= (0x1 <<2 );
drivers/bus/ti-sysc.c +2 -0
@@ -1504,6 +1504,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),SYSC_QUIRK ("uart" ,0 ,0x50 ,0x54 ,0x58 ,0x47422e03 ,0xffffffff ,SYSC_QUIRK_SWSUP_SIDLE |SYSC_QUIRK_LEGACY_IDLE ), +SYSC_QUIRK ("uart" ,0 ,0x50 ,0x54 ,0x58 ,0x47424e03 ,0xffffffff , +SYSC_QUIRK_SWSUP_SIDLE |SYSC_QUIRK_LEGACY_IDLE ),/* Quirks that need to be set based on the module address */ SYSC_QUIRK("mcpdm", 0x40132000, 0, 0x10, -ENODEV, 0x50000800, 0xffffffff,
drivers/char/tpm/tpm_tis_core.c +11 -4
@@ -469,10 +469,17 @@ static int tpm_tis_send_main(struct tpm_chip *chip, const u8 *buf, size_t len)int rc;u32 ordinal;unsigned long dur; - - rc =tpm_tis_send_data (chip, buf, len); -if (rc <0 ) -return rc; +unsigned int try; + +for (try =0 ; try <TPM_RETRY ; try++) { + rc =tpm_tis_send_data (chip, buf, len); +if (rc >=0 ) +/* Data transfer done successfully */ +break ; +else if (rc != -EIO ) +/* Data transfer failed, not recoverable */ +return rc; + }/* go and do it */ rc =tpm_tis_write8 (priv,TPM_STS (priv->locality),TPM_STS_GO );
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +4 -14
@@ -45,7 +45,6 @@ static int amdgpu_cs_user_fence_chunk(struct amdgpu_cs_parser *p,struct drm_gem_object *gobj;struct amdgpu_bo *bo;unsigned long size; -int r; gobj =drm_gem_object_lookup (p->filp, data->handle);if (gobj ==NULL )
@@ -60,23 +59,14 @@ static int amdgpu_cs_user_fence_chunk(struct amdgpu_cs_parser *p,drm_gem_object_put (gobj); size =amdgpu_bo_size (bo); -if (size !=PAGE_SIZE || (data->offset +8 ) > size) { - r = -EINVAL ; - goto error_unref; - } +if (size !=PAGE_SIZE || data->offset > (size -8 )) +return -EINVAL ; -if (amdgpu_ttm_tt_get_usermm (bo->tbo.ttm)) { - r = -EINVAL ; - goto error_unref; - } +if (amdgpu_ttm_tt_get_usermm (bo->tbo.ttm)) +return -EINVAL ; *offset = data->offset; -return 0 ; - -error_unref: -amdgpu_bo_unref (&bo); -return r; } static int amdgpu_cs_bo_handles_chunk(struct amdgpu_cs_parser *p,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +7 -0
@@ -6971,6 +6971,13 @@ static void handle_cursor_update(struct drm_plane *plane, attributes.rotation_angle =0 ; attributes.attribute_flags.value =0 ; +/* Enable cursor degamma ROM on DCN3+ for implicit sRGB degamma in DRM +* legacy gamma setup. +*/ +if (crtc_state->cm_is_degamma_srgb && + adev->dm.dc->caps.color.dpp.gamma_corr) + attributes.attribute_flags.bits.ENABLE_CURSOR_DEGAMMA =1 ; + attributes.pitch = attributes.width;if (crtc_state->stream) {
drivers/gpu/drm/bridge/tc358762.c +1 -1
@@ -224,7 +224,7 @@ static int tc358762_probe(struct mipi_dsi_device *dsi) dsi->lanes =1 ; dsi->format =MIPI_DSI_FMT_RGB888 ; dsi->mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_SYNC_PULSE | -MIPI_DSI_MODE_LPM ; +MIPI_DSI_MODE_LPM |MIPI_DSI_MODE_VIDEO_HSE ; ret =tc358762_parse_dt (ctx);if (ret <0 )
drivers/gpu/drm/exynos/exynos_drm_crtc.c +2 -3
@@ -39,13 +39,12 @@ static void exynos_drm_crtc_atomic_disable(struct drm_crtc *crtc,if (exynos_crtc->ops->atomic_disable) exynos_crtc->ops->atomic_disable (exynos_crtc); +spin_lock_irq (&crtc->dev->event_lock);if (crtc->state->event && !crtc->state->active) { -spin_lock_irq (&crtc->dev->event_lock);drm_crtc_send_vblank_event (crtc, crtc->state->event); -spin_unlock_irq (&crtc->dev->event_lock); - crtc->state->event =NULL ; } +spin_unlock_irq (&crtc->dev->event_lock); } static int exynos_crtc_atomic_check(struct drm_crtc *crtc,
drivers/gpu/drm/tiny/gm12u320.c +5 -5
@@ -67,10 +67,10 @@ MODULE_PARM_DESC(eco_mode, "Turn on Eco mode (less bright, more silent)");#define READ_STATUS_SIZE 13#define MISC_VALUE_SIZE 4 -#define CMD_TIMEOUT msecs_to_jiffies(200) -#define DATA_TIMEOUT msecs_to_jiffies(1000) -#define IDLE_TIMEOUT msecs_to_jiffies(2000) -#define FIRST_FRAME_TIMEOUT msecs_to_jiffies(2000) +#define CMD_TIMEOUT 200 +#define DATA_TIMEOUT 1000 +#define IDLE_TIMEOUT 2000 +#define FIRST_FRAME_TIMEOUT 2000#define MISC_REQ_GET_SET_ECO_A 0xff#define MISC_REQ_GET_SET_ECO_B 0x35
@@ -399,7 +399,7 @@ static void gm12u320_fb_update_work(struct work_struct *work)* switches back to showing its logo. */ queue_delayed_work (system_long_wq, &gm12u320->fb_update.work, -IDLE_TIMEOUT ); +msecs_to_jiffies (IDLE_TIMEOUT ));return ; err:
drivers/i2c/busses/i2c-aspeed.c +5 -2
@@ -693,13 +693,16 @@ static int aspeed_i2c_master_xfer(struct i2c_adapter *adap,if (time_left ==0 ) {/* -* If timed out and bus is still busy in a multi master -* environment, attempt recovery at here. +* In a multi-master setup, if a timeout occurs, attempt +* recovery. But if the bus is idle, we still need to reset the +* i2c controller to clear the remaining interrupts. */ if (bus->multi_master && (readl (bus->base +ASPEED_I2C_CMD_REG ) &ASPEED_I2CD_BUS_BUSY_STS ))aspeed_i2c_recover_bus (bus); +else +aspeed_i2c_reset (bus);/* * If timed out and the state is still pending, drop the pending
drivers/md/raid1.c +3 -0
@@ -1793,6 +1793,9 @@ static int raid1_remove_disk(struct mddev *mddev, struct md_rdev *rdev)int number = rdev->raid_disk;struct raid1_info *p = conf->mirrors + number; +if (unlikely (number >= conf->raid_disks)) + goto abort; +if (rdev != p->rdev) p = conf->mirrors + conf->raid_disks + number;
drivers/media/pci/cx23885/cx23885-video.c +1 -1
@@ -412,7 +412,7 @@ static int buffer_prepare(struct vb2_buffer *vb) dev->height >> 1);break ;default : -BUG (); +return -EINVAL ;/* should not happen */ } dprintk(2, "[%p/%d] buffer_init - %dx%d %dbpp 0x%08x - dma=0x%08lx\n", buf, buf->vb.vb2_buf.index,
drivers/media/pci/intel/ipu3/ipu3-cio2.c +1 -1
@@ -355,7 +355,7 @@ static int cio2_hw_init(struct cio2_device *cio2, struct cio2_queue *q)void __iomem *const base = cio2->base;u8 lanes, csi2bus = q->csi2.port;u8 sensor_vc =SENSOR_VIR_CH_DFLT ; -struct cio2_csi2_timing timing; +struct cio2_csi2_timing timing = {0 };int i, r; fmt =cio2_find_format (NULL , &q->subdev_fmt.code);
drivers/media/tuners/qt1010.c +6 -5
@@ -345,11 +345,12 @@ static int qt1010_init(struct dvb_frontend *fe)else valptr = &tmpval; -BUG_ON (i >=ARRAY_SIZE (i2c_data) -1 ); - - err =qt1010_init_meas1 (priv, i2c_data[i+1 ].reg, - i2c_data[i].reg, - i2c_data[i].val, valptr); +if (i >=ARRAY_SIZE (i2c_data) -1 ) + err = -EIO ; +else + err =qt1010_init_meas1 (priv, i2c_data[i +1 ].reg, + i2c_data[i].reg, + i2c_data[i].val, valptr); i++;break ; }
drivers/media/usb/dvb-usb-v2/af9035.c +8 -6
@@ -269,6 +269,7 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,struct dvb_usb_device *d =i2c_get_adapdata (adap);struct state *state =d_to_priv (d);int ret; +u32 reg;if (mutex_lock_interruptible (&d->i2c_mutex) <0 )return -EAGAIN ;
@@ -321,8 +322,10 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap, ret = -EOPNOTSUPP ; }else if ((msg[0 ].addr == state->af9033_i2c_addr[0 ]) || (msg[0 ].addr == state->af9033_i2c_addr[1 ])) { +if (msg[0 ].len <3 || msg[1 ].len <1 ) +return -EOPNOTSUPP ;/* demod access via firmware interface */ -u32 reg = msg[0 ].buf[0 ] <<16 | msg[0 ].buf[1 ] <<8 | + reg = msg[0 ].buf[0 ] <<16 | msg[0 ].buf[1 ] <<8 | msg[0 ].buf[2 ];if (msg[0 ].addr == state->af9033_i2c_addr[1 ])
@@ -380,17 +383,16 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap, ret = -EOPNOTSUPP ; }else if ((msg[0 ].addr == state->af9033_i2c_addr[0 ]) || (msg[0 ].addr == state->af9033_i2c_addr[1 ])) { +if (msg[0 ].len <3 ) +return -EOPNOTSUPP ;/* demod access via firmware interface */ -u32 reg = msg[0 ].buf[0 ] <<16 | msg[0 ].buf[1 ] <<8 | + reg = msg[0 ].buf[0 ] <<16 | msg[0 ].buf[1 ] <<8 | msg[0 ].buf[2 ];if (msg[0 ].addr == state->af9033_i2c_addr[1 ]) reg |=0x100000 ; - ret = (msg[0 ].len >=3 ) ?af9035_wr_regs (d, reg, - &msg[0 ].buf[3 ], - msg[0 ].len -3 ) - : -EOPNOTSUPP ; + ret =af9035_wr_regs (d, reg, &msg[0 ].buf[3 ], msg[0 ].len -3 ); }else {/* I2C write */ u8 buf[MAX_XFER_SIZE ];
drivers/media/usb/dvb-usb-v2/anysee.c +1 -1
@@ -202,7 +202,7 @@ static int anysee_master_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].len >2 || msg[i+1 ].len >60 ) { +if (msg[i].len !=2 || msg[i +1 ].len >60 ) { ret = -EOPNOTSUPP ;break ; }
drivers/media/usb/dvb-usb-v2/az6007.c +8 -0
@@ -788,6 +788,10 @@ static int az6007_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[],if (az6007_xfer_debug)printk (KERN_DEBUG "az6007: I2C W addr=0x%x len=%d\n" , addr, msgs[i].len); +if (msgs[i].len <1 ) { + ret = -EIO ; + goto err; + } req =AZ6007_I2C_WR ; index = msgs[i].buf[0 ]; value = addr | (1 <<8 );
@@ -802,6 +806,10 @@ static int az6007_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[],if (az6007_xfer_debug)printk (KERN_DEBUG "az6007: I2C R addr=0x%x len=%d\n" , addr, msgs[i].len); +if (msgs[i].len <1 ) { + ret = -EIO ; + goto err; + } req =AZ6007_I2C_RD ; index = msgs[i].buf[0 ]; value = addr;
drivers/media/usb/dvb-usb-v2/gl861.c +1 -1
@@ -120,7 +120,7 @@ static int gl861_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], }else if (num ==2 && !(msg[0 ].flags &I2C_M_RD ) && (msg[1 ].flags &I2C_M_RD )) {/* I2C write + read */ -if (msg[0 ].len >1 || msg[1 ].len >sizeof (ctx->buf)) { +if (msg[0 ].len !=1 || msg[1 ].len >sizeof (ctx->buf)) { ret = -EOPNOTSUPP ; goto err; }
drivers/media/usb/dvb-usb/af9005.c +5 -0
@@ -422,6 +422,10 @@ static int af9005_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],if (ret ==0 ) ret =2 ; }else { +if (msg[0 ].len <2 ) { + ret = -EOPNOTSUPP ; + goto unlock; + }/* write one or more registers */ reg = msg[0 ].buf[0 ]; addr = msg[0 ].addr;
@@ -431,6 +435,7 @@ static int af9005_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], ret =1 ; } +unlock:mutex_unlock (&d->i2c_mutex);return ret; }
drivers/media/usb/dvb-usb/dw2102.c +24 -0
@@ -128,6 +128,10 @@ static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],switch (num) {case 2 : +if (msg[0 ].len <1 ) { + num = -EOPNOTSUPP ; +break ; + }/* read stv0299 register */ value = msg[0 ].buf[0 ];/* register */ for (i =0 ; i < msg[1 ].len; i++) {
@@ -139,6 +143,10 @@ static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],case 1 :switch (msg[0 ].addr) {case 0x68 : +if (msg[0 ].len <2 ) { + num = -EOPNOTSUPP ; +break ; + }/* write to stv0299 register */ buf6[0 ] =0x2a ; buf6[1 ] = msg[0 ].buf[0 ];
@@ -148,6 +156,10 @@ static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],break ;case 0x60 :if (msg[0 ].flags ==0 ) { +if (msg[0 ].len <4 ) { + num = -EOPNOTSUPP ; +break ; + }/* write to tuner pll */ buf6[0 ] =0x2c ; buf6[1 ] =5 ;
@@ -159,6 +171,10 @@ static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],dw210x_op_rw (d->udev,0xb2 ,0 ,0 , buf6,7 ,DW210X_WRITE_MSG ); }else { +if (msg[0 ].len <1 ) { + num = -EOPNOTSUPP ; +break ; + }/* read from tuner */ dw210x_op_rw (d->udev,0xb5 ,0 ,0 , buf6,1 ,DW210X_READ_MSG );
@@ -166,12 +182,20 @@ static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], }break ;case (DW2102_RC_QUERY ): +if (msg[0 ].len <2 ) { + num = -EOPNOTSUPP ; +break ; + }dw210x_op_rw (d->udev,0xb8 ,0 ,0 , buf6,2 ,DW210X_READ_MSG ); msg[0 ].buf[0 ] = buf6[0 ]; msg[0 ].buf[1 ] = buf6[1 ];break ;case (DW2102_VOLTAGE_CTRL ): +if (msg[0 ].len <1 ) { + num = -EOPNOTSUPP ; +break ; + } buf6[0 ] =0x30 ; buf6[1 ] = msg[0 ].buf[0 ]; dw210x_op_rw(d->udev, 0xb2, 0, 0,
drivers/mmc/host/sdhci-esdhc-imx.c +4 -3
@@ -166,8 +166,8 @@#define ESDHC_FLAG_HS400 BIT(9)/* * The IP has errata ERR010450 -* uSDHC: Due to the I/O timing limit, for SDR mode, SD card clock can't -* exceed 150MHz, for DDR mode, SD card clock can't exceed 45MHz. +* uSDHC: At 1.8V due to the I/O timing limit, for SDR mode, SD card +* clock can't exceed 150MHz, for DDR mode, SD card clock can't exceed 45MHz. */ #define ESDHC_FLAG_ERR010450 BIT(10)/* The IP supports HS400ES mode */
@@ -873,7 +873,8 @@ static inline void esdhc_pltfm_set_clock(struct sdhci_host *host, | ESDHC_CLOCK_MASK);sdhci_writel (host, temp,ESDHC_SYSTEM_CONTROL ); -if (imx_data->socdata->flags &ESDHC_FLAG_ERR010450 ) { +if ((imx_data->socdata->flags &ESDHC_FLAG_ERR010450 ) && + (!(host->quirks2 &SDHCI_QUIRK2_NO_1_8_V ))) {unsigned int max_clock; max_clock = imx_data->is_ddr ?45000000 :150000000 ;
drivers/mtd/nand/raw/brcmnand/brcmnand.c +67 -35
188 lines not on this page · raw message
drivers/mtd/nand/raw/brcmnand/brcmnand.h +29 -0
@@ -11,12 +11,25 @@struct platform_device ;struct dev_pm_ops ; +struct brcmnand_io_ops ; + +/* Special register offset constant to intercept a non-MMIO access +* to the flash cache register space. This is intentionally large +* not to overlap with an existing offset. +*/ +#define BRCMNAND_NON_MMIO_FC_ADDR 0xffffffffstruct brcmnand_soc {bool (*ctlrdy_ack)(struct brcmnand_soc *soc);void (*ctlrdy_set_enabled)(struct brcmnand_soc *soc,bool en);void (*prepare_data_bus)(struct brcmnand_soc *soc,bool prepare,bool is_param); +const struct brcmnand_io_ops *ops; +}; + +struct brcmnand_io_ops { +u32 (*read_reg)(struct brcmnand_soc *soc,u32 offset); +void (*write_reg)(struct brcmnand_soc *soc,u32 val,u32 offset); }; static inline void brcmnand_soc_data_bus_prepare(struct brcmnand_soc *soc,
@@ -58,6 +71,22 @@ static inline void brcmnand_writel(u32 val, void __iomem *addr)writel_relaxed (val, addr); } +static inline bool brcmnand_soc_has_ops (struct brcmnand_soc *soc) +{ +return soc && soc->ops && soc->ops->read_reg && soc->ops->write_reg; +} + +static inline u32 brcmnand_soc_read (struct brcmnand_soc *soc,u32 offset) +{ +return soc->ops->read_reg (soc, offset); +} + +static inline void brcmnand_soc_write (struct brcmnand_soc *soc,u32 val, +u32 offset) +{ + soc->ops->write_reg (soc, val, offset); +} +int brcmnand_probe (struct platform_device *pdev,struct brcmnand_soc *soc);int brcmnand_remove (struct platform_device *pdev);
drivers/net/ethernet/atheros/alx/ethtool.c +2 -3
@@ -281,9 +281,8 @@ static void alx_get_ethtool_stats(struct net_device *netdev,spin_lock (&alx->stats_lock);alx_update_hw_stats (hw); -BUILD_BUG_ON (sizeof (hw->stats) - offsetof(struct alx_hw_stats , rx_ok) < -ALX_NUM_STATS *sizeof (u64)); -memcpy (data, &hw->stats.rx_ok,ALX_NUM_STATS *sizeof (u64)); +BUILD_BUG_ON (sizeof (hw->stats) !=ALX_NUM_STATS *sizeof (u64)); +memcpy (data, &hw->stats,sizeof (hw->stats));spin_unlock (&alx->stats_lock); }
drivers/net/wireless/ath/ath9k/ahb.c +2 -2
@@ -136,8 +136,8 @@ static int ath_ahb_probe(struct platform_device *pdev) ah = sc->sc_ah;ath9k_hw_name (ah, hw_name,sizeof (hw_name)); -wiphy_info (hw->wiphy,"%s mem=0x%lx, irq=%d\n" , - hw_name, (unsigned long )mem, irq); +wiphy_info (hw->wiphy,"%s mem=0x%p, irq=%d\n" , + hw_name, mem, irq);return 0 ;
drivers/net/wireless/ath/ath9k/mac.h +4 -2
@@ -113,8 +113,10 @@ struct ath_tx_status {u8 qid;u16 desc_id;u8 tid; -u32 ba_low; -u32 ba_high; +struct_group (ba, + u32 ba_low; + u32 ba_high; + );u32 evm0;u32 evm1;u32 evm2;
drivers/net/wireless/ath/ath9k/pci.c +2 -2
@@ -994,8 +994,8 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) sc->sc_ah->msi_reg =0 ;ath9k_hw_name (sc->sc_ah, hw_name,sizeof (hw_name)); -wiphy_info (hw->wiphy,"%s mem=0x%lx, irq=%d\n" , - hw_name, (unsigned long )sc->mem, pdev->irq); +wiphy_info (hw->wiphy,"%s mem=0x%p, irq=%d\n" , + hw_name, sc->mem, pdev->irq);return 0 ;
drivers/net/wireless/ath/ath9k/xmit.c +2 -2
@@ -421,7 +421,7 @@ static void ath_tx_count_frames(struct ath_softc *sc, struct ath_buf *bf, isaggr =bf_isaggr (bf);if (isaggr) { seq_st = ts->ts_seqnum; -memcpy (ba, &ts->ba_low,WME_BA_BMP_SIZE >>3 ); +memcpy (ba, &ts->ba,WME_BA_BMP_SIZE >>3 ); }while (bf) {
@@ -504,7 +504,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,if (isaggr && txok) {if (ts->ts_flags &ATH9K_TX_BA ) { seq_st = ts->ts_seqnum; -memcpy (ba, &ts->ba_low,WME_BA_BMP_SIZE >>3 ); +memcpy (ba, &ts->ba,WME_BA_BMP_SIZE >>3 ); }else {/* * AR5416 can become deaf/mute when BA
drivers/net/wireless/ath/wil6210/txrx.c +1 -1
@@ -666,7 +666,7 @@ static int wil_rx_crypto_check(struct wil6210_priv *wil, struct sk_buff *skb)struct wil_tid_crypto_rx *c = mc ? &s->group_crypto_rx : &s->tid_crypto_rx[tid];struct wil_tid_crypto_rx_single *cc = &c->key_id[key_id]; -const u8 *pn = (u8 *)&d->mac.pn_15_0; +const u8 *pn = (u8 *)&d->mac.pn;if (!cc->key_set) { wil_err_ratelimited(wil,
drivers/net/wireless/ath/wil6210/txrx.h +4 -2
@@ -343,8 +343,10 @@ struct vring_rx_mac {u32 d0;u32 d1;u16 w4; -u16 pn_15_0; -u32 pn_47_16; +struct_group_attr (pn, __packed, + u16 pn_15_0; + u32 pn_47_16; + ); } __packed;/* Rx descriptor - DMA part
drivers/net/wireless/ath/wil6210/txrx_edma.c +1 -1
@@ -548,7 +548,7 @@ static int wil_rx_crypto_check_edma(struct wil6210_priv *wil, s = &wil->sta[cid]; c = mc ? &s->group_crypto_rx : &s->tid_crypto_rx[tid]; cc = &c->key_id[key_id]; - pn = (u8 *)&st->ext.pn_15_0; + pn = (u8 *)&st->ext.pn;if (!cc->key_set) { wil_err_ratelimited(wil,
drivers/net/wireless/ath/wil6210/txrx_edma.h +4 -2
@@ -330,8 +330,10 @@ struct wil_rx_status_extension {u32 d0;u32 d1;__le16 seq_num;/* only lower 12 bits */ -u16 pn_15_0; -u32 pn_47_16; +struct_group_attr (pn, __packed, + u16 pn_15_0; + u32 pn_47_16; + ); } __packed;struct wil_rx_status_extended {
drivers/net/wireless/mac80211_hwsim.c +4 -3
@@ -3619,14 +3619,15 @@ static int hwsim_cloned_frame_received_nl(struct sk_buff *skb_2, frame_data_len =nla_len (info->attrs[HWSIM_ATTR_FRAME ]); frame_data = (void *)nla_data (info->attrs[HWSIM_ATTR_FRAME ]); +if (frame_data_len <sizeof (struct ieee80211_hdr_3addr ) || + frame_data_len >IEEE80211_MAX_DATA_LEN ) + goto err; +/* Allocate new skb here */ skb =alloc_skb (frame_data_len,GFP_KERNEL );if (skb ==NULL ) goto err; -if (frame_data_len >IEEE80211_MAX_DATA_LEN ) - goto err; -/* Copy the data */ skb_put_data (skb, frame_data, frame_data_len);
drivers/net/wireless/marvell/mwifiex/tdls.c +6 -3
@@ -735,6 +735,7 @@ mwifiex_construct_tdls_action_frame(struct mwifiex_private *priv,int ret;u16 capab;struct ieee80211_ht_cap *ht_cap; +unsigned int extra;u8 radio, *pos; capab = priv->curr_bss_params.bss_descriptor.cap_info_bitmap;
@@ -753,7 +754,10 @@ mwifiex_construct_tdls_action_frame(struct mwifiex_private *priv,switch (action_code) {case WLAN_PUB_ACTION_TDLS_DISCOVER_RES : -skb_put (skb,sizeof (mgmt->u.action.u.tdls_discover_resp) +1 ); +/* See the layout of 'struct ieee80211_mgmt'. */ + extra =sizeof (mgmt->u.action.u.tdls_discover_resp) + +sizeof (mgmt->u.action.category); +skb_put (skb, extra); mgmt->u.action.category =WLAN_CATEGORY_PUBLIC ; mgmt->u.action.u.tdls_discover_resp.action_code =WLAN_PUB_ACTION_TDLS_DISCOVER_RES ;
@@ -762,8 +766,7 @@ mwifiex_construct_tdls_action_frame(struct mwifiex_private *priv, mgmt->u.action.u.tdls_discover_resp.capability =cpu_to_le16 (capab);/* move back for addr4 */ -memmove (pos +ETH_ALEN , &mgmt->u.action.category, -sizeof (mgmt->u.action.u.tdls_discover_resp)); +memmove (pos +ETH_ALEN , &mgmt->u.action, extra);/* init address 4 */ eth_broadcast_addr (pos);
drivers/perf/arm_smmuv3_pmu.c +45 -1
76 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_debugfs.c +5 -5
@@ -5909,7 +5909,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) phba->hba_debugfs_root, phba, &lpfc_debugfs_op_multixripools); -if (!phba->debug_multixri_pools) { +if (IS_ERR (phba->debug_multixri_pools)) {lpfc_printf_vlog (vport,KERN_ERR ,LOG_INIT ,"0527 Cannot create debugfs multixripools\n" ); goto debug_failed;
@@ -5921,7 +5921,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)debugfs_create_file (name,0644 , phba->hba_debugfs_root, phba, &lpfc_debugfs_ras_log); -if (!phba->debug_ras_log) { +if (IS_ERR (phba->debug_ras_log)) {lpfc_printf_vlog (vport,KERN_ERR ,LOG_INIT ,"6148 Cannot create debugfs" " ras_log\n" );
@@ -5942,7 +5942,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)debugfs_create_file (name,S_IFREG |0644 , phba->hba_debugfs_root, phba, &lpfc_debugfs_op_lockstat); -if (!phba->debug_lockstat) { +if (IS_ERR (phba->debug_lockstat)) {lpfc_printf_vlog (vport,KERN_ERR ,LOG_INIT ,"4610 Can't create debugfs lockstat\n" ); goto debug_failed;
@@ -6171,7 +6171,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)debugfs_create_file (name,0644 , vport->vport_debugfs_root, vport, &lpfc_debugfs_op_scsistat); -if (!vport->debug_scsistat) { +if (IS_ERR (vport->debug_scsistat)) {lpfc_printf_vlog (vport,KERN_ERR ,LOG_INIT ,"4611 Cannot create debugfs scsistat\n" ); goto debug_failed;
@@ -6182,7 +6182,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)debugfs_create_file (name,0644 , vport->vport_debugfs_root, vport, &lpfc_debugfs_op_ioktime); -if (!vport->debug_ioktime) { +if (IS_ERR (vport->debug_ioktime)) {lpfc_printf_vlog (vport,KERN_ERR ,LOG_INIT ,"0815 Cannot create debugfs ioktime\n" ); goto debug_failed;
drivers/scsi/megaraid/megaraid_sas.h +1 -1
@@ -2327,7 +2327,7 @@ struct megasas_instance {u32 support_morethan256jbod;/* FW support for more than 256 PD/JBOD */ bool use_seqnum_jbod_fp;/* Added for PD sequence */ bool smp_affinity_enable; -spinlock_t crashdump_lock; +struct mutex crashdump_lock;struct megasas_register_set __iomem *reg_set;u32 __iomem *reply_post_host_index_addr[MR_MAX_MSIX_REG_ARRAY ];
drivers/scsi/megaraid/megaraid_sas_base.c +9 -12
@@ -3221,14 +3221,13 @@ fw_crash_buffer_store(struct device *cdev,struct megasas_instance *instance = (struct megasas_instance *) shost->hostdata;int val =0 ; -unsigned long flags;if (kstrtoint (buf,0 , &val) !=0 )return -EINVAL ; -spin_lock_irqsave (&instance->crashdump_lock, flags); +mutex_lock (&instance->crashdump_lock); instance->fw_crash_buffer_offset = val; -spin_unlock_irqrestore (&instance->crashdump_lock, flags); +mutex_unlock (&instance->crashdump_lock);return strlen (buf); }
@@ -3243,24 +3242,23 @@ fw_crash_buffer_show(struct device *cdev,unsigned long dmachunk =CRASH_DMA_BUF_SIZE ;unsigned long chunk_left_bytes;unsigned long src_addr; -unsigned long flags;u32 buff_offset; -spin_lock_irqsave (&instance->crashdump_lock, flags); +mutex_lock (&instance->crashdump_lock); buff_offset = instance->fw_crash_buffer_offset;if (!instance->crash_dump_buf || !((instance->fw_crash_state ==AVAILABLE ) || (instance->fw_crash_state ==COPYING ))) {dev_err (&instance->pdev->dev,"Firmware crash dump is not available\n" ); -spin_unlock_irqrestore (&instance->crashdump_lock, flags); +mutex_unlock (&instance->crashdump_lock);return -EINVAL ; }if (buff_offset > (instance->fw_crash_buffer_size * dmachunk)) {dev_err (&instance->pdev->dev,"Firmware crash dump offset is out of range\n" ); -spin_unlock_irqrestore (&instance->crashdump_lock, flags); +mutex_unlock (&instance->crashdump_lock);return 0 ; }
@@ -3272,7 +3270,7 @@ fw_crash_buffer_show(struct device *cdev, src_addr = (unsigned long )instance->crash_buf[buff_offset / dmachunk] + (buff_offset % dmachunk);memcpy (buf, (void *)src_addr, size); -spin_unlock_irqrestore (&instance->crashdump_lock, flags); +mutex_unlock (&instance->crashdump_lock);return size; }
@@ -3297,7 +3295,6 @@ fw_crash_state_store(struct device *cdev,struct megasas_instance *instance = (struct megasas_instance *) shost->hostdata;int val =0 ; -unsigned long flags;if (kstrtoint (buf,0 , &val) !=0 )return -EINVAL ;
@@ -3311,9 +3308,9 @@ fw_crash_state_store(struct device *cdev, instance->fw_crash_state = val;if ((val ==COPIED ) || (val ==COPY_ERROR )) { -spin_lock_irqsave (&instance->crashdump_lock, flags); +mutex_lock (&instance->crashdump_lock);megasas_free_host_crash_buffer (instance); -spin_unlock_irqrestore (&instance->crashdump_lock, flags); +mutex_unlock (&instance->crashdump_lock);if (val ==COPY_ERROR )dev_info (&instance->pdev->dev,"application failed to " "copy Firmware crash dump\n" );
@@ -7325,7 +7322,7 @@ static inline void megasas_init_ctrl_params(struct megasas_instance *instance)init_waitqueue_head (&instance->int_cmd_wait_q);init_waitqueue_head (&instance->abort_cmd_wait_q); -spin_lock_init (&instance->crashdump_lock); +mutex_init (&instance->crashdump_lock);spin_lock_init (&instance->mfi_pool_lock);spin_lock_init (&instance->hba_lock);spin_lock_init (&instance->stream_lock);
drivers/scsi/pm8001/pm8001_init.c +17 -34
84 lines not on this page · raw message
drivers/scsi/qla2xxx/qla_dfs.c +3 -3
@@ -116,7 +116,7 @@ qla2x00_dfs_create_rport(scsi_qla_host_t *vha, struct fc_port *fp)sprintf (wwn,"pn-%016llx" ,wwn_to_u64 (fp->port_name)); fp->dfs_rport_dir =debugfs_create_dir (wwn, vha->dfs_rport_root); -if (!fp->dfs_rport_dir) +if (IS_ERR (fp->dfs_rport_dir))return ;if (NVME_TARGET (vha->hw, fp)) debugfs_create_file("dev_loss_tmo", 0600, fp->dfs_rport_dir,
@@ -571,14 +571,14 @@ qla2x00_dfs_setup(scsi_qla_host_t *vha)if (IS_QLA27XX (ha) ||IS_QLA83XX (ha) ||IS_QLA28XX (ha)) { ha->tgt.dfs_naqp =debugfs_create_file ("naqp" ,0400 , ha->dfs_dir, vha, &dfs_naqp_ops); -if (!ha->tgt.dfs_naqp) { +if (IS_ERR (ha->tgt.dfs_naqp)) {ql_log (ql_log_warn, vha,0xd011 ,"Unable to create debugFS naqp node.\n" ); goto out; } } vha->dfs_rport_root =debugfs_create_dir ("rports" , ha->dfs_dir); -if (!vha->dfs_rport_root) { +if (IS_ERR (vha->dfs_rport_root)) {ql_log (ql_log_warn, vha,0xd012 ,"Unable to create debugFS rports node.\n" ); goto out;
drivers/target/iscsi/iscsi_target_configfs.c +27 -27
129 lines not on this page · raw message
drivers/tty/serial/cpm_uart/cpm_uart_core.c +4 -9
@@ -1263,19 +1263,14 @@ static void cpm_uart_console_write(struct console *co, const char *s, {struct uart_cpm_port *pinfo = &cpm_uart_ports[co->index];unsigned long flags; -int nolock = oops_in_progress; -if (unlikely (nolock)) { +if (unlikely (oops_in_progress)) {local_irq_save (flags); - }else { -spin_lock_irqsave (&pinfo->port.lock, flags); - } - -cpm_uart_early_write (pinfo, s, count, true); - -if (unlikely (nolock)) { +cpm_uart_early_write (pinfo, s, count, true);local_irq_restore (flags); }else { +spin_lock_irqsave (&pinfo->port.lock, flags); +cpm_uart_early_write (pinfo, s, count, true);spin_unlock_irqrestore (&pinfo->port.lock, flags); } }
drivers/usb/gadget/udc/fsl_qe_udc.c +5 -1
@@ -1950,9 +1950,13 @@ static void ch9getstatus(struct qe_udc *udc, u8 request_type, u16 value, }else if ((request_type &USB_RECIP_MASK ) ==USB_RECIP_ENDPOINT ) {/* Get endpoint status */ int pipe = index &USB_ENDPOINT_NUMBER_MASK ; -struct qe_ep *target_ep = &udc->eps[pipe]; +struct qe_ep *target_ep;u16 usep; +if (pipe >=USB_MAX_ENDPOINTS ) + goto stall; + target_ep = &udc->eps[pipe]; +/* stall if endpoint doesn't exist */ if (!target_ep->ep.desc) goto stall;
fs/attr.c +18 -2
@@ -309,9 +309,25 @@ int notify_change(struct dentry * dentry, struct iattr * attr, struct inode **de }if ((ia_valid &ATTR_MODE )) { -umode_t amode = attr->ia_mode; +/* +* Don't allow changing the mode of symlinks: +* +* (1) The vfs doesn't take the mode of symlinks into account +* during permission checking. +* (2) This has never worked correctly. Most major filesystems +* did return EOPNOTSUPP due to interactions with POSIX ACLs +* but did still updated the mode of the symlink. +* This inconsistency led system call wrapper providers such +* as libc to block changing the mode of symlinks with +* EOPNOTSUPP already. +* (3) To even do this in the first place one would have to use +* specific file descriptors and quite some effort. +*/ +if (S_ISLNK (inode->i_mode)) +return -EOPNOTSUPP ; +/* Flag setting protected by i_mutex */ -if (is_sxid (amode)) +if (is_sxid (attr->ia_mode)) inode->i_flags &= ~S_NOSEC ; }
fs/autofs/waitq.c +2 -1
@@ -32,8 +32,9 @@ void autofs_catatonic_mode(struct autofs_sb_info *sbi) wq->status = -ENOENT ;/* Magic is gone - report failure */ kfree (wq->name.name); wq->name.name =NULL ; - wq->wait_ctr--;wake_up_interruptible (&wq->queue); +if (!--wq->wait_ctr) +kfree (wq); wq = nwq; }fput (sbi->pipe);/* Close the pipe */
fs/btrfs/ctree.h +0 -2
@@ -529,8 +529,6 @@ struct btrfs_swapfile_pin {int bg_extent_count; }; -bool btrfs_pinned_by_swapfile (struct btrfs_fs_info *fs_info,void *ptr); -enum {BTRFS_FS_BARRIER ,BTRFS_FS_CLOSING_START ,
fs/btrfs/delayed-inode.c +16 -3
@@ -1173,20 +1173,33 @@ static int __btrfs_run_delayed_items(struct btrfs_trans_handle *trans, int nr) ret =__btrfs_commit_inode_delayed_items (trans, path, curr_node);if (ret) { -btrfs_release_delayed_node (curr_node); - curr_node =NULL ;btrfs_abort_transaction (trans, ret);break ; } prev_node = curr_node; curr_node =btrfs_next_delayed_node (curr_node); +/* +* See the comment below about releasing path before releasing +* node. If the commit of delayed items was successful the path +* should always be released, but in case of an error, it may +* point to locked extent buffers (a leaf at the very least). +*/ +ASSERT (path->nodes[0 ] ==NULL );btrfs_release_delayed_node (prev_node); } +/* +* Release the path to avoid a potential deadlock and lockdep splat when +* releasing the delayed node, as that requires taking the delayed node's +* mutex. If another task starts running delayed items before we take +* the mutex, it will first lock the mutex and then it may try to lock +* the same btree path (leaf). +*/ +btrfs_free_path (path); +if (curr_node)btrfs_release_delayed_node (curr_node); -btrfs_free_path (path); trans->block_rsv = block_rsv;return ret;
fs/btrfs/disk-io.c +3 -5
@@ -2503,13 +2503,11 @@ static int validate_super(struct btrfs_fs_info *fs_info, ret = -EINVAL ; } -if (btrfs_fs_incompat (fs_info,METADATA_UUID ) && -memcmp (fs_info->fs_devices->metadata_uuid, - fs_info->super_copy->metadata_uuid,BTRFS_FSID_SIZE )) { +if (memcmp (fs_info->fs_devices->metadata_uuid,btrfs_sb_fsid_ptr (sb), +BTRFS_FSID_SIZE ) !=0 ) {btrfs_err (fs_info,"superblock metadata_uuid doesn't match metadata uuid of fs_devices: %pU != %pU" , - fs_info->super_copy->metadata_uuid, - fs_info->fs_devices->metadata_uuid); +btrfs_sb_fsid_ptr (sb), fs_info->fs_devices->metadata_uuid); ret = -EINVAL ; }
fs/btrfs/extent-tree.c +5 -0
@@ -857,6 +857,11 @@ int lookup_inline_extent_backref(struct btrfs_trans_handle *trans, err = -ENOENT ; goto out; }else if (WARN_ON (ret)) { +btrfs_print_leaf (path->nodes[0 ]); +btrfs_err (fs_info, +"extent item not found for insert, bytenr %llu num_bytes %llu parent %llu root_objectid %llu owner %llu offset %llu" , + bytenr, num_bytes, parent, root_objectid, owner, + offset); err = -EIO ; goto out; }
fs/btrfs/ioctl.c +7 -1
@@ -2550,6 +2550,13 @@ static int btrfs_search_path_in_tree_user(struct inode *inode, goto out_put; } +/* +* We don't need the path anymore, so release it and +* avoid deadlocks and lockdep warnings in case +* btrfs_iget() needs to lookup the inode from its root +* btree and lock the same leaf. +*/ +btrfs_release_path (path); temp_inode =btrfs_iget (sb, key2.objectid, root);if (IS_ERR (temp_inode)) { ret =PTR_ERR (temp_inode);
@@ -2569,7 +2576,6 @@ static int btrfs_search_path_in_tree_user(struct inode *inode, goto out_put; } -btrfs_release_path (path); key.objectid = key.offset; key.offset = (u64)-1 ; dirid = key.objectid;
fs/btrfs/volumes.c +8 -0
@@ -718,6 +718,14 @@ static int btrfs_open_one_device(struct btrfs_fs_devices *fs_devices,return -EINVAL ; } +u8 *btrfs_sb_fsid_ptr (struct btrfs_super_block *sb) +{ +bool has_metadata_uuid = (btrfs_super_incompat_flags (sb) & +BTRFS_FEATURE_INCOMPAT_METADATA_UUID ); + +return has_metadata_uuid ? sb->metadata_uuid : sb->fsid; +} +/* * Handle scanned device having its CHANGING_FSID_V2 flag set and the fs_devices * being created with a disk that has already completed its fsid change. Such
fs/btrfs/volumes.h +3 -0
@@ -580,4 +580,7 @@ int btrfs_bg_type_to_factor(u64 flags);const char *btrfs_bg_type_to_raid_name (u64 flags);int btrfs_verify_dev_extents (struct btrfs_fs_info *fs_info); +bool btrfs_pinned_by_swapfile (struct btrfs_fs_info *fs_info,void *ptr); +u8 *btrfs_sb_fsid_ptr (struct btrfs_super_block *sb); +#endif
fs/ext2/xattr.c +2 -2
@@ -694,10 +694,10 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,/* We need to allocate a new block */ ext2_fsblk_t goal =ext2_group_first_block_no (sb,EXT2_I (inode)->i_block_group); -int block =ext2_new_block (inode, goal, &error); +ext2_fsblk_t block =ext2_new_block (inode, goal, &error);if (error) goto cleanup; -ea_idebug (inode,"creating block %d" , block); +ea_idebug (inode,"creating block %lu" , block); new_bh =sb_getblk (sb, block);if (unlikely (!new_bh)) {
fs/ext4/namei.c +15 -11
@@ -339,17 +339,17 @@ static struct ext4_dir_entry_tail *get_dirent_tail(struct inode *inode, struct buffer_head *bh) {struct ext4_dir_entry_tail *t; +int blocksize =EXT4_BLOCK_SIZE (inode->i_sb);#ifdef PARANOID struct ext4_dir_entry *d, *top; d = (struct ext4_dir_entry *)bh->b_data; top = (struct ext4_dir_entry *)(bh->b_data + - (EXT4_BLOCK_SIZE (inode->i_sb) - -sizeof (struct ext4_dir_entry_tail ))); -while (d < top && d->rec_len) + (blocksize -sizeof (struct ext4_dir_entry_tail ))); +while (d < top &&ext4_rec_len_from_disk (d->rec_len, blocksize)) d = (struct ext4_dir_entry *)(((void *)d) + -le16_to_cpu (d->rec_len)); +ext4_rec_len_from_disk (d->rec_len, blocksize));if (d != top)return NULL ;
@@ -360,7 +360,8 @@ static struct ext4_dir_entry_tail *get_dirent_tail(struct inode *inode,#endif if (t->det_reserved_zero1 || -le16_to_cpu (t->det_rec_len) !=sizeof (struct ext4_dir_entry_tail ) || + (ext4_rec_len_from_disk (t->det_rec_len, blocksize) != +sizeof (struct ext4_dir_entry_tail )) || t->det_reserved_zero2 || t->det_reserved_ft !=EXT4_FT_DIR_CSUM )return NULL ;
@@ -441,13 +442,14 @@ static struct dx_countlimit *get_dx_countlimit(struct inode *inode,struct ext4_dir_entry *dp;struct dx_root_info *root;int count_offset; +int blocksize =EXT4_BLOCK_SIZE (inode->i_sb); +unsigned int rlen =ext4_rec_len_from_disk (dirent->rec_len, blocksize); -if (le16_to_cpu (dirent->rec_len) ==EXT4_BLOCK_SIZE (inode->i_sb)) +if (rlen == blocksize) count_offset =8 ; -else if (le16_to_cpu (dirent->rec_len) ==12 ) { +else if (rlen ==12 ) { dp = (struct ext4_dir_entry *)(((void *)dirent) +12 ); -if (le16_to_cpu (dp->rec_len) != -EXT4_BLOCK_SIZE (inode->i_sb) -12 ) +if (ext4_rec_len_from_disk (dp->rec_len, blocksize) != blocksize -12 )return NULL ; root = (struct dx_root_info *)(((void *)dp +12 )); if (root->reserved_zero ||
@@ -1256,6 +1258,7 @@ static int dx_make_map(struct inode *dir, struct buffer_head *bh,unsigned int buflen = bh->b_size;char *base = bh->b_data;struct dx_hash_info h = *hinfo; +int blocksize =EXT4_BLOCK_SIZE (dir->i_sb);if (ext4_has_metadata_csum (dir->i_sb)) buflen -=sizeof (struct ext4_dir_entry_tail );
@@ -1269,11 +1272,12 @@ static int dx_make_map(struct inode *dir, struct buffer_head *bh, map_tail--; map_tail->hash = h.hash; map_tail->offs = ((char *) de - base)>>2 ; - map_tail->size =le16_to_cpu (de->rec_len); + map_tail->size =ext4_rec_len_from_disk (de->rec_len, + blocksize); count++;cond_resched (); } - de =ext4_next_entry (de, dir->i_sb->s_blocksize); + de =ext4_next_entry (de, blocksize); }return count; }
fs/jfs/jfs_dmap.c +1 -0
@@ -269,6 +269,7 @@ int dbUnmount(struct inode *ipbmap, int mounterror)/* free the memory for the in-memory bmap. */ kfree (bmp); +JFS_SBI (ipbmap->i_sb)->bmap =NULL ;return (0 ); }
fs/jfs/jfs_imap.c +1 -0
@@ -195,6 +195,7 @@ int diUnmount(struct inode *ipimap, int mounterror)* free in-memory control structure */ kfree (imap); +JFS_IP (ipimap)->i_imap =NULL ;return (0 ); }
fs/locks.c +1 -1
@@ -1339,6 +1339,7 @@ static int posix_lock_inode(struct inode *inode, struct file_lock *request, out:spin_unlock (&ctx->flc_lock);percpu_up_read (&file_rwsem); +trace_posix_lock_inode (inode, request, error);/* * Free any unused locks. */
@@ -1347,7 +1348,6 @@ static int posix_lock_inode(struct inode *inode, struct file_lock *request,if (new_fl2)locks_free_lock (new_fl2);locks_dispose_list (&dispose); -trace_posix_lock_inode (inode, request, error);return error; }
fs/nfsd/nfs4proc.c +2 -2
@@ -881,8 +881,8 @@ nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, rename->rn_tname, rename->rn_tnamelen);if (status)return status; -set_change_info (&rename->rn_sinfo, &cstate->current_fh); -set_change_info (&rename->rn_tinfo, &cstate->save_fh); +set_change_info (&rename->rn_sinfo, &cstate->save_fh); +set_change_info (&rename->rn_tinfo, &cstate->current_fh);return nfs_ok; }
fs/overlayfs/file.c +3 -6
@@ -19,7 +19,6 @@ struct ovl_aio_req {struct kiocb iocb;refcount_t ref;struct kiocb *orig_iocb; -struct fd fd; };static struct kmem_cache *ovl_aio_request_cachep;
@@ -261,7 +260,7 @@ static rwf_t ovl_iocb_to_rwf(int ifl)static inline void ovl_aio_put (struct ovl_aio_req *aio_req) {if (refcount_dec_and_test (&aio_req->ref)) { -fdput (aio_req->fd); +fput (aio_req->iocb.ki_filp);kmem_cache_free (ovl_aio_request_cachep, aio_req); } }
@@ -327,10 +326,9 @@ static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter)if (!aio_req) goto out; - aio_req->fd = real; real.flags =0 ; aio_req->orig_iocb = iocb; -kiocb_clone (&aio_req->iocb, iocb, real.file); +kiocb_clone (&aio_req->iocb, iocb,get_file (real.file)); aio_req->iocb.ki_complete = ovl_aio_rw_complete;refcount_set (&aio_req->ref,2 ); ret =vfs_iocb_iter_read (real.file, &aio_req->iocb, iter);
@@ -399,10 +397,9 @@ static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter)/* Pacify lockdep, same trick as done in aio_write() */ __sb_writers_release (file_inode (real.file)->i_sb,SB_FREEZE_WRITE ); - aio_req->fd = real; real.flags =0 ; aio_req->orig_iocb = iocb; -kiocb_clone (&aio_req->iocb, iocb, real.file); +kiocb_clone (&aio_req->iocb, iocb,get_file (real.file)); aio_req->iocb.ki_flags = ifl; aio_req->iocb.ki_complete = ovl_aio_rw_complete;refcount_set (&aio_req->ref,2 );
fs/proc/base.c +38 -8
76 lines not on this page · raw message
fs/tracefs/inode.c +3 -0
@@ -554,6 +554,9 @@ static struct dentry *__create_dir(const char *name, struct dentry *parent,*/ struct dentry *tracefs_create_dir (const char *name,struct dentry *parent) { +if (security_locked_down (LOCKDOWN_TRACEFS )) +return NULL ; +return __create_dir (name, parent, &simple_dir_inode_operations); }
include/linux/acpi_iort.h +1 -0
@@ -21,6 +21,7 @@*/ #define IORT_SMMU_V3_PMCG_GENERIC 0x00000000/* Generic SMMUv3 PMCG */ #define IORT_SMMU_V3_PMCG_HISI_HIP08 0x00000001/* HiSilicon HIP08 PMCG */ +#define IORT_SMMU_V3_PMCG_HISI_HIP09 0x00000002/* HiSilicon HIP09 PMCG */ int iort_register_domain_token (int trans_id,phys_addr_t base,struct fwnode_handle *fw_node);
include/linux/libata.h +4 -0
@@ -260,6 +260,10 @@ enum {ATA_HOST_PARALLEL_SCAN = (1 <<2 ),/* Ports on this host can be scanned in parallel */ ATA_HOST_IGNORE_ATA = (1 <<3 ),/* Ignore ATA devices on this host. */ +ATA_HOST_NO_PART = (1 <<4 ),/* Host does not support partial */ +ATA_HOST_NO_SSC = (1 <<5 ),/* Host does not support slumber */ +ATA_HOST_NO_DEVSLP = (1 <<6 ),/* Host does not support devslp */ +/* bits 24:31 of host->flags are reserved for LLD specific flags */ /* various lengths of time */
include/linux/perf_event.h +19 -3
@@ -1069,15 +1069,31 @@ extern int perf_event_output(struct perf_event *event, struct pt_regs *regs);static inline bool -is_default_overflow_handler (struct perf_event *event) +__is_default_overflow_handler (perf_overflow_handler_t overflow_handler) { -if (likely (event->overflow_handler == perf_event_output_forward)) +if (likely (overflow_handler == perf_event_output_forward))return true; -if (unlikely (event->overflow_handler == perf_event_output_backward)) +if (unlikely (overflow_handler == perf_event_output_backward))return true;return false; } +#define is_default_overflow_handler (event) \ + __is_default_overflow_handler((event)->overflow_handler) + +#ifdef CONFIG_BPF_SYSCALL +static inline bool uses_default_overflow_handler (struct perf_event *event) +{ +if (likely (is_default_overflow_handler (event))) +return true; + +return __is_default_overflow_handler (event->orig_overflow_handler); +} +#else +#define uses_default_overflow_handler (event) \ + is_default_overflow_handler(event) +#endif + extern void perf_event_header__init_id(struct perf_event_header *header, struct perf_sample_data *data,
include/linux/sched/task.h +27 -1
@@ -110,10 +110,36 @@ static inline struct task_struct *get_task_struct(struct task_struct *t) }extern void __put_task_struct (struct task_struct *t); +extern void __put_task_struct_rcu_cb (struct rcu_head *rhp);static inline void put_task_struct (struct task_struct *t) { -if (refcount_dec_and_test (&t->usage)) +if (!refcount_dec_and_test (&t->usage)) +return ; + +/* +* under PREEMPT_RT, we can't call put_task_struct +* in atomic context because it will indirectly +* acquire sleeping locks. +* +* call_rcu() will schedule delayed_put_task_struct_rcu() +* to be called in process context. +* +* __put_task_struct() is called when +* refcount_dec_and_test(&t->usage) succeeds. +* +* This means that it can't "conflict" with +* put_task_struct_rcu_user() which abuses ->rcu the same +* way; rcu_users has a reference so task->usage can't be +* zero after rcu_users 1 -> 0 transition. +* +* delayed_free_task() also uses ->rcu, but it is only called +* when it fails to fork a process. Therefore, there is no +* way it can conflict with put_task_struct(). +*/ +if (IS_ENABLED (CONFIG_PREEMPT_RT ) && !preemptible ()) +call_rcu (&t->rcu, __put_task_struct_rcu_cb); +else __put_task_struct (t); }
include/uapi/linux/netfilter_bridge/ebtables.h +8 -6
@@ -182,12 +182,14 @@ struct ebt_entry {unsigned char sourcemsk[ETH_ALEN ];unsigned char destmac[ETH_ALEN ];unsigned char destmsk[ETH_ALEN ]; -/* sizeof ebt_entry + matches */ -unsigned int watchers_offset; -/* sizeof ebt_entry + matches + watchers */ -unsigned int target_offset; -/* sizeof ebt_entry + matches + watchers + target */ -unsigned int next_offset; + __struct_group(/* no tag */, offsets, /* no attrs */, +/* sizeof ebt_entry + matches */ + unsigned int watchers_offset; +/* sizeof ebt_entry + matches + watchers */ +unsigned int target_offset; +/* sizeof ebt_entry + matches + watchers + target */ +unsigned int next_offset; + ); unsigned char elems[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); };
kernel/fork.c +8 -0
@@ -745,6 +745,14 @@ void __put_task_struct(struct task_struct *tsk) }EXPORT_SYMBOL_GPL (__put_task_struct); +void __put_task_struct_rcu_cb (struct rcu_head *rhp) +{ + struct task_struct *task = container_of(rhp, struct task_struct, rcu); + +__put_task_struct (task); +} +EXPORT_SYMBOL_GPL (__put_task_struct_rcu_cb); +void __init __weak arch_task_cache_init (void ) { }/*
kernel/rcu/rcuscale.c +1 -1
@@ -372,7 +372,7 @@ rcu_scale_writer(void *arg)sched_set_fifo_low (current);if (holdoff) -schedule_timeout_uninterruptible (holdoff *HZ ); +schedule_timeout_idle (holdoff *HZ );/* * Wait until rcu_end_inkernel_boot() is called for normal GP tests
kernel/scftorture.c +4 -2
@@ -158,7 +158,8 @@ static void scf_torture_stats_print(void) scfs.n_all_wait += scf_stats_p[i].n_all_wait; }if (atomic_read (&n_errs) ||atomic_read (&n_mb_in_errs) || -atomic_read (&n_mb_out_errs) ||atomic_read (&n_alloc_errs)) +atomic_read (&n_mb_out_errs) || + (!IS_ENABLED (CONFIG_KASAN ) &&atomic_read (&n_alloc_errs))) bangstr ="!!! " ; pr_alert("%s %sscf_invoked_count %s: %lld single: %lld/%lld single_ofl: %lld/%lld many: %lld/%lld all: %lld/%lld ", SCFTORT_FLAG, bangstr, isdone ? "VER" : "ver", invoked_count,
@@ -306,7 +307,8 @@ static void scftorture_invoke_one(struct scf_statistics *scfp, struct torture_rapreempt_disable ();if (scfsp->scfs_prim ==SCF_PRIM_SINGLE || scfsp->scfs_wait) { scfcp =kmalloc (sizeof (*scfcp),GFP_ATOMIC ); -if (WARN_ON_ONCE (!scfcp)) { +if (!scfcp) { +WARN_ON_ONCE (!IS_ENABLED (CONFIG_KASAN ));atomic_inc (&n_alloc_errs); }else { scfcp->scfc_cpu =-1 ;
kernel/trace/trace.c +24 -2
@@ -7324,10 +7324,11 @@ static const struct file_operations tracing_max_lat_fops = {#endif static const struct file_operations set_tracer_fops = { - .open = tracing_open_generic, + .open = tracing_open_generic_tr, .read = tracing_set_trace_read, .write = tracing_set_trace_write, .llseek = generic_file_llseek, + .release = tracing_release_generic_tr, };static const struct file_operations tracing_pipe_fops = {
@@ -8366,12 +8367,33 @@ trace_options_write(struct file *filp, const char __user *ubuf, size_t cnt,return cnt; } +static int tracing_open_options (struct inode *inode,struct file *filp) +{ +struct trace_option_dentry *topt = inode->i_private; +int ret; + + ret =tracing_check_open_get_tr (topt->tr); +if (ret) +return ret; + + filp->private_data = inode->i_private; +return 0 ; +} + +static int tracing_release_options (struct inode *inode,struct file *file) +{ +struct trace_option_dentry *topt = file->private_data; + +trace_array_put (topt->tr); +return 0 ; +}static const struct file_operations trace_options_fops = { - .open = tracing_open_generic, + .open = tracing_open_options, .read = trace_options_read, .write = trace_options_write, .llseek = generic_file_llseek, + .release = tracing_release_options, };/*
lib/kobject.c +5 -0
@@ -874,6 +874,11 @@ int kset_register(struct kset *k)if (!k)return -EINVAL ; +if (!k->kobj.ktype) { +pr_err ("must have a ktype to be initialized properly!\n" ); +return -EINVAL ; + } +kset_init (k); err =kobject_add_internal (&k->kobj);if (err)
lib/mpi/mpi-cmp.c +6 -2
@@ -25,8 +25,12 @@ int mpi_cmp_ui(MPI u, unsigned long v)mpi_limb_t limb = v;mpi_normalize (u); -if (!u->nlimbs && !limb) -return 0 ; +if (u->nlimbs ==0 ) { +if (v ==0 ) +return 0 ; +else +return -1 ; + }if (u->sign)return -1 ;if (u->nlimbs >1 )
mm/filemap.c +3 -0
@@ -2203,6 +2203,9 @@ ssize_t generic_file_buffered_read(struct kiocb *iocb,if (unlikely (*ppos >= inode->i_sb->s_maxbytes))return 0 ; +if (unlikely (!iov_iter_count (iter))) +return 0 ; +iov_iter_truncate (iter, inode->i_sb->s_maxbytes); index = *ppos >>PAGE_SHIFT ;
net/bridge/netfilter/ebtables.c +1 -2
@@ -2001,8 +2001,7 @@ static int size_entry_mwt(const struct ebt_entry *entry, const unsigned char *bareturn ret; offsets[0 ] =sizeof (struct ebt_entry );/* matches come first */ -memcpy (&offsets[1 ], &entry->watchers_offset, -sizeof (offsets) -sizeof (offsets[0 ])); +memcpy (&offsets[1 ], &entry->offsets,sizeof (entry->offsets));if (state->buf_kern_start) { buf_start = state->buf_kern_start + state->buf_kern_offset;
net/core/devlink.c +2 -2
@@ -3620,7 +3620,7 @@ static int devlink_param_get(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) { - if (!param->get || devlink->reload_failed) + if (!param->get) return -EOPNOTSUPP;return param->get (devlink, param->id, ctx); }
@@ -3629,7 +3629,7 @@ static int devlink_param_set(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) { - if (!param->set || devlink->reload_failed) + if (!param->set) return -EOPNOTSUPP;return param->set (devlink, param->id, ctx); }
net/sched/Kconfig +0 -28
@@ -548,34 +548,6 @@ config CLS_U32_MARK help Say Y here to be able to use netfilter marks as u32 key. -config NET_CLS_RSVP - tristate "IPv4 Resource Reservation Protocol (RSVP)" - select NET_CLS - help - The Resource Reservation Protocol (RSVP) permits end systems to - request a minimum and maximum data flow rate for a connection; this - is important for real time data such as streaming sound or video. - - Say Y here if you want to be able to classify outgoing packets based - on their RSVP requests. - - To compile this code as a module, choose M here: the - module will be called cls_rsvp. - -config NET_CLS_RSVP6 - tristate "IPv6 Resource Reservation Protocol (RSVP6)" - select NET_CLS - help - The Resource Reservation Protocol (RSVP) permits end systems to - request a minimum and maximum data flow rate for a connection; this - is important for real time data such as streaming sound or video. - - Say Y here if you want to be able to classify outgoing packets based - on their RSVP requests and you are using the IPv6 protocol. - - To compile this code as a module, choose M here: the - module will be called cls_rsvp6. - config NET_CLS_FLOW tristate "Flow classifier" select NET_CLS
net/sched/Makefile +0 -2
@@ -68,8 +68,6 @@ obj-$(CONFIG_NET_SCH_TAPRIO) += sch_taprio.o obj-$(CONFIG_NET_CLS_U32) += cls_u32.o obj-$(CONFIG_NET_CLS_ROUTE4) += cls_route.o obj-$(CONFIG_NET_CLS_FW) += cls_fw.o -obj-$(CONFIG_NET_CLS_RSVP) += cls_rsvp.o -obj-$(CONFIG_NET_CLS_RSVP6) += cls_rsvp6.o obj-$(CONFIG_NET_CLS_BASIC) += cls_basic.o obj-$(CONFIG_NET_CLS_FLOW) += cls_flow.o obj-$(CONFIG_NET_CLS_CGROUP) += cls_cgroup.o
net/sched/cls_rsvp.c deleted +0 -24
@@ -1,24 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* -* net/sched/cls_rsvp.c Special RSVP packet classifier for IPv4. -* -* Authors: Alexey Kuznetsov, <[email protected]> -*/ - -#include <linux/module.h> -#include <linux/types.h> -#include <linux/kernel.h> -#include <linux/string.h> -#include <linux/errno.h> -#include <linux/skbuff.h> -#include <net/ip.h> -#include <net/netlink.h> -#include <net/act_api.h> -#include <net/pkt_cls.h> - -#define RSVP_DST_LEN 1 -#define RSVP_ID "rsvp" -#define RSVP_OPS cls_rsvp_ops - -#include "cls_rsvp.h" -MODULE_LICENSE ("GPL" );
net/sched/cls_rsvp.h deleted +0 -777
777 lines not on this page · raw message
net/sched/cls_rsvp6.c deleted +0 -24
@@ -1,24 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* -* net/sched/cls_rsvp6.c Special RSVP packet classifier for IPv6. -* -* Authors: Alexey Kuznetsov, <[email protected]> -*/ - -#include <linux/module.h> -#include <linux/types.h> -#include <linux/kernel.h> -#include <linux/string.h> -#include <linux/errno.h> -#include <linux/ipv6.h> -#include <linux/skbuff.h> -#include <net/act_api.h> -#include <net/pkt_cls.h> -#include <net/netlink.h> - -#define RSVP_DST_LEN 4 -#define RSVP_ID "rsvp6" -#define RSVP_OPS cls_rsvp6_ops - -#include "cls_rsvp.h" -MODULE_LICENSE ("GPL" );
samples/hw_breakpoint/data_breakpoint.c +3 -1
@@ -70,7 +70,9 @@ static int __init hw_break_module_init(void) static void __exit hw_break_module_exit(void) {unregister_wide_hw_breakpoint (sample_hbp); -symbol_put (ksym_name); +#ifdef CONFIG_MODULE_UNLOAD +__symbol_put (ksym_name); +#endif printk (KERN_INFO "HW Breakpoint for %s write uninstalled\n" , ksym_name); }
sound/hda/intel-dsp-config.c +8 -0
@@ -368,6 +368,14 @@ static const struct config_entry config_table[] = { },#endif +/* Lunar Lake */ +#if IS_ENABLED (CONFIG_SND_SOC_SOF_LUNARLAKE ) +/* Lunarlake-P */ + { + .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, + .device = PCI_DEVICE_ID_INTEL_HDA_LNL_P,
Lines of this file are not shown. View the raw message.
tools/perf/Makefile.config +25 -22
47 lines not on this page · raw message
tools/testing/selftests/ftrace/ftracetest +8 -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.