···19211921 Format:19221922 <bus_id>,<clkrate>1923192319241924+ i2c_touchscreen_props= [HW,ACPI,X86]19251925+ Set device-properties for ACPI-enumerated I2C-attached19261926+ touchscreen, to e.g. fix coordinates of upside-down19271927+ mounted touchscreens. If you need this option please19281928+ submit a drivers/platform/x86/touchscreen_dmi.c patch19291929+ adding a DMI quirk for this.19301930+19311931+ Format:19321932+ <ACPI_HW_ID>:<prop_name>=<val>[:prop_name=val][:...]19331933+ Where <val> is one of:19341934+ Omit "=<val>" entirely Set a boolean device-property19351935+ Unsigned number Set a u32 device-property19361936+ Anything else Set a string device-property19371937+19381938+ Examples (split over multiple lines):19391939+ i2c_touchscreen_props=GDIX1001:touchscreen-inverted-x:19401940+ touchscreen-inverted-y19411941+19421942+ i2c_touchscreen_props=MSSL1680:touchscreen-size-x=1920:19431943+ touchscreen-size-y=1080:touchscreen-inverted-y:19441944+ firmware-name=gsl1680-vendor-model.fw:silead,home-button19451945+19241946 i8042.debug [HW] Toggle i8042 debug mode19251947 i8042.unmask_kbd_data19261948 [HW] Enable printing of interrupt data from the KBD port
+3-1
Documentation/arch/riscv/uabi.rst
···6565Misaligned accesses6666-------------------67676868-Misaligned accesses are supported in userspace, but they may perform poorly.6868+Misaligned scalar accesses are supported in userspace, but they may perform6969+poorly. Misaligned vector accesses are only supported if the Zicclsm extension7070+is supported.
+1-1
Documentation/core-api/swiotlb.rst
···192192193193Dynamic swiotlb194194---------------195195-When CONFIG_DYNAMIC_SWIOTLB is enabled, swiotlb can do on-demand expansion of195195+When CONFIG_SWIOTLB_DYNAMIC is enabled, swiotlb can do on-demand expansion of196196the amount of memory available for allocation as bounce buffers. If a bounce197197buffer request fails due to lack of available space, an asynchronous background198198task is kicked off to allocate memory from general system memory and turn it
···24242525 managers:2626 type: object2727+ additionalProperties: false2728 description:2829 List of the PD69208T4/PD69204T4/PD69208M PSE managers. Each manager2930 have 4 or 8 physical ports according to the chip version. No need to···4847 - "#size-cells"49485049 patternProperties:5151- "^manager@0[0-9a-b]$":5050+ "^manager@[0-9a-b]$":5251 type: object5252+ additionalProperties: false5353 description:5454 PD69208T4/PD69204T4/PD69208M PSE manager exposing 4 or 8 physical5555 ports.···7169 patternProperties:7270 '^port@[0-7]$':7371 type: object7272+ additionalProperties: false7373+7474+ properties:7575+ reg:7676+ maxItems: 17777+7478 required:7579 - reg7676- additionalProperties: false77807881 required:7982 - reg
···2929 of the ports conversion matrix that establishes relationship between3030 the logical ports and the physical channels.3131 type: object3232+ additionalProperties: false3333+3434+ properties:3535+ "#address-cells":3636+ const: 13737+3838+ "#size-cells":3939+ const: 032403341 patternProperties:3442 '^channel@[0-7]$':3543 type: object4444+ additionalProperties: false4545+4646+ properties:4747+ reg:4848+ maxItems: 14949+3650 required:3751 - reg5252+5353+ required:5454+ - "#address-cells"5555+ - "#size-cells"38563957unevaluatedProperties: false4058
+4
Documentation/netlink/specs/netdev.yaml
···350350 buffer space, host descriptors etc.351351 type: uint352352 -353353+ name: rx-csum-complete354354+ doc: Number of packets that were marked as CHECKSUM_COMPLETE.355355+ type: uint356356+ -353357 name: rx-csum-unnecessary354358 doc: Number of packets that were marked as CHECKSUM_UNNECESSARY.355359 type: uint
+1-1
Documentation/process/maintainer-netdev.rst
···227227 The amount of mooing will depend on packet rate so should match228228 the diurnal cycle quite well.229229230230- Signed-of-by: Joe Defarmer <joe@barn.org>230230+ Signed-off-by: Joe Defarmer <joe@barn.org>231231 ---232232 v3:233233 - add a note about time-of-day mooing fluctuation to the commit message
+2-2
MAINTAINERS
···38543854M: Daniel Borkmann <daniel@iogearbox.net>38553855M: Alexei Starovoitov <ast@kernel.org>38563856M: Puranjay Mohan <puranjay@kernel.org>38573857+R: Xu Kuohai <xukuohai@huaweicloud.com>38573858L: bpf@vger.kernel.org38583859S: Supported38593860F: arch/arm64/net/···51885187F: drivers/media/cec/i2c/ch7322.c5189518851905189CIRRUS LOGIC AUDIO CODEC DRIVERS51915191-M: James Schulman <james.schulman@cirrus.com>51925190M: David Rhodes <david.rhodes@cirrus.com>51935191M: Richard Fitzgerald <rf@opensource.cirrus.com>51945192L: alsa-devel@alsa-project.org (moderated for non-subscribers)···21316213162131721317STARFIVE DWMAC GLUE LAYER2131821318M: Emil Renner Berthing <kernel@esmil.dk>2131921319-M: Samin Guo <samin.guo@starfivetech.com>2131921319+M: Minda Chen <minda.chen@starfivetech.com>2132021320S: Maintained2132121321F: Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml2132221322F: drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
···39394040/************** Functions that the back-end must provide **************/4141/* Extension for 32-bit operations. */4242-inline u8 zext(u8 *buf, u8 rd);4242+u8 zext(u8 *buf, u8 rd);4343/***** Moves *****/4444u8 mov_r32(u8 *buf, u8 rd, u8 rs, u8 sign_ext);4545u8 mov_r32_i32(u8 *buf, u8 reg, s32 imm);
+6-4
arch/arc/net/bpf_jit_arcv2.c
···6262 * If/when we decide to add ARCv2 instructions that do use register pairs,6363 * the mapping, hopefully, doesn't need to be revisited.6464 */6565-const u8 bpf2arc[][2] = {6565+static const u8 bpf2arc[][2] = {6666 /* Return value from in-kernel function, and exit value from eBPF */6767 [BPF_REG_0] = {ARC_R_8, ARC_R_9},6868 /* Arguments from eBPF program to in-kernel function */···1302130213031303/************* Packers (Deal with BPF_REGs) **************/1304130413051305-inline u8 zext(u8 *buf, u8 rd)13051305+u8 zext(u8 *buf, u8 rd)13061306{13071307 if (rd != BPF_REG_FP)13081308 return arc_movi_r(buf, REG_HI(rd), 0);···22352235 break;22362236 default:22372237 /* The caller must have handled this. */22382238+ break;22382239 }22392240 } else {22402241 /*···22542253 break;22552254 default:22562255 /* The caller must have handled this. */22562256+ break;22572257 }22582258 }22592259···25192517#define JCC64_NR_OF_JMPS 3 /* Number of jumps in jcc64 template. */25202518#define JCC64_INSNS_TO_END 3 /* Number of insn. inclusive the 2nd jmp to end. */25212519#define JCC64_SKIP_JMP 1 /* Index of the "skip" jump to "end". */25222522-const struct {25202520+static const struct {25232521 /*25242522 * "jit_off" is common between all "jmp[]" and is coupled with25252523 * "cond" of each "jmp[]" instance. e.g.:···28852883 * The "ARC_CC_SET" becomes "CC_unequal" because of the "tst"28862884 * instruction that precedes the conditional branch.28872885 */28882888-const u8 arcv2_32_jmps[ARC_CC_LAST] = {28862886+static const u8 arcv2_32_jmps[ARC_CC_LAST] = {28892887 [ARC_CC_UGT] = CC_great_u,28902888 [ARC_CC_UGE] = CC_great_eq_u,28912889 [ARC_CC_ULT] = CC_less_u,
+11-11
arch/arc/net/bpf_jit_core.c
···159159/* Initialise the context so there's no garbage. */160160static int jit_ctx_init(struct jit_context *ctx, struct bpf_prog *prog)161161{162162- memset(ctx, 0, sizeof(ctx));162162+ memset(ctx, 0, sizeof(*ctx));163163164164 ctx->orig_prog = prog;165165···167167 ctx->prog = bpf_jit_blind_constants(prog);168168 if (IS_ERR(ctx->prog))169169 return PTR_ERR(ctx->prog);170170- ctx->blinded = (ctx->prog == ctx->orig_prog ? false : true);170170+ ctx->blinded = (ctx->prog != ctx->orig_prog);171171172172 /* If the verifier doesn't zero-extend, then we have to do it. */173173 ctx->do_zext = !ctx->prog->aux->verifier_zext;···11821182}1183118311841184/*11851185- * All the "handle_*()" functions have been called before by the11861186- * "jit_prepare()". If there was an error, we would know by now.11871187- * Therefore, no extra error checking at this point, other than11881188- * a sanity check at the end that expects the calculated length11891189- * (jit.len) to be equal to the length of generated instructions11901190- * (jit.index).11851185+ * jit_compile() is the real compilation phase. jit_prepare() is11861186+ * invoked before jit_compile() as a dry-run to make sure everything11871187+ * will go OK and allocate the necessary memory.11881188+ *11891189+ * In the end, jit_compile() checks if it has produced the same number11901190+ * of instructions as jit_prepare() would.11911191 */11921192static int jit_compile(struct jit_context *ctx)11931193{···1407140714081408/*14091409 * This function may be invoked twice for the same stream of BPF14101410- * instructions. The "extra pass" happens, when there are "call"s14111411- * involved that their addresses are not known during the first14121412- * invocation.14101410+ * instructions. The "extra pass" happens, when there are14111411+ * (re)locations involved that their addresses are not known14121412+ * during the first run.14131413 */14141414struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)14151415{
+1-1
arch/powerpc/Kconfig
···137137 select ARCH_HAS_GCOV_PROFILE_ALL138138 select ARCH_HAS_HUGEPD if HUGETLB_PAGE139139 select ARCH_HAS_KCOV140140- select ARCH_HAS_KERNEL_FPU_SUPPORT if PPC_FPU140140+ select ARCH_HAS_KERNEL_FPU_SUPPORT if PPC64 && PPC_FPU141141 select ARCH_HAS_MEMBARRIER_CALLBACKS142142 select ARCH_HAS_MEMBARRIER_SYNC_CORE143143 select ARCH_HAS_MEMREMAP_COMPAT_ALIGN if PPC_64S_HASH_MMU
···900900901901 /* Get offset into TMP_REG */902902 EMIT(PPC_RAW_LI(tmp_reg, off));903903+ /*904904+ * Enforce full ordering for operations with BPF_FETCH by emitting a 'sync'905905+ * before and after the operation.906906+ *907907+ * This is a requirement in the Linux Kernel Memory Model.908908+ * See __cmpxchg_u32() in asm/cmpxchg.h as an example.909909+ */910910+ if ((imm & BPF_FETCH) && IS_ENABLED(CONFIG_SMP))911911+ EMIT(PPC_RAW_SYNC());903912 tmp_idx = ctx->idx * 4;904913 /* load value from memory into r0 */905914 EMIT(PPC_RAW_LWARX(_R0, tmp_reg, dst_reg, 0));···962953963954 /* For the BPF_FETCH variant, get old data into src_reg */964955 if (imm & BPF_FETCH) {956956+ /* Emit 'sync' to enforce full ordering */957957+ if (IS_ENABLED(CONFIG_SMP))958958+ EMIT(PPC_RAW_SYNC());965959 EMIT(PPC_RAW_MR(ret_reg, ax_reg));966960 if (!fp->aux->verifier_zext)967961 EMIT(PPC_RAW_LI(ret_reg - 1, 0)); /* higher 32-bit */
+12
arch/powerpc/net/bpf_jit_comp64.c
···846846847847 /* Get offset into TMP_REG_1 */848848 EMIT(PPC_RAW_LI(tmp1_reg, off));849849+ /*850850+ * Enforce full ordering for operations with BPF_FETCH by emitting a 'sync'851851+ * before and after the operation.852852+ *853853+ * This is a requirement in the Linux Kernel Memory Model.854854+ * See __cmpxchg_u64() in asm/cmpxchg.h as an example.855855+ */856856+ if ((imm & BPF_FETCH) && IS_ENABLED(CONFIG_SMP))857857+ EMIT(PPC_RAW_SYNC());849858 tmp_idx = ctx->idx * 4;850859 /* load value from memory into TMP_REG_2 */851860 if (size == BPF_DW)···917908 PPC_BCC_SHORT(COND_NE, tmp_idx);918909919910 if (imm & BPF_FETCH) {911911+ /* Emit 'sync' to enforce full ordering */912912+ if (IS_ENABLED(CONFIG_SMP))913913+ EMIT(PPC_RAW_SYNC());920914 EMIT(PPC_RAW_MR(ret_reg, _R0));921915 /*922916 * Skip unnecessary zero-extension for 32-bit cmpxchg.
+2-2
arch/powerpc/platforms/pseries/lparcfg.c
···371371372372static void read_lpar_name(struct seq_file *m)373373{374374- if (read_rtas_lpar_name(m) && read_dt_lpar_name(m))375375- pr_err_once("Error can't get the LPAR name");374374+ if (read_rtas_lpar_name(m))375375+ read_dt_lpar_name(m);376376}377377378378#define SPLPAR_MAXLENGTH 1026*(sizeof(char))
+1-1
arch/riscv/Kconfig
···106106 select HAS_IOPORT if MMU107107 select HAVE_ARCH_AUDITSYSCALL108108 select HAVE_ARCH_HUGE_VMALLOC if HAVE_ARCH_HUGE_VMAP109109- select HAVE_ARCH_HUGE_VMAP if MMU && 64BIT && !XIP_KERNEL109109+ select HAVE_ARCH_HUGE_VMAP if MMU && 64BIT110110 select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL111111 select HAVE_ARCH_JUMP_LABEL_RELATIVE if !XIP_KERNEL112112 select HAVE_ARCH_KASAN if MMU && 64BIT
···269269 c->x86_phys_bits -= keyid_bits;270270}271271272272+void intel_unlock_cpuid_leafs(struct cpuinfo_x86 *c)273273+{274274+ if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)275275+ return;276276+277277+ if (c->x86 < 6 || (c->x86 == 6 && c->x86_model < 0xd))278278+ return;279279+280280+ /*281281+ * The BIOS can have limited CPUID to leaf 2, which breaks feature282282+ * enumeration. Unlock it and update the maximum leaf info.283283+ */284284+ if (msr_clear_bit(MSR_IA32_MISC_ENABLE, MSR_IA32_MISC_ENABLE_LIMIT_CPUID_BIT) > 0)285285+ c->cpuid_level = cpuid_eax(0);286286+}287287+272288static void early_init_intel(struct cpuinfo_x86 *c)273289{274290 u64 misc_enable;275275-276276- /* Unmask CPUID levels if masked: */277277- if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) {278278- if (msr_clear_bit(MSR_IA32_MISC_ENABLE,279279- MSR_IA32_MISC_ENABLE_LIMIT_CPUID_BIT) > 0) {280280- c->cpuid_level = cpuid_eax(0);281281- get_cpu_cap(c);282282- }283283- }284291285292 if ((c->x86 == 0xf && c->x86_model >= 0x03) ||286293 (c->x86 == 0x6 && c->x86_model >= 0x0e))
+2-2
arch/x86/kernel/cpu/topology_amd.c
···84848585 /*8686 * If leaf 0xb is available, then the domain shifts are set8787- * already and nothing to do here.8787+ * already and nothing to do here. Only valid for family >= 0x17.8888 */8989- if (!has_topoext) {8989+ if (!has_topoext && tscan->c->x86 >= 0x17) {9090 /*9191 * Leaf 0x80000008 set the CORE domain shift already.9292 * Update the SMT domain, but do not propagate it.
+8-2
block/blk-settings.c
···104104static int blk_validate_limits(struct queue_limits *lim)105105{106106 unsigned int max_hw_sectors;107107+ unsigned int logical_block_sectors;107108108109 /*109110 * Unless otherwise specified, default to 512 byte logical blocks and a···135134 lim->max_hw_sectors = BLK_SAFE_MAX_SECTORS;136135 if (WARN_ON_ONCE(lim->max_hw_sectors < PAGE_SECTORS))137136 return -EINVAL;137137+ logical_block_sectors = lim->logical_block_size >> SECTOR_SHIFT;138138+ if (WARN_ON_ONCE(logical_block_sectors > lim->max_hw_sectors))139139+ return -EINVAL;138140 lim->max_hw_sectors = round_down(lim->max_hw_sectors,139139- lim->logical_block_size >> SECTOR_SHIFT);141141+ logical_block_sectors);140142141143 /*142144 * The actual max_sectors value is a complex beast and also takes the···157153 lim->max_sectors = min(max_hw_sectors, BLK_DEF_MAX_SECTORS_CAP);158154 }159155 lim->max_sectors = round_down(lim->max_sectors,160160- lim->logical_block_size >> SECTOR_SHIFT);156156+ logical_block_sectors);161157162158 /*163159 * Random default for the maximum number of segments. Driver should not···615611 unsigned int top, bottom, alignment, ret = 0;616612617613 t->max_sectors = min_not_zero(t->max_sectors, b->max_sectors);614614+ t->max_user_sectors = min_not_zero(t->max_user_sectors,615615+ b->max_user_sectors);618616 t->max_hw_sectors = min_not_zero(t->max_hw_sectors, b->max_hw_sectors);619617 t->max_dev_sectors = min_not_zero(t->max_dev_sectors, b->max_dev_sectors);620618 t->max_write_zeroes_sectors = min(t->max_write_zeroes_sectors,
···9595 bool has_rules_bps[2];9696 bool has_rules_iops[2];97979898- /* internally used bytes per second rate limits */9898+ /* bytes per second rate limits */9999 uint64_t bps[2];100100- /* user configured bps limits */101101- uint64_t bps_conf[2];102100103103- /* internally used IOPS limits */101101+ /* IOPS limits */104102 unsigned int iops[2];105105- /* user configured IOPS limits */106106- unsigned int iops_conf[2];107103108104 /* Number of bytes dispatched in current slice */109105 uint64_t bytes_disp[2];
+36-11
block/blk-zoned.c
···450450 return test_bit(disk_zone_no(disk, sector), disk->conv_zones_bitmap);451451}452452453453+static bool disk_zone_is_last(struct gendisk *disk, struct blk_zone *zone)454454+{455455+ return zone->start + zone->len >= get_capacity(disk);456456+}457457+458458+static bool disk_zone_is_full(struct gendisk *disk,459459+ unsigned int zno, unsigned int offset_in_zone)460460+{461461+ if (zno < disk->nr_zones - 1)462462+ return offset_in_zone >= disk->zone_capacity;463463+ return offset_in_zone >= disk->last_zone_capacity;464464+}465465+466466+static bool disk_zone_wplug_is_full(struct gendisk *disk,467467+ struct blk_zone_wplug *zwplug)468468+{469469+ return disk_zone_is_full(disk, zwplug->zone_no, zwplug->wp_offset);470470+}471471+453472static bool disk_insert_zone_wplug(struct gendisk *disk,454473 struct blk_zone_wplug *zwplug)455474{···562543 return false;563544564545 /* We can remove zone write plugs for zones that are empty or full. */565565- return !zwplug->wp_offset || zwplug->wp_offset >= disk->zone_capacity;546546+ return !zwplug->wp_offset || disk_zone_wplug_is_full(disk, zwplug);566547}567548568549static void disk_remove_zone_wplug(struct gendisk *disk,···683664static void disk_zone_wplug_abort_unaligned(struct gendisk *disk,684665 struct blk_zone_wplug *zwplug)685666{686686- unsigned int zone_capacity = disk->zone_capacity;687667 unsigned int wp_offset = zwplug->wp_offset;688668 struct bio_list bl = BIO_EMPTY_LIST;689669 struct bio *bio;690670691671 while ((bio = bio_list_pop(&zwplug->bio_list))) {692692- if (wp_offset >= zone_capacity ||672672+ if (disk_zone_is_full(disk, zwplug->zone_no, wp_offset) ||693673 (bio_op(bio) != REQ_OP_ZONE_APPEND &&694674 bio_offset_from_zone_start(bio) != wp_offset)) {695675 blk_zone_wplug_bio_io_error(zwplug, bio);···927909 sector_t req_back_sector = blk_rq_pos(req) + blk_rq_sectors(req);928910 struct request_queue *q = req->q;929911 struct gendisk *disk = q->disk;930930- unsigned int zone_capacity = disk->zone_capacity;931912 struct blk_zone_wplug *zwplug =932913 disk_get_zone_wplug(disk, blk_rq_pos(req));933914 unsigned long flags;···950933 * into the back of the request.951934 */952935 spin_lock_irqsave(&zwplug->lock, flags);953953- while (zwplug->wp_offset < zone_capacity) {936936+ while (!disk_zone_wplug_is_full(disk, zwplug)) {954937 bio = bio_list_peek(&zwplug->bio_list);955938 if (!bio)956939 break;···996979 * We know such BIO will fail, and that would potentially overflow our997980 * write pointer offset beyond the end of the zone.998981 */999999- if (zwplug->wp_offset >= disk->zone_capacity)982982+ if (disk_zone_wplug_is_full(disk, zwplug))1000983 goto err;10019841002985 if (bio_op(bio) == REQ_OP_ZONE_APPEND) {···15731556 kfree(disk->conv_zones_bitmap);15741557 disk->conv_zones_bitmap = NULL;15751558 disk->zone_capacity = 0;15591559+ disk->last_zone_capacity = 0;15761560 disk->nr_zones = 0;15771561}15781562···16181600 unsigned long *conv_zones_bitmap;16191601 unsigned int nr_zones;16201602 unsigned int zone_capacity;16031603+ unsigned int last_zone_capacity;16211604 sector_t sector;16221605};16231606···1636161716371618 disk->nr_zones = args->nr_zones;16381619 disk->zone_capacity = args->zone_capacity;16201620+ disk->last_zone_capacity = args->last_zone_capacity;16391621 swap(disk->conv_zones_bitmap, args->conv_zones_bitmap);16401622 if (disk->conv_zones_bitmap)16411623 nr_conv_zones = bitmap_weight(disk->conv_zones_bitmap,···16881668 return -ENODEV;16891669 }1690167016711671+ if (disk_zone_is_last(disk, zone))16721672+ args->last_zone_capacity = zone->capacity;16731673+16911674 if (!disk_need_zone_resources(disk))16921675 return 0;16931676···1716169317171694 /*17181695 * Remember the capacity of the first sequential zone and check17191719- * if it is constant for all zones.16961696+ * if it is constant for all zones, ignoring the last zone as it can be16971697+ * smaller.17201698 */17211699 if (!args->zone_capacity)17221700 args->zone_capacity = zone->capacity;17231723- if (zone->capacity != args->zone_capacity) {17011701+ if (disk_zone_is_last(disk, zone)) {17021702+ args->last_zone_capacity = zone->capacity;17031703+ } else if (zone->capacity != args->zone_capacity) {17241704 pr_warn("%s: Invalid variable zone capacity\n",17251705 disk->disk_name);17261706 return -ENODEV;···17581732{17591733 struct blk_revalidate_zone_args *args = data;17601734 struct gendisk *disk = args->disk;17611761- sector_t capacity = get_capacity(disk);17621735 sector_t zone_sectors = disk->queue->limits.chunk_sectors;17631736 int ret;17641737···17681743 return -ENODEV;17691744 }1770174517711771- if (zone->start >= capacity || !zone->len) {17461746+ if (zone->start >= get_capacity(disk) || !zone->len) {17721747 pr_warn("%s: Invalid zone start %llu, length %llu\n",17731748 disk->disk_name, zone->start, zone->len);17741749 return -ENODEV;···17781753 * All zones must have the same size, with the exception on an eventual17791754 * smaller last zone.17801755 */17811781- if (zone->start + zone->len < capacity) {17561756+ if (!disk_zone_is_last(disk, zone)) {17821757 if (zone->len != zone_sectors) {17831758 pr_warn("%s: Invalid zoned device with non constant zone size\n",17841759 disk->disk_name);
-1
drivers/ata/ahci.c
···429429 { PCI_VDEVICE(INTEL, 0x02d7), board_ahci_pcs_quirk }, /* Comet Lake PCH RAID */430430 /* Elkhart Lake IDs 0x4b60 & 0x4b62 https://sata-io.org/product/8803 not tested yet */431431 { PCI_VDEVICE(INTEL, 0x4b63), board_ahci_pcs_quirk }, /* Elkhart Lake AHCI */432432- { PCI_VDEVICE(INTEL, 0x7ae2), board_ahci_pcs_quirk }, /* Alder Lake-P AHCI */433432434433 /* JMicron 360/1/3/5/6, match class to avoid IDE function */435434 { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+8-1
drivers/ata/libata-core.c
···41364136 { "PIONEER BD-RW BDR-207M", NULL, ATA_HORKAGE_NOLPM },41374137 { "PIONEER BD-RW BDR-205", NULL, ATA_HORKAGE_NOLPM },4138413841394139- /* Crucial BX100 SSD 500GB has broken LPM support */41394139+ /* Crucial devices with broken LPM support */41404140 { "CT500BX100SSD1", NULL, ATA_HORKAGE_NOLPM },41414141+ { "CT240BX500SSD1", NULL, ATA_HORKAGE_NOLPM },4141414241424143 /* 512GB MX100 with MU01 firmware has both queued TRIM and LPM issues */41434144 { "Crucial_CT512MX100*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM |···41554154 { "Crucial_CT960M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |41564155 ATA_HORKAGE_ZERO_AFTER_TRIM |41574156 ATA_HORKAGE_NOLPM },41574157+41584158+ /* AMD Radeon devices with broken LPM support */41594159+ { "R3SL240G", NULL, ATA_HORKAGE_NOLPM },41604160+41614161+ /* Apacer models with LPM issues */41624162+ { "Apacer AS340*", NULL, ATA_HORKAGE_NOLPM },4158416341594164 /* These specific Samsung models/firmware-revs do not handle LPM well */41604165 { "SAMSUNG MZMPC128HBFU-000MV", "CXM14M1Q", ATA_HORKAGE_NOLPM },
···494494495495 set_bit(NULLB_DEV_FL_CONFIGURED, &dev->flags);496496 dev->power = newp;497497+ ret = count;497498 } else if (dev->power && !newp) {498499 if (test_and_clear_bit(NULLB_DEV_FL_UP, &dev->flags)) {499500 dev->power = newp;
+12-1
drivers/block/null_blk/zoned.c
···7474 return -EINVAL;7575 }76767777+ /*7878+ * If a smaller zone capacity was requested, do not allow a smaller last7979+ * zone at the same time as such zone configuration does not correspond8080+ * to any real zoned device.8181+ */8282+ if (dev->zone_capacity != dev->zone_size &&8383+ dev->size & (dev->zone_size - 1)) {8484+ pr_err("A smaller last zone is not allowed with zone capacity smaller than zone size.\n");8585+ return -EINVAL;8686+ }8787+7788 zone_capacity_sects = mb_to_sects(dev->zone_capacity);7889 dev_capacity_sects = mb_to_sects(dev->size);7990 dev->zone_size_sects = mb_to_sects(dev->zone_size);···119108 if (dev->zone_max_active && dev->zone_max_open > dev->zone_max_active) {120109 dev->zone_max_open = dev->zone_max_active;121110 pr_info("changed the maximum number of open zones to %u\n",122122- dev->nr_zones);111111+ dev->zone_max_open);123112 } else if (dev->zone_max_open >= dev->nr_zones - dev->zone_nr_conv) {124113 dev->zone_max_open = 0;125114 pr_info("zone_max_open limit disabled, limit >= zone count\n");
+4-43
drivers/char/hw_random/core.c
···6464 return RNG_BUFFER_SIZE;6565}66666767-static void add_early_randomness(struct hwrng *rng)6868-{6969- int bytes_read;7070-7171- mutex_lock(&reading_mutex);7272- bytes_read = rng_get_data(rng, rng_fillbuf, 32, 0);7373- mutex_unlock(&reading_mutex);7474- if (bytes_read > 0) {7575- size_t entropy = bytes_read * 8 * rng->quality / 1024;7676- add_hwgenerator_randomness(rng_fillbuf, bytes_read, entropy, false);7777- }7878-}7979-8067static inline void cleanup_rng(struct kref *kref)8168{8269 struct hwrng *rng = container_of(kref, struct hwrng, ref);···327340 const char *buf, size_t len)328341{329342 int err;330330- struct hwrng *rng, *old_rng, *new_rng;343343+ struct hwrng *rng, *new_rng;331344332345 err = mutex_lock_interruptible(&rng_mutex);333346 if (err)334347 return -ERESTARTSYS;335348336336- old_rng = current_rng;337349 if (sysfs_streq(buf, "")) {338350 err = enable_best_rng();339351 } else {···348362 new_rng = get_current_rng_nolock();349363 mutex_unlock(&rng_mutex);350364351351- if (new_rng) {352352- if (new_rng != old_rng)353353- add_early_randomness(new_rng);365365+ if (new_rng)354366 put_rng(new_rng);355355- }356367357368 return err ? : len;358369}···527544{528545 int err = -EINVAL;529546 struct hwrng *tmp;530530- bool is_new_current = false;531547532548 if (!rng->name || (!rng->data_read && !rng->read))533549 goto out;···555573 err = set_current_rng(rng);556574 if (err)557575 goto out_unlock;558558- /* to use current_rng in add_early_randomness() we need559559- * to take a ref560560- */561561- is_new_current = true;562562- kref_get(&rng->ref);563576 }564577 mutex_unlock(&rng_mutex);565565- if (is_new_current || !rng->init) {566566- /*567567- * Use a new device's input to add some randomness to568568- * the system. If this rng device isn't going to be569569- * used right away, its init function hasn't been570570- * called yet by set_current_rng(); so only use the571571- * randomness from devices that don't need an init callback572572- */573573- add_early_randomness(rng);574574- }575575- if (is_new_current)576576- put_rng(rng);577578 return 0;578579out_unlock:579580 mutex_unlock(&rng_mutex);···567602568603void hwrng_unregister(struct hwrng *rng)569604{570570- struct hwrng *old_rng, *new_rng;605605+ struct hwrng *new_rng;571606 int err;572607573608 mutex_lock(&rng_mutex);574609575575- old_rng = current_rng;576610 list_del(&rng->list);577611 complete_all(&rng->dying);578612 if (current_rng == rng) {···590626 } else591627 mutex_unlock(&rng_mutex);592628593593- if (new_rng) {594594- if (old_rng != new_rng)595595- add_early_randomness(new_rng);629629+ if (new_rng)596630 put_rng(new_rng);597597- }598631599632 wait_for_completion(&rng->cleanup_done);600633}
+1-1
drivers/char/tpm/Kconfig
···29293030config TCG_TPM2_HMAC3131 bool "Use HMAC and encrypted transactions on the TPM bus"3232- default y3232+ default X86_643333 select CRYPTO_ECDH3434 select CRYPTO_LIB_AESCFB3535 select CRYPTO_LIB_SHA256
-26
drivers/char/tpm/tpm-buf.c
···223223}224224EXPORT_SYMBOL_GPL(tpm_buf_read_u32);225225226226-static u16 tpm_buf_tag(struct tpm_buf *buf)227227-{228228- struct tpm_header *head = (struct tpm_header *)buf->data;229226230230- return be16_to_cpu(head->tag);231231-}232232-233233-/**234234- * tpm_buf_parameters - return the TPM response parameters area of the tpm_buf235235- * @buf: tpm_buf to use236236- *237237- * Where the parameters are located depends on the tag of a TPM238238- * command (it's immediately after the header for TPM_ST_NO_SESSIONS239239- * or 4 bytes after for TPM_ST_SESSIONS). Evaluate this and return a240240- * pointer to the first byte of the parameters area.241241- *242242- * @return: pointer to parameters area243243- */244244-u8 *tpm_buf_parameters(struct tpm_buf *buf)245245-{246246- int offset = TPM_HEADER_SIZE;247247-248248- if (tpm_buf_tag(buf) == TPM2_ST_SESSIONS)249249- offset += 4;250250-251251- return &buf->data[offset];252252-}
+9-1
drivers/char/tpm/tpm2-cmd.c
···281281int tpm2_get_random(struct tpm_chip *chip, u8 *dest, size_t max)282282{283283 struct tpm2_get_random_out *out;284284+ struct tpm_header *head;284285 struct tpm_buf buf;285286 u32 recd;286287 u32 num_bytes = max;···289288 int total = 0;290289 int retries = 5;291290 u8 *dest_ptr = dest;291291+ off_t offset;292292293293 if (!num_bytes || max > TPM_MAX_RNG_DATA)294294 return -EINVAL;···322320 goto out;323321 }324322325325- out = (struct tpm2_get_random_out *)tpm_buf_parameters(&buf);323323+ head = (struct tpm_header *)buf.data;324324+ offset = TPM_HEADER_SIZE;325325+ /* Skip the parameter size field: */326326+ if (be16_to_cpu(head->tag) == TPM2_ST_SESSIONS)327327+ offset += 4;328328+329329+ out = (struct tpm2_get_random_out *)&buf.data[offset];326330 recd = min_t(u32, be16_to_cpu(out->size), num_bytes);327331 if (tpm_buf_length(&buf) <328332 TPM_HEADER_SIZE +
+19-2
drivers/char/tpm/tpm2-sessions.c
···8080/* maximum number of names the TPM must remember for authorization */8181#define AUTH_MAX_NAMES 382828383+#define AES_KEY_BYTES AES_KEYSIZE_1288484+#define AES_KEY_BITS (AES_KEY_BYTES*8)8585+8386static int tpm2_create_primary(struct tpm_chip *chip, u32 hierarchy,8487 u32 *handle, u8 *name);8588···957954}958955EXPORT_SYMBOL(tpm2_start_auth_session);959956957957+/*958958+ * A mask containing the object attributes for the kernel held null primary key959959+ * used in HMAC encryption. For more information on specific attributes look up960960+ * to "8.3 TPMA_OBJECT (Object Attributes)".961961+ */962962+#define TPM2_OA_NULL_KEY ( \963963+ TPM2_OA_NO_DA | \964964+ TPM2_OA_FIXED_TPM | \965965+ TPM2_OA_FIXED_PARENT | \966966+ TPM2_OA_SENSITIVE_DATA_ORIGIN | \967967+ TPM2_OA_USER_WITH_AUTH | \968968+ TPM2_OA_DECRYPT | \969969+ TPM2_OA_RESTRICTED)970970+960971/**961972 * tpm2_parse_create_primary() - parse the data returned from TPM_CC_CREATE_PRIMARY962973 *···10351018 val = tpm_buf_read_u32(buf, &offset_t);1036101910371020 /* object properties */10381038- if (val != TPM2_OA_TMPL)10211021+ if (val != TPM2_OA_NULL_KEY)10391022 return -EINVAL;1040102310411024 /* auth policy (empty) */···11951178 tpm_buf_append_u16(&template, TPM_ALG_SHA256);1196117911971180 /* object properties */11981198- tpm_buf_append_u32(&template, TPM2_OA_TMPL);11811181+ tpm_buf_append_u32(&template, TPM2_OA_NULL_KEY);1199118212001183 /* sauth policy (empty) */12011184 tpm_buf_append_u16(&template, 0);
+2-1
drivers/char/tpm/tpm_tis_spi_main.c
···3737#include "tpm_tis_spi.h"38383939#define MAX_SPI_FRAMESIZE 644040+#define SPI_HDRSIZE 440414142/*4243 * TCG SPI flow control is documented in section 6.4 of the spec[1]. In short,···248247int tpm_tis_spi_init(struct spi_device *spi, struct tpm_tis_spi_phy *phy,249248 int irq, const struct tpm_tis_phy_ops *phy_ops)250249{251251- phy->iobuf = devm_kmalloc(&spi->dev, MAX_SPI_FRAMESIZE, GFP_KERNEL);250250+ phy->iobuf = devm_kmalloc(&spi->dev, SPI_HDRSIZE + MAX_SPI_FRAMESIZE, GFP_KERNEL);252251 if (!phy->iobuf)253252 return -ENOMEM;254253
+6
drivers/dma-buf/st-dma-fence.c
···540540 t[i].before = pass;541541 t[i].task = kthread_run(thread_signal_callback, &t[i],542542 "dma-fence:%d", i);543543+ if (IS_ERR(t[i].task)) {544544+ ret = PTR_ERR(t[i].task);545545+ while (--i >= 0)546546+ kthread_stop_put(t[i].task);547547+ return ret;548548+ }543549 get_task_struct(t[i].task);544550 }545551
···579579};580580kunit_test_suite(packet_serdes_test_suite);581581582582+MODULE_DESCRIPTION("FireWire packet serialization/deserialization unit test suite");582583MODULE_LICENSE("GPL");
+1
drivers/firewire/uapi-test.c
···8686};8787kunit_test_suite(structure_layout_test_suite);88888989+MODULE_DESCRIPTION("FireWire UAPI unit test suite");8990MODULE_LICENSE("GPL");
+8-8
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
···196196 return -EINVAL;197197198198 vram_size = KFD_XCP_MEMORY_SIZE(adev, xcp_id);199199- if (adev->gmc.is_app_apu || adev->flags & AMD_IS_APU) {199199+ if (adev->flags & AMD_IS_APU) {200200 system_mem_needed = size;201201 ttm_mem_needed = size;202202 }···233233 if (adev && xcp_id >= 0) {234234 adev->kfd.vram_used[xcp_id] += vram_needed;235235 adev->kfd.vram_used_aligned[xcp_id] +=236236- (adev->gmc.is_app_apu || adev->flags & AMD_IS_APU) ?236236+ (adev->flags & AMD_IS_APU) ?237237 vram_needed :238238 ALIGN(vram_needed, VRAM_AVAILABLITY_ALIGN);239239 }···261261262262 if (adev) {263263 adev->kfd.vram_used[xcp_id] -= size;264264- if (adev->gmc.is_app_apu || adev->flags & AMD_IS_APU) {264264+ if (adev->flags & AMD_IS_APU) {265265 adev->kfd.vram_used_aligned[xcp_id] -= size;266266 kfd_mem_limit.system_mem_used -= size;267267 kfd_mem_limit.ttm_mem_used -= size;···890890 * if peer device has large BAR. In contrast, access over xGMI is891891 * allowed for both small and large BAR configurations of peer device892892 */893893- if ((adev != bo_adev && !(adev->gmc.is_app_apu || adev->flags & AMD_IS_APU)) &&893893+ if ((adev != bo_adev && !(adev->flags & AMD_IS_APU)) &&894894 ((mem->domain == AMDGPU_GEM_DOMAIN_VRAM) ||895895 (mem->alloc_flags & KFD_IOC_ALLOC_MEM_FLAGS_DOORBELL) ||896896 (mem->alloc_flags & KFD_IOC_ALLOC_MEM_FLAGS_MMIO_REMAP))) {···16581658 - atomic64_read(&adev->vram_pin_size)16591659 - reserved_for_pt;1660166016611661- if (adev->gmc.is_app_apu || adev->flags & AMD_IS_APU) {16611661+ if (adev->flags & AMD_IS_APU) {16621662 system_mem_available = no_system_mem_limit ?16631663 kfd_mem_limit.max_system_mem_limit :16641664 kfd_mem_limit.max_system_mem_limit -···17061706 if (flags & KFD_IOC_ALLOC_MEM_FLAGS_VRAM) {17071707 domain = alloc_domain = AMDGPU_GEM_DOMAIN_VRAM;1708170817091709- if (adev->gmc.is_app_apu || adev->flags & AMD_IS_APU) {17091709+ if (adev->flags & AMD_IS_APU) {17101710 domain = AMDGPU_GEM_DOMAIN_GTT;17111711 alloc_domain = AMDGPU_GEM_DOMAIN_GTT;17121712 alloc_flags = 0;···19531953 if (size) {19541954 if (!is_imported &&19551955 (mem->bo->preferred_domains == AMDGPU_GEM_DOMAIN_VRAM ||19561956- ((adev->gmc.is_app_apu || adev->flags & AMD_IS_APU) &&19561956+ ((adev->flags & AMD_IS_APU) &&19571957 mem->bo->preferred_domains == AMDGPU_GEM_DOMAIN_GTT)))19581958 *size = bo_size;19591959 else···23762376 (*mem)->bo = bo;23772377 (*mem)->va = va;23782378 (*mem)->domain = (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM) &&23792379- !(adev->gmc.is_app_apu || adev->flags & AMD_IS_APU) ?23792379+ !(adev->flags & AMD_IS_APU) ?23802380 AMDGPU_GEM_DOMAIN_VRAM : AMDGPU_GEM_DOMAIN_GTT;2381238123822382 (*mem)->mapped_to_gpu_memory = 0;
+12-7
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
···59445944 *speed = PCI_SPEED_UNKNOWN;59455945 *width = PCIE_LNK_WIDTH_UNKNOWN;5946594659475947- while ((parent = pci_upstream_bridge(parent))) {59485948- /* skip upstream/downstream switches internal to dGPU*/59495949- if (parent->vendor == PCI_VENDOR_ID_ATI)59505950- continue;59515951- *speed = pcie_get_speed_cap(parent);59525952- *width = pcie_get_width_cap(parent);59535953- break;59475947+ if (amdgpu_device_pcie_dynamic_switching_supported(adev)) {59485948+ while ((parent = pci_upstream_bridge(parent))) {59495949+ /* skip upstream/downstream switches internal to dGPU*/59505950+ if (parent->vendor == PCI_VENDOR_ID_ATI)59515951+ continue;59525952+ *speed = pcie_get_speed_cap(parent);59535953+ *width = pcie_get_width_cap(parent);59545954+ break;59555955+ }59565956+ } else {59575957+ /* use the current speeds rather than max if switching is not supported */59585958+ pcie_bandwidth_available(adev->pdev, NULL, speed, width);59545959 }59555960}59565961
···408408 f2g = &gfx_v11_kfd2kgd;409409 break;410410 case IP_VERSION(11, 0, 3):411411- if ((adev->pdev->device == 0x7460 &&412412- adev->pdev->revision == 0x00) ||413413- (adev->pdev->device == 0x7461 &&414414- adev->pdev->revision == 0x00))415415- /* Note: Compiler version is 11.0.5 while HW version is 11.0.3 */416416- gfx_target_version = 110005;417417- else418418- /* Note: Compiler version is 11.0.1 while HW version is 11.0.3 */419419- gfx_target_version = 110001;411411+ /* Note: Compiler version is 11.0.1 while HW version is 11.0.3 */412412+ gfx_target_version = 110001;420413 f2g = &gfx_v11_kfd2kgd;421414 break;422415 case IP_VERSION(11, 5, 0):
+1-1
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
···10231023 if (amdgpu_ip_version(adev, GC_HWIP, 0) < IP_VERSION(9, 0, 1))10241024 return -EINVAL;1025102510261026- if (adev->gmc.is_app_apu || adev->flags & AMD_IS_APU)10261026+ if (adev->flags & AMD_IS_APU)10271027 return 0;1028102810291029 pgmap = &kfddev->pgmap;
···239239 if (size < chunk_size)240240 return -EINVAL;241241242242- if (chunk_size < PAGE_SIZE)242242+ if (chunk_size < SZ_4K)243243 return -EINVAL;244244245245 if (!is_power_of_2(chunk_size))
+5
drivers/gpu/drm/drm_gem_shmem_helper.c
···233233234234 dma_resv_assert_held(shmem->base.resv);235235236236+ drm_WARN_ON(shmem->base.dev, shmem->base.import_attach);237237+236238 ret = drm_gem_shmem_get_pages(shmem);237239238240 return ret;···612610613611 return ret;614612 }613613+614614+ if (is_cow_mapping(vma->vm_flags))615615+ return -EINVAL;615616616617 dma_resv_lock(shmem->base.resv, NULL);617618 ret = drm_gem_shmem_get_pages(shmem);
+21-11
drivers/gpu/drm/i915/display/intel_audio.c
···12521252static void i915_audio_component_init(struct drm_i915_private *i915)12531253{12541254 u32 aud_freq, aud_freq_init;12551255- int ret;12561256-12571257- ret = component_add_typed(i915->drm.dev,12581258- &i915_audio_component_bind_ops,12591259- I915_COMPONENT_AUDIO);12601260- if (ret < 0) {12611261- drm_err(&i915->drm,12621262- "failed to add audio component (%d)\n", ret);12631263- /* continue with reduced functionality */12641264- return;12651265- }1266125512671256 if (DISPLAY_VER(i915) >= 9) {12681257 aud_freq_init = intel_de_read(i915, AUD_FREQ_CNTRL);···1274128512751286 /* init with current cdclk */12761287 intel_audio_cdclk_change_post(i915);12881288+}12891289+12901290+static void i915_audio_component_register(struct drm_i915_private *i915)12911291+{12921292+ int ret;12931293+12941294+ ret = component_add_typed(i915->drm.dev,12951295+ &i915_audio_component_bind_ops,12961296+ I915_COMPONENT_AUDIO);12971297+ if (ret < 0) {12981298+ drm_err(&i915->drm,12991299+ "failed to add audio component (%d)\n", ret);13001300+ /* continue with reduced functionality */13011301+ return;13021302+ }1277130312781304 i915->display.audio.component_registered = true;12791305}···13191315{13201316 if (intel_lpe_audio_init(i915) < 0)13211317 i915_audio_component_init(i915);13181318+}13191319+13201320+void intel_audio_register(struct drm_i915_private *i915)13211321+{13221322+ if (!i915->display.audio.lpe.platdev)13231323+ i915_audio_component_register(i915);13221324}1323132513241326/**
···263263 i915_request_put(rq);264264 }265265266266+ /* Lazy irq enabling after HW submission */266267 if (!READ_ONCE(b->irq_armed) && !list_empty(&b->signalers))267268 intel_breadcrumbs_arm_irq(b);269269+270270+ /* And confirm that we still want irqs enabled before we yield */271271+ if (READ_ONCE(b->irq_armed) && !atomic_read(&b->active))272272+ intel_breadcrumbs_disarm_irq(b);268273}269274270275struct intel_breadcrumbs *···320315 return;321316322317 /* Kick the work once more to drain the signalers, and disarm the irq */323323- irq_work_sync(&b->irq_work);324324- while (READ_ONCE(b->irq_armed) && !atomic_read(&b->active)) {325325- local_irq_disable();326326- signal_irq_work(&b->irq_work);327327- local_irq_enable();328328- cond_resched();329329- }318318+ irq_work_queue(&b->irq_work);330319}331320332321void intel_breadcrumbs_free(struct kref *kref)···403404 * the request as it may have completed and raised the interrupt as404405 * we were attaching it into the lists.405406 */406406- if (!b->irq_armed || __i915_request_is_complete(rq))407407+ if (!READ_ONCE(b->irq_armed) || __i915_request_is_complete(rq))407408 irq_work_queue(&b->irq_work);408409}409410
+6
drivers/gpu/drm/i915/gt/intel_engine_cs.c
···885885 if (IS_DG2(gt->i915)) {886886 u8 first_ccs = __ffs(CCS_MASK(gt));887887888888+ /*889889+ * Store the number of active cslices before890890+ * changing the CCS engine configuration891891+ */892892+ gt->ccs.cslices = CCS_MASK(gt);893893+888894 /* Mask off all the CCS engine */889895 info->engine_mask &= ~GENMASK(CCS3, CCS0);890896 /* Put back in the first CCS engine */
+1-1
drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.c
···19192020 /* Build the value for the fixed CCS load balancing */2121 for (cslice = 0; cslice < I915_MAX_CCS; cslice++) {2222- if (CCS_MASK(gt) & BIT(cslice))2222+ if (gt->ccs.cslices & BIT(cslice))2323 /*2424 * If available, assign the cslice2525 * to the first available engine...
+8
drivers/gpu/drm/i915/gt/intel_gt_types.h
···207207 [MAX_ENGINE_INSTANCE + 1];208208 enum intel_submission_method submission_method;209209210210+ struct {211211+ /*212212+ * Mask of the non fused CCS slices213213+ * to be used for the load balancing214214+ */215215+ intel_engine_mask_t cslices;216216+ } ccs;217217+210218 /*211219 * Default address space (either GGTT or ppGTT depending on arch).212220 *
···142142 struct nvif_ioctl_v0 ioctl;143143 struct nvif_ioctl_mthd_v0 mthd;144144 } *args;145145+ u32 args_size;145146 u8 stack[128];146147 int ret;147148148148- if (sizeof(*args) + size > sizeof(stack)) {149149- if (!(args = kmalloc(sizeof(*args) + size, GFP_KERNEL)))149149+ if (check_add_overflow(sizeof(*args), size, &args_size))150150+ return -ENOMEM;151151+152152+ if (args_size > sizeof(stack)) {153153+ args = kmalloc(args_size, GFP_KERNEL);154154+ if (!args)150155 return -ENOMEM;151156 } else {152157 args = (void *)stack;···162157 args->mthd.method = mthd;163158164159 memcpy(args->mthd.data, data, size);165165- ret = nvif_object_ioctl(object, args, sizeof(*args) + size, NULL);160160+ ret = nvif_object_ioctl(object, args, args_size, NULL);166161 memcpy(data, args->mthd.data, size);167162 if (args != (void *)stack)168163 kfree(args);···281276 object->map.size = 0;282277283278 if (parent) {284284- if (!(args = kmalloc(sizeof(*args) + size, GFP_KERNEL))) {279279+ u32 args_size;280280+281281+ if (check_add_overflow(sizeof(*args), size, &args_size)) {282282+ nvif_object_dtor(object);283283+ return -ENOMEM;284284+ }285285+286286+ args = kmalloc(args_size, GFP_KERNEL);287287+ if (!args) {285288 nvif_object_dtor(object);286289 return -ENOMEM;287290 }···306293 args->new.oclass = oclass;307294308295 memcpy(args->new.data, data, size);309309- ret = nvif_object_ioctl(parent, args, sizeof(*args) + size,310310- &object->priv);296296+ ret = nvif_object_ioctl(parent, args, args_size, &object->priv);311297 memcpy(data, args->new.data, size);312298 kfree(args);313299 if (ret == 0)
+2
drivers/gpu/drm/panel/Kconfig
···340340 depends on OF341341 depends on DRM_MIPI_DSI342342 depends on BACKLIGHT_CLASS_DEVICE343343+ select DRM_DISPLAY_DP_HELPER344344+ select DRM_DISPLAY_HELPER343345 help344346 Say Y here if you want to enable support for LG sw43408 panel.345347 The panel has a 1080x2160@60Hz resolution and uses 24 bit RGB per
···3434#include "xe_sync.h"3535#include "xe_trace.h"3636#include "xe_vm.h"3737-#include "xe_wa.h"38373938/**4039 * struct xe_migrate - migrate context.···299300}300301301302/*302302- * Due to workaround 16017236439, odd instance hardware copy engines are303303- * faster than even instance ones.304304- * This function returns the mask involving all fast copy engines and the305305- * reserved copy engine to be used as logical mask for migrate engine.306303 * Including the reserved copy engine is required to avoid deadlocks due to307304 * migrate jobs servicing the faults gets stuck behind the job that faulted.308305 */···312317 if (hwe->class != XE_ENGINE_CLASS_COPY)313318 continue;314319315315- if (!XE_WA(gt, 16017236439) ||316316- xe_gt_is_usm_hwe(gt, hwe) || hwe->instance & 1)320320+ if (xe_gt_is_usm_hwe(gt, hwe))317321 logical_mask |= BIT(hwe->logical_instance);318322 }319323···363369 if (!hwe || !logical_mask)364370 return ERR_PTR(-EINVAL);365371372372+ /*373373+ * XXX: Currently only reserving 1 (likely slow) BCS instance on374374+ * PVC, may want to revisit if performance is needed.375375+ */366376 m->q = xe_exec_queue_create(xe, vm, logical_mask, 1, hwe,367377 EXEC_QUEUE_FLAG_KERNEL |368378 EXEC_QUEUE_FLAG_PERMANENT |
···876876877877 ret = fwnode_property_read_u32(child, "shunt-resistor-micro-ohms", &val);878878 if (!ret) {879879- if (!val)879879+ if (!val) {880880+ fwnode_handle_put(child);880881 return dev_err_probe(&st->client->dev, -EINVAL,881882 "shunt resistor value cannot be zero\n");883883+ }882884 st->r_sense_uohm[addr] = val;883885 }884886 }
···850850 return ret;851851 }852852853853- irq_to_desc(pdata->virq_sgi);854853 irq_set_status_flags(pdata->virq_sgi, IRQ_PER_CPU);855854856855 /* Setup function for the CPU hot-plug cases */
···200200 uint8_t gen;201201 uint8_t last_gc; /* Most out of date gen in the btree */202202 uint16_t gc_mark; /* Bitfield used by GC. See below for field */203203+ uint16_t reclaimable_in_gc:1;203204};204205205206/*
···369369 struct io *i;370370371371 if (test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) ||372372- c->gc_stats.in_use > CUTOFF_CACHE_ADD ||373372 (bio_op(bio) == REQ_OP_DISCARD))374373 goto skip;374374+375375+ if (c->gc_stats.in_use > CUTOFF_CACHE_ADD) {376376+ /*377377+ * If cached buckets are all clean now, 'true' will be378378+ * returned and all requests will bypass the cache device.379379+ * Then c->sectors_to_gc has no chance to be negative, and380380+ * gc thread won't wake up and caching won't work forever.381381+ * Here call force_wake_up_gc() to avoid such aftermath.382382+ */383383+ if (BDEV_STATE(&dc->sb) == BDEV_STATE_CLEAN &&384384+ c->gc_mark_valid)385385+ force_wake_up_gc(c);386386+387387+ goto skip;388388+ }375389376390 if (mode == CACHE_MODE_NONE ||377391 (mode == CACHE_MODE_WRITEAROUND &&
+6-9
drivers/md/dm-table.c
···19811981 if (!dm_table_supports_secure_erase(t))19821982 limits->max_secure_erase_sectors = 0;1983198319841984- r = queue_limits_set(q, limits);19851985- if (r)19861986- return r;19871987-19881984 if (dm_table_supports_flush(t, (1UL << QUEUE_FLAG_WC))) {19891985 wc = true;19901986 if (dm_table_supports_flush(t, (1UL << QUEUE_FLAG_FUA)))···20322036 * For a zoned target, setup the zones related queue attributes20332037 * and resources necessary for zone append emulation if necessary.20342038 */20352035- if (blk_queue_is_zoned(q)) {20362036- r = dm_set_zones_restrictions(t, q);20392039+ if (IS_ENABLED(CONFIG_BLK_DEV_ZONED) && limits->zoned) {20402040+ r = dm_set_zones_restrictions(t, q, limits);20372041 if (r)20382042 return r;20392039- if (blk_queue_is_zoned(q) &&20402040- !static_key_enabled(&zoned_enabled.key))20412041- static_branch_enable(&zoned_enabled);20422043 }20442044+20452045+ r = queue_limits_set(q, limits);20462046+ if (r)20472047+ return r;2043204820442049 dm_update_crypto_profile(q, t);20452050
+33-39
drivers/md/dm-zone.c
···160160 return 0;161161}162162163163-static int dm_check_zoned(struct mapped_device *md, struct dm_table *t)164164-{165165- struct gendisk *disk = md->disk;166166- unsigned int nr_conv_zones = 0;167167- int ret;168168-169169- /* Count conventional zones */170170- md->zone_revalidate_map = t;171171- ret = dm_blk_report_zones(disk, 0, UINT_MAX,172172- dm_check_zoned_cb, &nr_conv_zones);173173- md->zone_revalidate_map = NULL;174174- if (ret < 0) {175175- DMERR("Check zoned failed %d", ret);176176- return ret;177177- }178178-179179- /*180180- * If we only have conventional zones, expose the mapped device as181181- * a regular device.182182- */183183- if (nr_conv_zones >= ret) {184184- disk->queue->limits.max_open_zones = 0;185185- disk->queue->limits.max_active_zones = 0;186186- disk->queue->limits.zoned = false;187187- clear_bit(DMF_EMULATE_ZONE_APPEND, &md->flags);188188- disk->nr_zones = 0;189189- }190190-191191- return 0;192192-}193193-194163/*195164 * Revalidate the zones of a mapped device to initialize resource necessary196165 * for zone append emulation. Note that we cannot simply use the block layer···220251 return true;221252}222253223223-int dm_set_zones_restrictions(struct dm_table *t, struct request_queue *q)254254+int dm_set_zones_restrictions(struct dm_table *t, struct request_queue *q,255255+ struct queue_limits *lim)224256{225257 struct mapped_device *md = t->md;258258+ struct gendisk *disk = md->disk;259259+ unsigned int nr_conv_zones = 0;226260 int ret;227261228262 /*···237265 clear_bit(DMF_EMULATE_ZONE_APPEND, &md->flags);238266 } else {239267 set_bit(DMF_EMULATE_ZONE_APPEND, &md->flags);240240- blk_queue_max_zone_append_sectors(q, 0);268268+ lim->max_zone_append_sectors = 0;241269 }242270243271 if (!get_capacity(md->disk))244272 return 0;245273246274 /*247247- * Check that the mapped device will indeed be zoned, that is, that it248248- * has sequential write required zones.275275+ * Count conventional zones to check that the mapped device will indeed 276276+ * have sequential write required zones.249277 */250250- ret = dm_check_zoned(md, t);251251- if (ret)278278+ md->zone_revalidate_map = t;279279+ ret = dm_blk_report_zones(disk, 0, UINT_MAX,280280+ dm_check_zoned_cb, &nr_conv_zones);281281+ md->zone_revalidate_map = NULL;282282+ if (ret < 0) {283283+ DMERR("Check zoned failed %d", ret);252284 return ret;253253- if (!blk_queue_is_zoned(q))285285+ }286286+287287+ /*288288+ * If we only have conventional zones, expose the mapped device as289289+ * a regular device.290290+ */291291+ if (nr_conv_zones >= ret) {292292+ lim->max_open_zones = 0;293293+ lim->max_active_zones = 0;294294+ lim->zoned = false;295295+ clear_bit(DMF_EMULATE_ZONE_APPEND, &md->flags);296296+ disk->nr_zones = 0;254297 return 0;298298+ }255299256300 if (!md->disk->nr_zones) {257301 DMINFO("%s using %s zone append",···275287 queue_emulates_zone_append(q) ? "emulated" : "native");276288 }277289278278- return dm_revalidate_zones(md, t);290290+ ret = dm_revalidate_zones(md, t);291291+ if (ret < 0)292292+ return ret;293293+294294+ if (!static_key_enabled(&zoned_enabled.key))295295+ static_branch_enable(&zoned_enabled);296296+ return 0;279297}280298281299/*
···12251225 }1226122612271227release:12281228+ /* Switching PHY interface always returns MDI error12291229+ * so disable retry mechanism to avoid wasting time12301230+ */12311231+ e1000e_disable_phy_retry(hw);12321232+12331233+ /* Force SMBus mode in PHY */12341234+ ret_val = e1000_read_phy_reg_hv_locked(hw, CV_SMB_CTRL, &phy_reg);12351235+ if (ret_val) {12361236+ e1000e_enable_phy_retry(hw);12371237+ hw->phy.ops.release(hw);12381238+ goto out;12391239+ }12401240+ phy_reg |= CV_SMB_CTRL_FORCE_SMBUS;12411241+ e1000_write_phy_reg_hv_locked(hw, CV_SMB_CTRL, phy_reg);12421242+12431243+ e1000e_enable_phy_retry(hw);12441244+12451245+ /* Force SMBus mode in MAC */12461246+ mac_reg = er32(CTRL_EXT);12471247+ mac_reg |= E1000_CTRL_EXT_FORCE_SMBUS;12481248+ ew32(CTRL_EXT, mac_reg);12491249+12281250 hw->phy.ops.release(hw);12291251out:12301252 if (ret_val)
-18
drivers/net/ethernet/intel/e1000e/netdev.c
···66236623 struct e1000_hw *hw = &adapter->hw;66246624 u32 ctrl, ctrl_ext, rctl, status, wufc;66256625 int retval = 0;66266626- u16 smb_ctrl;6627662666286627 /* Runtime suspend should only enable wakeup for link changes */66296628 if (runtime)···66966697 if (retval)66976698 return retval;66986699 }66996699-67006700- /* Force SMBUS to allow WOL */67016701- /* Switching PHY interface always returns MDI error67026702- * so disable retry mechanism to avoid wasting time67036703- */67046704- e1000e_disable_phy_retry(hw);67056705-67066706- e1e_rphy(hw, CV_SMB_CTRL, &smb_ctrl);67076707- smb_ctrl |= CV_SMB_CTRL_FORCE_SMBUS;67086708- e1e_wphy(hw, CV_SMB_CTRL, smb_ctrl);67096709-67106710- e1000e_enable_phy_retry(hw);67116711-67126712- /* Force SMBus mode in MAC */67136713- ctrl_ext = er32(CTRL_EXT);67146714- ctrl_ext |= E1000_CTRL_EXT_FORCE_SMBUS;67156715- ew32(CTRL_EXT, ctrl_ext);67166700 }6717670167186702 /* Ensure that the appropriate bits are set in LPI_CTRL
+141-117
drivers/net/ethernet/intel/i40e/i40e_main.c
···1117111171 ret = i40e_reset(pf);1117211172 if (!ret)1117311173 i40e_rebuild(pf, reinit, lock_acquired);1117411174+ else1117511175+ dev_err(&pf->pdev->dev, "%s: i40e_reset() FAILED", __func__);1117411176}11175111771117611178/**···1633716335}16338163361633916337/**1633816338+ * i40e_enable_mc_magic_wake - enable multicast magic packet wake up1633916339+ * using the mac_address_write admin q function1634016340+ * @pf: pointer to i40e_pf struct1634116341+ **/1634216342+static void i40e_enable_mc_magic_wake(struct i40e_pf *pf)1634316343+{1634416344+ struct i40e_vsi *main_vsi = i40e_pf_get_main_vsi(pf);1634516345+ struct i40e_hw *hw = &pf->hw;1634616346+ u8 mac_addr[6];1634716347+ u16 flags = 0;1634816348+ int ret;1634916349+1635016350+ /* Get current MAC address in case it's an LAA */1635116351+ if (main_vsi && main_vsi->netdev) {1635216352+ ether_addr_copy(mac_addr, main_vsi->netdev->dev_addr);1635316353+ } else {1635416354+ dev_err(&pf->pdev->dev,1635516355+ "Failed to retrieve MAC address; using default\n");1635616356+ ether_addr_copy(mac_addr, hw->mac.addr);1635716357+ }1635816358+1635916359+ /* The FW expects the mac address write cmd to first be called with1636016360+ * one of these flags before calling it again with the multicast1636116361+ * enable flags.1636216362+ */1636316363+ flags = I40E_AQC_WRITE_TYPE_LAA_WOL;1636416364+1636516365+ if (hw->func_caps.flex10_enable && hw->partition_id != 1)1636616366+ flags = I40E_AQC_WRITE_TYPE_LAA_ONLY;1636716367+1636816368+ ret = i40e_aq_mac_address_write(hw, flags, mac_addr, NULL);1636916369+ if (ret) {1637016370+ dev_err(&pf->pdev->dev,1637116371+ "Failed to update MAC address registers; cannot enable Multicast Magic packet wake up");1637216372+ return;1637316373+ }1637416374+1637516375+ flags = I40E_AQC_MC_MAG_EN1637616376+ | I40E_AQC_WOL_PRESERVE_ON_PFR1637716377+ | I40E_AQC_WRITE_TYPE_UPDATE_MC_MAG;1637816378+ ret = i40e_aq_mac_address_write(hw, flags, mac_addr, NULL);1637916379+ if (ret)1638016380+ dev_err(&pf->pdev->dev,1638116381+ "Failed to enable Multicast Magic Packet wake up\n");1638216382+}1638316383+1638416384+/**1638516385+ * i40e_io_suspend - suspend all IO operations1638616386+ * @pf: pointer to i40e_pf struct1638716387+ *1638816388+ **/1638916389+static int i40e_io_suspend(struct i40e_pf *pf)1639016390+{1639116391+ struct i40e_hw *hw = &pf->hw;1639216392+1639316393+ set_bit(__I40E_DOWN, pf->state);1639416394+1639516395+ /* Ensure service task will not be running */1639616396+ del_timer_sync(&pf->service_timer);1639716397+ cancel_work_sync(&pf->service_task);1639816398+1639916399+ /* Client close must be called explicitly here because the timer1640016400+ * has been stopped.1640116401+ */1640216402+ i40e_notify_client_of_netdev_close(pf, false);1640316403+1640416404+ if (test_bit(I40E_HW_CAP_WOL_MC_MAGIC_PKT_WAKE, pf->hw.caps) &&1640516405+ pf->wol_en)1640616406+ i40e_enable_mc_magic_wake(pf);1640716407+1640816408+ /* Since we're going to destroy queues during the1640916409+ * i40e_clear_interrupt_scheme() we should hold the RTNL lock for this1641016410+ * whole section1641116411+ */1641216412+ rtnl_lock();1641316413+1641416414+ i40e_prep_for_reset(pf);1641516415+1641616416+ wr32(hw, I40E_PFPM_APM, (pf->wol_en ? I40E_PFPM_APM_APME_MASK : 0));1641716417+ wr32(hw, I40E_PFPM_WUFC, (pf->wol_en ? I40E_PFPM_WUFC_MAG_MASK : 0));1641816418+1641916419+ /* Clear the interrupt scheme and release our IRQs so that the system1642016420+ * can safely hibernate even when there are a large number of CPUs.1642116421+ * Otherwise hibernation might fail when mapping all the vectors back1642216422+ * to CPU0.1642316423+ */1642416424+ i40e_clear_interrupt_scheme(pf);1642516425+1642616426+ rtnl_unlock();1642716427+1642816428+ return 0;1642916429+}1643016430+1643116431+/**1643216432+ * i40e_io_resume - resume IO operations1643316433+ * @pf: pointer to i40e_pf struct1643416434+ *1643516435+ **/1643616436+static int i40e_io_resume(struct i40e_pf *pf)1643716437+{1643816438+ struct device *dev = &pf->pdev->dev;1643916439+ int err;1644016440+1644116441+ /* We need to hold the RTNL lock prior to restoring interrupt schemes,1644216442+ * since we're going to be restoring queues1644316443+ */1644416444+ rtnl_lock();1644516445+1644616446+ /* We cleared the interrupt scheme when we suspended, so we need to1644716447+ * restore it now to resume device functionality.1644816448+ */1644916449+ err = i40e_restore_interrupt_scheme(pf);1645016450+ if (err) {1645116451+ dev_err(dev, "Cannot restore interrupt scheme: %d\n",1645216452+ err);1645316453+ }1645416454+1645516455+ clear_bit(__I40E_DOWN, pf->state);1645616456+ i40e_reset_and_rebuild(pf, false, true);1645716457+1645816458+ rtnl_unlock();1645916459+1646016460+ /* Clear suspended state last after everything is recovered */1646116461+ clear_bit(__I40E_SUSPENDED, pf->state);1646216462+1646316463+ /* Restart the service task */1646416464+ mod_timer(&pf->service_timer,1646516465+ round_jiffies(jiffies + pf->service_timer_period));1646616466+1646716467+ return 0;1646816468+}1646916469+1647016470+/**1634016471 * i40e_pci_error_detected - warning that something funky happened in PCI land1634116472 * @pdev: PCI device information struct1634216473 * @error: the type of PCI error···16493163581649416359 /* shutdown all operations */1649516360 if (!test_bit(__I40E_SUSPENDED, pf->state))1649616496- i40e_prep_for_reset(pf);1636116361+ i40e_io_suspend(pf);16497163621649816363 /* Request a slot reset */1649916364 return PCI_ERS_RESULT_NEED_RESET;···1651516380 u32 reg;16516163811651716382 dev_dbg(&pdev->dev, "%s\n", __func__);1651816518- if (pci_enable_device_mem(pdev)) {1638316383+ /* enable I/O and memory of the device */1638416384+ if (pci_enable_device(pdev)) {1651916385 dev_info(&pdev->dev,1652016386 "Cannot re-enable PCI device after reset.\n");1652116387 result = PCI_ERS_RESULT_DISCONNECT;···1657916443 if (test_bit(__I40E_SUSPENDED, pf->state))1658016444 return;16581164451658216582- i40e_handle_reset_warning(pf, false);1658316583-}1658416584-1658516585-/**1658616586- * i40e_enable_mc_magic_wake - enable multicast magic packet wake up1658716587- * using the mac_address_write admin q function1658816588- * @pf: pointer to i40e_pf struct1658916589- **/1659016590-static void i40e_enable_mc_magic_wake(struct i40e_pf *pf)1659116591-{1659216592- struct i40e_vsi *main_vsi = i40e_pf_get_main_vsi(pf);1659316593- struct i40e_hw *hw = &pf->hw;1659416594- u8 mac_addr[6];1659516595- u16 flags = 0;1659616596- int ret;1659716597-1659816598- /* Get current MAC address in case it's an LAA */1659916599- if (main_vsi && main_vsi->netdev) {1660016600- ether_addr_copy(mac_addr, main_vsi->netdev->dev_addr);1660116601- } else {1660216602- dev_err(&pf->pdev->dev,1660316603- "Failed to retrieve MAC address; using default\n");1660416604- ether_addr_copy(mac_addr, hw->mac.addr);1660516605- }1660616606-1660716607- /* The FW expects the mac address write cmd to first be called with1660816608- * one of these flags before calling it again with the multicast1660916609- * enable flags.1661016610- */1661116611- flags = I40E_AQC_WRITE_TYPE_LAA_WOL;1661216612-1661316613- if (hw->func_caps.flex10_enable && hw->partition_id != 1)1661416614- flags = I40E_AQC_WRITE_TYPE_LAA_ONLY;1661516615-1661616616- ret = i40e_aq_mac_address_write(hw, flags, mac_addr, NULL);1661716617- if (ret) {1661816618- dev_err(&pf->pdev->dev,1661916619- "Failed to update MAC address registers; cannot enable Multicast Magic packet wake up");1662016620- return;1662116621- }1662216622-1662316623- flags = I40E_AQC_MC_MAG_EN1662416624- | I40E_AQC_WOL_PRESERVE_ON_PFR1662516625- | I40E_AQC_WRITE_TYPE_UPDATE_MC_MAG;1662616626- ret = i40e_aq_mac_address_write(hw, flags, mac_addr, NULL);1662716627- if (ret)1662816628- dev_err(&pf->pdev->dev,1662916629- "Failed to enable Multicast Magic Packet wake up\n");1644616446+ i40e_io_resume(pf);1663016447}16631164481663216449/**···1664116552static int i40e_suspend(struct device *dev)1664216553{1664316554 struct i40e_pf *pf = dev_get_drvdata(dev);1664416644- struct i40e_hw *hw = &pf->hw;16645165551664616556 /* If we're already suspended, then there is nothing to do */1664716557 if (test_and_set_bit(__I40E_SUSPENDED, pf->state))1664816558 return 0;1664916649-1665016650- set_bit(__I40E_DOWN, pf->state);1665116651-1665216652- /* Ensure service task will not be running */1665316653- del_timer_sync(&pf->service_timer);1665416654- cancel_work_sync(&pf->service_task);1665516655-1665616656- /* Client close must be called explicitly here because the timer1665716657- * has been stopped.1665816658- */1665916659- i40e_notify_client_of_netdev_close(pf, false);1666016660-1666116661- if (test_bit(I40E_HW_CAP_WOL_MC_MAGIC_PKT_WAKE, pf->hw.caps) &&1666216662- pf->wol_en)1666316663- i40e_enable_mc_magic_wake(pf);1666416664-1666516665- /* Since we're going to destroy queues during the1666616666- * i40e_clear_interrupt_scheme() we should hold the RTNL lock for this1666716667- * whole section1666816668- */1666916669- rtnl_lock();1667016670-1667116671- i40e_prep_for_reset(pf);1667216672-1667316673- wr32(hw, I40E_PFPM_APM, (pf->wol_en ? I40E_PFPM_APM_APME_MASK : 0));1667416674- wr32(hw, I40E_PFPM_WUFC, (pf->wol_en ? I40E_PFPM_WUFC_MAG_MASK : 0));1667516675-1667616676- /* Clear the interrupt scheme and release our IRQs so that the system1667716677- * can safely hibernate even when there are a large number of CPUs.1667816678- * Otherwise hibernation might fail when mapping all the vectors back1667916679- * to CPU0.1668016680- */1668116681- i40e_clear_interrupt_scheme(pf);1668216682-1668316683- rtnl_unlock();1668416684-1668516685- return 0;1655916559+ return i40e_io_suspend(pf);1668616560}16687165611668816562/**···1665516603static int i40e_resume(struct device *dev)1665616604{1665716605 struct i40e_pf *pf = dev_get_drvdata(dev);1665816658- int err;16659166061666016607 /* If we're not suspended, then there is nothing to do */1666116608 if (!test_bit(__I40E_SUSPENDED, pf->state))1666216609 return 0;1666316663-1666416664- /* We need to hold the RTNL lock prior to restoring interrupt schemes,1666516665- * since we're going to be restoring queues1666616666- */1666716667- rtnl_lock();1666816668-1666916669- /* We cleared the interrupt scheme when we suspended, so we need to1667016670- * restore it now to resume device functionality.1667116671- */1667216672- err = i40e_restore_interrupt_scheme(pf);1667316673- if (err) {1667416674- dev_err(dev, "Cannot restore interrupt scheme: %d\n",1667516675- err);1667616676- }1667716677-1667816678- clear_bit(__I40E_DOWN, pf->state);1667916679- i40e_reset_and_rebuild(pf, false, true);1668016680-1668116681- rtnl_unlock();1668216682-1668316683- /* Clear suspended state last after everything is recovered */1668416684- clear_bit(__I40E_SUSPENDED, pf->state);1668516685-1668616686- /* Restart the service task */1668716687- mod_timer(&pf->service_timer,1668816688- round_jiffies(jiffies + pf->service_timer_period));1668916689-1669016690- return 0;1661016610+ return i40e_io_resume(pf);1669116611}16692166121669316613static const struct pci_error_handlers i40e_err_handler = {
···31483148 case ICE_PHY_TYPE_HIGH_100G_AUI2:31493149 speed_phy_type_high = ICE_AQ_LINK_SPEED_100GB;31503150 break;31513151+ case ICE_PHY_TYPE_HIGH_200G_CR4_PAM4:31523152+ case ICE_PHY_TYPE_HIGH_200G_SR4:31533153+ case ICE_PHY_TYPE_HIGH_200G_FR4:31543154+ case ICE_PHY_TYPE_HIGH_200G_LR4:31553155+ case ICE_PHY_TYPE_HIGH_200G_DR4:31563156+ case ICE_PHY_TYPE_HIGH_200G_KR4_PAM4:31573157+ case ICE_PHY_TYPE_HIGH_200G_AUI4_AOC_ACC:31583158+ case ICE_PHY_TYPE_HIGH_200G_AUI4:31593159+ speed_phy_type_high = ICE_AQ_LINK_SPEED_200GB;31603160+ break;31513161 default:31523162 speed_phy_type_high = ICE_AQ_LINK_SPEED_UNKNOWN;31533163 break;
+6-5
drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c
···4545 return -EINVAL;46464747 err = ice_fltr_add_vlan(vsi, vlan);4848- if (err && err != -EEXIST) {4848+ if (!err)4949+ vsi->num_vlan++;5050+ else if (err == -EEXIST)5151+ err = 0;5252+ else4953 dev_err(ice_pf_to_dev(vsi->back), "Failure Adding VLAN %d on VSI %i, status %d\n",5054 vlan->vid, vsi->vsi_num, err);5151- return err;5252- }53555454- vsi->num_vlan++;5555- return 0;5656+ return err;5657}57585859/**
···9797 if (!x || !x->xso.offload_handle)9898 goto out_disable;9999100100- if (xo->inner_ipproto) {101101- /* Cannot support tunnel packet over IPsec tunnel mode102102- * because we cannot offload three IP header csum103103- */104104- if (x->props.mode == XFRM_MODE_TUNNEL)105105- goto out_disable;106106-107107- /* Only support UDP or TCP L4 checksum */108108- if (xo->inner_ipproto != IPPROTO_UDP &&109109- xo->inner_ipproto != IPPROTO_TCP)110110- goto out_disable;111111- }100100+ /* Only support UDP or TCP L4 checksum */101101+ if (xo->inner_ipproto &&102102+ xo->inner_ipproto != IPPROTO_UDP &&103103+ xo->inner_ipproto != IPPROTO_TCP)104104+ goto out_disable;112105113106 return features;114107
···719719 struct mlx5_core_dev *dev;720720 u8 mode;721721#endif722722+ bool roce_support;722723 int i;723724724725 for (i = 0; i < ldev->ports; i++)···744743 if (mlx5_sriov_is_enabled(ldev->pf[i].dev))745744 return false;746745#endif746746+ roce_support = mlx5_get_roce_state(ldev->pf[MLX5_LAG_P1].dev);747747+ for (i = 1; i < ldev->ports; i++)748748+ if (mlx5_get_roce_state(ldev->pf[i].dev) != roce_support)749749+ return false;750750+747751 return true;748752}749753···916910 } else if (roce_lag) {917911 dev0->priv.flags &= ~MLX5_PRIV_FLAGS_DISABLE_IB_ADEV;918912 mlx5_rescan_drivers_locked(dev0);919919- for (i = 1; i < ldev->ports; i++)920920- mlx5_nic_vport_enable_roce(ldev->pf[i].dev);913913+ for (i = 1; i < ldev->ports; i++) {914914+ if (mlx5_get_roce_state(ldev->pf[i].dev))915915+ mlx5_nic_vport_enable_roce(ldev->pf[i].dev);916916+ }921917 } else if (shared_fdb) {922918 int i;923919
+8-4
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
···100100101101static bool mlx5_sd_is_supported(struct mlx5_core_dev *dev, u8 host_buses)102102{103103- /* Feature is currently implemented for PFs only */104104- if (!mlx5_core_is_pf(dev))105105- return false;106106-107103 /* Honor the SW implementation limit */108104 if (host_buses > MLX5_SD_MAX_GROUP_SZ)109105 return false;···157161 u32 group_id;158162 bool sdm;159163 int err;164164+165165+ /* Feature is currently implemented for PFs only */166166+ if (!mlx5_core_is_pf(dev))167167+ return 0;168168+169169+ /* Block on embedded CPU PFs */170170+ if (mlx5_core_is_ecpf(dev))171171+ return 0;160172161173 if (!MLX5_CAP_MCAM_REG(dev, mpir))162174 return 0;
···5555 skb_scrub_packet(skb, xnet);5656 skb->priority = 0;5757 nf_skip_egress(skb, true);5858+ skb_reset_mac_header(skb);5859}59606061static struct netkit *netkit_priv(const struct net_device *dev)···7978 skb_orphan_frags(skb, GFP_ATOMIC)))8079 goto drop;8180 netkit_prep_forward(skb, !net_eq(dev_net(dev), dev_net(peer)));8181+ eth_skb_pkt_type(skb, peer);8282 skb->dev = peer;8383 entry = rcu_dereference(nk->active);8484 if (entry)···8785 switch (ret) {8886 case NETKIT_NEXT:8987 case NETKIT_PASS:9090- skb->protocol = eth_type_trans(skb, skb->dev);8888+ eth_skb_pull_mac(skb);9189 skb_postpull_rcsum(skb, eth_hdr(skb), ETH_HLEN);9290 if (likely(__netif_rx(skb) == NET_RX_SUCCESS)) {9391 dev_sw_netstats_tx_add(dev, 1, len);···157155 /* Nothing to do, we receive whatever gets pushed to us! */158156}159157158158+static int netkit_set_macaddr(struct net_device *dev, void *sa)159159+{160160+ struct netkit *nk = netkit_priv(dev);161161+162162+ if (nk->mode != NETKIT_L2)163163+ return -EOPNOTSUPP;164164+165165+ return eth_mac_addr(dev, sa);166166+}167167+160168static void netkit_set_headroom(struct net_device *dev, int headroom)161169{162170 struct netkit *nk = netkit_priv(dev), *nk2;···210198 .ndo_start_xmit = netkit_xmit,211199 .ndo_set_rx_mode = netkit_set_multicast,212200 .ndo_set_rx_headroom = netkit_set_headroom,201201+ .ndo_set_mac_address = netkit_set_macaddr,213202 .ndo_get_iflink = netkit_get_iflink,214203 .ndo_get_peer_dev = netkit_peer_dev,215204 .ndo_get_stats64 = netkit_get_stats,···313300314301 if (!attr)315302 return 0;316316- NL_SET_ERR_MSG_ATTR(extack, attr,317317- "Setting Ethernet address is not supported");318318- return -EOPNOTSUPP;303303+ if (nla_len(attr) != ETH_ALEN)304304+ return -EINVAL;305305+ if (!is_valid_ether_addr(nla_data(attr)))306306+ return -EADDRNOTAVAIL;307307+ return 0;319308}320309321310static struct rtnl_link_ops netkit_link_ops;···380365 strscpy(ifname, "nk%d", IFNAMSIZ);381366 ifname_assign_type = NET_NAME_ENUM;382367 }368368+ if (mode != NETKIT_L2 &&369369+ (tb[IFLA_ADDRESS] || tbp[IFLA_ADDRESS]))370370+ return -EOPNOTSUPP;383371384372 net = rtnl_link_get_net(src_net, tbp);385373 if (IS_ERR(net))···397379398380 netif_inherit_tso_max(peer, dev);399381400400- if (mode == NETKIT_L2)382382+ if (mode == NETKIT_L2 && !(ifmp && tbp[IFLA_ADDRESS]))401383 eth_hw_addr_random(peer);402384 if (ifmp && dev->ifindex)403385 peer->ifindex = ifmp->ifi_index;···420402 if (err < 0)421403 goto err_configure_peer;422404423423- if (mode == NETKIT_L2)405405+ if (mode == NETKIT_L2 && !tb[IFLA_ADDRESS])424406 eth_hw_addr_random(dev);425407 if (tb[IFLA_IFNAME])426408 nla_strscpy(dev->name, tb[IFLA_IFNAME], IFNAMSIZ);
+10-1
drivers/net/phy/micrel.c
···4029402940304030 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {40314031 err = phy_read(phydev, LAN8814_INTS);40324032- if (err)40324032+ if (err < 0)40334033 return err;4034403440354035 /* Enable / disable interrupts. It is OK to enable PTP interrupt···40454045 return err;4046404640474047 err = phy_read(phydev, LAN8814_INTS);40484048+ if (err < 0)40494049+ return err;40504050+40514051+ /* Getting a positive value doesn't mean that is an error, it40524052+ * just indicates what was the status. Therefore make sure to40534053+ * clear the value and say that there is no error.40544054+ */40554055+ err = 0;40484056 }4049405740504058 return err;···53355327 /* PHY_BASIC_FEATURES */53365328 .probe = kszphy_probe,53375329 .config_init = ksz8061_config_init,53305330+ .soft_reset = genphy_soft_reset,53385331 .config_intr = kszphy_config_intr,53395332 .handle_interrupt = kszphy_handle_interrupt,53405333 .suspend = kszphy_suspend,
+7-4
drivers/net/usb/smsc95xx.c
···879879static int smsc95xx_reset(struct usbnet *dev)880880{881881 struct smsc95xx_priv *pdata = dev->driver_priv;882882- u32 read_buf, write_buf, burst_cap;882882+ u32 read_buf, burst_cap;883883 int ret = 0, timeout;884884885885 netif_dbg(dev, ifup, dev->net, "entering smsc95xx_reset\n");···10031003 return ret;10041004 netif_dbg(dev, ifup, dev->net, "ID_REV = 0x%08x\n", read_buf);1005100510061006+ ret = smsc95xx_read_reg(dev, LED_GPIO_CFG, &read_buf);10071007+ if (ret < 0)10081008+ return ret;10061009 /* Configure GPIO pins as LED outputs */10071007- write_buf = LED_GPIO_CFG_SPD_LED | LED_GPIO_CFG_LNK_LED |10081008- LED_GPIO_CFG_FDX_LED;10091009- ret = smsc95xx_write_reg(dev, LED_GPIO_CFG, write_buf);10101010+ read_buf |= LED_GPIO_CFG_SPD_LED | LED_GPIO_CFG_LNK_LED |10111011+ LED_GPIO_CFG_FDX_LED;10121012+ ret = smsc95xx_write_reg(dev, LED_GPIO_CFG, read_buf);10101013 if (ret < 0)10111014 return ret;10121015
···676676 if (kstrtobool(page, &enable))677677 return -EINVAL;678678679679+ /*680680+ * take a global nvmet_config_sem because the disable routine has a681681+ * window where it releases the subsys-lock, giving a chance to682682+ * a parallel enable to concurrently execute causing the disable to683683+ * have a misaccounting of the ns percpu_ref.684684+ */685685+ down_write(&nvmet_config_sem);679686 if (enable)680687 ret = nvmet_ns_enable(ns);681688 else682689 nvmet_ns_disable(ns);690690+ up_write(&nvmet_config_sem);683691684692 return ret ? ret : count;685693}
+9
drivers/nvme/target/core.c
···818818 percpu_ref_exit(&sq->ref);819819 nvmet_auth_sq_free(sq);820820821821+ /*822822+ * we must reference the ctrl again after waiting for inflight IO823823+ * to complete. Because admin connect may have sneaked in after we824824+ * store sq->ctrl locally, but before we killed the percpu_ref. the825825+ * admin connect allocates and assigns sq->ctrl, which now needs a826826+ * final ref put, as this ctrl is going away.827827+ */828828+ ctrl = sq->ctrl;829829+821830 if (ctrl) {822831 /*823832 * The teardown flow may take some time, and the host may not
+1
drivers/platform/x86/Kconfig
···515515 select NVRAM516516 select NEW_LEDS517517 select LEDS_CLASS518518+ select INPUT_SPARSEKMAP518519 help519520 This is a driver for the IBM and Lenovo ThinkPad laptops. It adds520521 support for Fn-Fx key combinations, Bluetooth control, video
···16101610 tpmi_sst->partition_mask_current &= ~BIT(plat_info->partition);16111611 /* Free the package instance when the all partitions are removed */16121612 if (!tpmi_sst->partition_mask_current) {16131613- kfree(tpmi_sst);16141613 isst_common.sst_inst[tpmi_sst->package_id] = NULL;16141614+ kfree(tpmi_sst);16151615 }16161616 mutex_unlock(&isst_tpmi_dev_lock);16171617}
+113-4
drivers/platform/x86/touchscreen_dmi.c
···99 */10101111#include <linux/acpi.h>1212+#include <linux/ctype.h>1213#include <linux/device.h>1314#include <linux/dmi.h>1415#include <linux/efi_embedded_fw.h>1516#include <linux/i2c.h>1717+#include <linux/init.h>1818+#include <linux/kstrtox.h>1619#include <linux/notifier.h>1720#include <linux/property.h>1821#include <linux/string.h>···900897 .properties = schneider_sct101ctm_props,901898};902899900900+static const struct property_entry globalspace_solt_ivw116_props[] = {901901+ PROPERTY_ENTRY_U32("touchscreen-min-x", 7),902902+ PROPERTY_ENTRY_U32("touchscreen-min-y", 22),903903+ PROPERTY_ENTRY_U32("touchscreen-size-x", 1723),904904+ PROPERTY_ENTRY_U32("touchscreen-size-y", 1077),905905+ PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-globalspace-solt-ivw116.fw"),906906+ PROPERTY_ENTRY_U32("silead,max-fingers", 10),907907+ PROPERTY_ENTRY_BOOL("silead,home-button"),908908+ { }909909+};910910+911911+static const struct ts_dmi_data globalspace_solt_ivw116_data = {912912+ .acpi_name = "MSSL1680:00",913913+ .properties = globalspace_solt_ivw116_props,914914+};915915+903916static const struct property_entry techbite_arc_11_6_props[] = {904917 PROPERTY_ENTRY_U32("touchscreen-min-x", 5),905918 PROPERTY_ENTRY_U32("touchscreen-min-y", 7),···14051386 },14061387 },14071388 {13891389+ /* Jumper EZpad 6s Pro */13901390+ .driver_data = (void *)&jumper_ezpad_6_pro_b_data,13911391+ .matches = {13921392+ DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),13931393+ DMI_MATCH(DMI_PRODUCT_NAME, "Ezpad"),13941394+ /* Above matches are too generic, add bios match */13951395+ DMI_MATCH(DMI_BIOS_VERSION, "E.WSA116_8.E1.042.bin"),13961396+ DMI_MATCH(DMI_BIOS_DATE, "01/08/2020"),13971397+ },13981398+ },13991399+ {14081400 /* Jumper EZpad 6 m4 */14091401 .driver_data = (void *)&jumper_ezpad_6_m4_data,14101402 .matches = {···16551625 },16561626 },16571627 {16281628+ /* GlobalSpace SoLT IVW 11.6" */16291629+ .driver_data = (void *)&globalspace_solt_ivw116_data,16301630+ .matches = {16311631+ DMI_MATCH(DMI_SYS_VENDOR, "Globalspace Tech Pvt Ltd"),16321632+ DMI_MATCH(DMI_PRODUCT_NAME, "SolTIVW"),16331633+ DMI_MATCH(DMI_PRODUCT_SKU, "PN20170413488"),16341634+ },16351635+ },16361636+ {16581637 /* Techbite Arc 11.6 */16591638 .driver_data = (void *)&techbite_arc_11_6_data,16601639 .matches = {···18561817 { }18571818};1858181918591859-static const struct ts_dmi_data *ts_data;18201820+static struct ts_dmi_data *ts_data;1860182118611822static void ts_dmi_add_props(struct i2c_client *client)18621823{···18911852 return 0;18921853}1893185418551855+#define MAX_CMDLINE_PROPS 1618561856+18571857+static struct property_entry ts_cmdline_props[MAX_CMDLINE_PROPS + 1];18581858+18591859+static struct ts_dmi_data ts_cmdline_data = {18601860+ .properties = ts_cmdline_props,18611861+};18621862+18631863+static int __init ts_parse_props(char *str)18641864+{18651865+ /* Save the original str to show it on syntax errors */18661866+ char orig_str[256];18671867+ char *name, *value;18681868+ u32 u32val;18691869+ int i, ret;18701870+18711871+ strscpy(orig_str, str, sizeof(orig_str));18721872+18731873+ /*18741874+ * str is part of the static_command_line from init/main.c and poking18751875+ * holes in that by writing 0 to it is allowed, as is taking long18761876+ * lasting references to it.18771877+ */18781878+ ts_cmdline_data.acpi_name = strsep(&str, ":");18791879+18801880+ for (i = 0; i < MAX_CMDLINE_PROPS; i++) {18811881+ name = strsep(&str, ":");18821882+ if (!name || !name[0])18831883+ break;18841884+18851885+ /* Replace '=' with 0 and make value point past '=' or NULL */18861886+ value = name;18871887+ strsep(&value, "=");18881888+ if (!value) {18891889+ ts_cmdline_props[i] = PROPERTY_ENTRY_BOOL(name);18901890+ } else if (isdigit(value[0])) {18911891+ ret = kstrtou32(value, 0, &u32val);18921892+ if (ret)18931893+ goto syntax_error;18941894+18951895+ ts_cmdline_props[i] = PROPERTY_ENTRY_U32(name, u32val);18961896+ } else {18971897+ ts_cmdline_props[i] = PROPERTY_ENTRY_STRING(name, value);18981898+ }18991899+ }19001900+19011901+ if (!i || str)19021902+ goto syntax_error;19031903+19041904+ ts_data = &ts_cmdline_data;19051905+ return 1;19061906+19071907+syntax_error:19081908+ pr_err("Invalid '%s' value for 'i2c_touchscreen_props='\n", orig_str);19091909+ return 1; /* "i2c_touchscreen_props=" is still a known parameter */19101910+}19111911+__setup("i2c_touchscreen_props=", ts_parse_props);19121912+18941913static struct notifier_block ts_dmi_notifier = {18951914 .notifier_call = ts_dmi_notifier_call,18961915};···19561859static int __init ts_dmi_init(void)19571860{19581861 const struct dmi_system_id *dmi_id;18621862+ struct ts_dmi_data *ts_data_dmi;19591863 int error;1960186419611865 dmi_id = dmi_first_match(touchscreen_dmi_table);19621962- if (!dmi_id)19631963- return 0; /* Not an error */18661866+ ts_data_dmi = dmi_id ? dmi_id->driver_data : NULL;1964186719651965- ts_data = dmi_id->driver_data;18681868+ if (ts_data) {18691869+ /*18701870+ * Kernel cmdline provided data takes precedence, copy over18711871+ * DMI efi_embedded_fw info if available.18721872+ */18731873+ if (ts_data_dmi)18741874+ ts_data->embedded_fw = ts_data_dmi->embedded_fw;18751875+ } else if (ts_data_dmi) {18761876+ ts_data = ts_data_dmi;18771877+ } else {18781878+ return 0; /* Not an error */18791879+ }18801880+19661881 /* Some dmi table entries only provide an efi_embedded_fw_desc */19671882 if (!ts_data->properties)19681883 return 0;
+2
drivers/platform/x86/x86-android-tablets/Kconfig
···66config X86_ANDROID_TABLETS77 tristate "X86 Android tablet support"88 depends on I2C && SPI && SERIAL_DEV_BUS && ACPI && EFI && GPIOLIB && PMIC_OPREGION99+ select NEW_LEDS1010+ select LEDS_CLASS911 help1012 X86 tablets which ship with Android as (part of) the factory image1113 typically have various problems with their DSDTs. The factory kernels
+11
drivers/pmdomain/imx/gpcv2.c
···393393 * automatically there. Just add a delay and suppose the handshake finish394394 * after that.395395 */396396+397397+ /*398398+ * For some BLK-CTL module (eg. AudioMix on i.MX8MP) doesn't have BUS399399+ * clk-en bit, it is better to add delay here, as the BLK-CTL module400400+ * doesn't need to care about how it is powered up.401401+ *402402+ * regmap_read_bypassed() is to make sure the above write IO transaction403403+ * already reaches target before udelay()404404+ */405405+ regmap_read_bypassed(domain->regmap, domain->regs->hsk, ®_val);406406+ udelay(5);396407 }397408398409 /* Disable reset clocks for all devices in the domain */
+12-10
drivers/regulator/rtq2208-regulator.c
···228228 .set_suspend_disable = rtq2208_set_suspend_disable,229229};230230231231+static struct of_regulator_match rtq2208_ldo_match[] = {232232+ {.name = "ldo2", },233233+ {.name = "ldo1", },234234+};235235+231236static unsigned int rtq2208_of_map_mode(unsigned int mode)232237{233238 switch (mode) {···327322 return IRQ_HANDLED;328323}329324330330-static int rtq2208_of_get_fixed_voltage(struct device *dev,331331- struct of_regulator_match *rtq2208_ldo_match, int n_fixed)325325+static int rtq2208_of_get_ldo_dvs_ability(struct device *dev)332326{333327 struct device_node *np;334328 struct of_regulator_match *match;···342338 if (!np)343339 np = dev->of_node;344340345345- ret = of_regulator_match(dev, np, rtq2208_ldo_match, n_fixed);341341+ ret = of_regulator_match(dev, np, rtq2208_ldo_match, ARRAY_SIZE(rtq2208_ldo_match));346342347343 of_node_put(np);348344349345 if (ret < 0)350346 return ret;351347352352- for (i = 0; i < n_fixed; i++) {348348+ for (i = 0; i < ARRAY_SIZE(rtq2208_ldo_match); i++) {353349 match = rtq2208_ldo_match + i;354350 init_data = match->init_data;355351 rdesc = (struct rtq2208_regulator_desc *)match->driver_data;···392388 REGULATOR_LINEAR_RANGE(1310000, 181, 255, 10000),393389};394390395395-static void rtq2208_init_regulator_desc(struct rtq2208_regulator_desc *rdesc, int mtp_sel,396396- int idx, struct of_regulator_match *rtq2208_ldo_match, int *ldo_idx)391391+static void rtq2208_init_regulator_desc(struct rtq2208_regulator_desc *rdesc, int mtp_sel, int idx)397392{398393 struct regulator_desc *desc;399394 static const struct {···464461static int rtq2208_parse_regulator_dt_data(int n_regulator, const unsigned int *regulator_idx_table,465462 struct rtq2208_regulator_desc *rdesc[RTQ2208_LDO_MAX], struct device *dev)466463{467467- struct of_regulator_match rtq2208_ldo_match[2];468468- int mtp_sel, ret, i, idx, ldo_idx = 0;464464+ int mtp_sel, i, idx, ret;469465470466 /* get mtp_sel0 or mtp_sel1 */471467 mtp_sel = device_property_read_bool(dev, "richtek,mtp-sel-high");···476474 if (!rdesc[i])477475 return -ENOMEM;478476479479- rtq2208_init_regulator_desc(rdesc[i], mtp_sel, idx, rtq2208_ldo_match, &ldo_idx);477477+ rtq2208_init_regulator_desc(rdesc[i], mtp_sel, idx);480478481479 /* init ldo dvs ability */482480 if (idx >= RTQ2208_LDO2)···484482 }485483486484 /* init ldo fixed_uV */487487- ret = rtq2208_of_get_fixed_voltage(dev, rtq2208_ldo_match, ldo_idx);485485+ ret = rtq2208_of_get_ldo_dvs_ability(dev);488486 if (ret)489487 return dev_err_probe(dev, ret, "Failed to get ldo fixed_uV\n");490488
···908908 if (!genradix_ptr_alloc(&c->stripes, idx, gfp))909909 return -BCH_ERR_ENOMEM_ec_stripe_mem_alloc;910910911911- if (c->gc_pos.phase != GC_PHASE_NOT_RUNNING &&911911+ if (c->gc_pos.phase != GC_PHASE_not_running &&912912 !genradix_ptr_alloc(&c->gc_stripes, idx, gfp))913913 return -BCH_ERR_ENOMEM_ec_stripe_mem_alloc;914914
+3-3
fs/bcachefs/fs-io-buffered.c
···437437 */438438439439 /*440440- * PageWriteback is effectively our ref on the inode - fixup i_blocks441441- * before calling end_page_writeback:440440+ * The writeback flag is effectively our ref on the inode -441441+ * fixup i_blocks before calling folio_end_writeback:442442 */443443 bch2_i_sectors_acct(c, io->inode, NULL, io->op.i_sectors_delta);444444···898898 darray_for_each(fs, fi) {899899 f = *fi;900900 f_len = min(end, folio_end_pos(f)) - f_pos;901901- f_copied = copy_page_from_iter_atomic(&f->page, f_offset, f_len, iter);901901+ f_copied = copy_folio_from_iter_atomic(f, f_offset, f_len, iter);902902 if (!f_copied) {903903 folios_trunc(&fs, fi);904904 break;
+3-1
fs/bcachefs/fs-io-direct.c
···609609 if (unlikely(ret))610610 goto err_put_write_ref;611611612612- if (unlikely((req->ki_pos|iter->count) & (block_bytes(c) - 1)))612612+ if (unlikely((req->ki_pos|iter->count) & (block_bytes(c) - 1))) {613613+ ret = -EINVAL;613614 goto err_put_write_ref;615615+ }614616615617 inode_dio_begin(&inode->v);616618 bch2_pagecache_block_get(inode);
+10-2
fs/bcachefs/fs.c
···1939193919401940 if (IS_ERR(sb)) {19411941 ret = PTR_ERR(sb);19421942- ret = bch2_err_class(ret);19431943- return ERR_PTR(ret);19421942+ goto err;19441943 }1945194419461945 c = sb->s_fs_info;···20152016err_put_super:20162017 __bch2_fs_stop(c);20172018 deactivate_locked_super(sb);20192019+err:20202020+ /*20212021+ * On an inconsistency error in recovery we might see an -EROFS derived20222022+ * errorcode (from the journal), but we don't want to return that to20232023+ * userspace as that causes util-linux to retry the mount RO - which is20242024+ * confusing:20252025+ */20262026+ if (bch2_err_matches(ret, EROFS) && ret != -EROFS)20272027+ ret = -EIO;20182028 return ERR_PTR(bch2_err_class(ret));20192029}20202030
+14-37
fs/bcachefs/fsck.c
···7777 struct bkey_s_c k;7878 int ret;79798080- bch2_trans_iter_init(trans, &iter, BTREE_ID_inodes,8181- POS(0, inode_nr),8282- BTREE_ITER_all_snapshots);8383- k = bch2_btree_iter_peek(&iter);8484- ret = bkey_err(k);8585- if (ret)8686- goto err;8787-8888- if (!k.k || !bkey_eq(k.k->p, POS(0, inode_nr))) {8989- ret = -BCH_ERR_ENOENT_inode;9090- goto err;8080+ for_each_btree_key_norestart(trans, iter, BTREE_ID_inodes, POS(0, inode_nr),8181+ BTREE_ITER_all_snapshots, k, ret) {8282+ if (k.k->p.offset != inode_nr)8383+ break;8484+ if (!bkey_is_inode(k.k))8585+ continue;8686+ ret = bch2_inode_unpack(k, inode);8787+ goto found;9188 }9292-9393- ret = bch2_inode_unpack(k, inode);9494-err:8989+ ret = -BCH_ERR_ENOENT_inode;9090+found:9591 bch_err_msg(trans->c, ret, "fetching inode %llu", inode_nr);9692 bch2_trans_iter_exit(trans, &iter);9793 return ret;···766770 return ret;767771}768772769769-static int check_key_has_snapshot(struct btree_trans *trans,770770- struct btree_iter *iter,771771- struct bkey_s_c k)772772-{773773- struct bch_fs *c = trans->c;774774- struct printbuf buf = PRINTBUF;775775- int ret = 0;776776-777777- if (mustfix_fsck_err_on(!bch2_snapshot_equiv(c, k.k->p.snapshot), c,778778- bkey_in_missing_snapshot,779779- "key in missing snapshot: %s",780780- (bch2_bkey_val_to_text(&buf, c, k), buf.buf)))781781- ret = bch2_btree_delete_at(trans, iter,782782- BTREE_UPDATE_internal_snapshot_node) ?: 1;783783-fsck_err:784784- printbuf_exit(&buf);785785- return ret;786786-}787787-788773static int hash_redo_key(struct btree_trans *trans,789774 const struct bch_hash_desc desc,790775 struct bch_hash_info *hash_info,···960983 bool do_update = false;961984 int ret;962985963963- ret = check_key_has_snapshot(trans, iter, k);986986+ ret = bch2_check_key_has_snapshot(trans, iter, k);964987 if (ret < 0)965988 goto err;966989 if (ret)···14641487 struct printbuf buf = PRINTBUF;14651488 int ret = 0;1466148914671467- ret = check_key_has_snapshot(trans, iter, k);14901490+ ret = bch2_check_key_has_snapshot(trans, iter, k);14681491 if (ret) {14691492 ret = ret < 0 ? ret : 0;14701493 goto out;···19872010 struct printbuf buf = PRINTBUF;19882011 int ret = 0;1989201219901990- ret = check_key_has_snapshot(trans, iter, k);20132013+ ret = bch2_check_key_has_snapshot(trans, iter, k);19912014 if (ret) {19922015 ret = ret < 0 ? ret : 0;19932016 goto out;···21422165 struct inode_walker_entry *i;21432166 int ret;2144216721452145- ret = check_key_has_snapshot(trans, iter, k);21682168+ ret = bch2_check_key_has_snapshot(trans, iter, k);21462169 if (ret < 0)21472170 return ret;21482171 if (ret)
···217217kunit_test_suite(mean_and_variance_test_suite);218218219219MODULE_AUTHOR("Daniel B. Hill");220220+MODULE_DESCRIPTION("bcachefs filesystem mean and variance unit tests");220221MODULE_LICENSE("GPL");
···11+/* SPDX-License-Identifier: GPL-2.0 */22+#ifndef _BCACHEFS_SB_MEMBERS_FORMAT_H33+#define _BCACHEFS_SB_MEMBERS_FORMAT_H44+55+/*66+ * We refer to members with bitmasks in various places - but we need to get rid77+ * of this limit:88+ */99+#define BCH_SB_MEMBERS_MAX 641010+1111+#define BCH_MIN_NR_NBUCKETS (1 << 6)1212+1313+#define BCH_IOPS_MEASUREMENTS() \1414+ x(seqread, 0) \1515+ x(seqwrite, 1) \1616+ x(randread, 2) \1717+ x(randwrite, 3)1818+1919+enum bch_iops_measurement {2020+#define x(t, n) BCH_IOPS_##t = n,2121+ BCH_IOPS_MEASUREMENTS()2222+#undef x2323+ BCH_IOPS_NR2424+};2525+2626+#define BCH_MEMBER_ERROR_TYPES() \2727+ x(read, 0) \2828+ x(write, 1) \2929+ x(checksum, 2)3030+3131+enum bch_member_error_type {3232+#define x(t, n) BCH_MEMBER_ERROR_##t = n,3333+ BCH_MEMBER_ERROR_TYPES()3434+#undef x3535+ BCH_MEMBER_ERROR_NR3636+};3737+3838+struct bch_member {3939+ __uuid_t uuid;4040+ __le64 nbuckets; /* device size */4141+ __le16 first_bucket; /* index of first bucket used */4242+ __le16 bucket_size; /* sectors */4343+ __u8 btree_bitmap_shift;4444+ __u8 pad[3];4545+ __le64 last_mount; /* time_t */4646+4747+ __le64 flags;4848+ __le32 iops[4];4949+ __le64 errors[BCH_MEMBER_ERROR_NR];5050+ __le64 errors_at_reset[BCH_MEMBER_ERROR_NR];5151+ __le64 errors_reset_time;5252+ __le64 seq;5353+ __le64 btree_allocated_bitmap;5454+ /*5555+ * On recovery from a clean shutdown we don't normally read the journal,5656+ * but we still want to resume writing from where we left off so we5757+ * don't overwrite more than is necessary, for list journal debugging:5858+ */5959+ __le32 last_journal_bucket;6060+ __le32 last_journal_bucket_offset;6161+};6262+6363+/*6464+ * This limit comes from the bucket_gens array - it's a single allocation, and6565+ * kernel allocation are limited to INT_MAX6666+ */6767+#define BCH_MEMBER_NBUCKETS_MAX (INT_MAX - 64)6868+6969+#define BCH_MEMBER_V1_BYTES 567070+7171+LE64_BITMASK(BCH_MEMBER_STATE, struct bch_member, flags, 0, 4)7272+/* 4-14 unused, was TIER, HAS_(META)DATA, REPLACEMENT */7373+LE64_BITMASK(BCH_MEMBER_DISCARD, struct bch_member, flags, 14, 15)7474+LE64_BITMASK(BCH_MEMBER_DATA_ALLOWED, struct bch_member, flags, 15, 20)7575+LE64_BITMASK(BCH_MEMBER_GROUP, struct bch_member, flags, 20, 28)7676+LE64_BITMASK(BCH_MEMBER_DURABILITY, struct bch_member, flags, 28, 30)7777+LE64_BITMASK(BCH_MEMBER_FREESPACE_INITIALIZED,7878+ struct bch_member, flags, 30, 31)7979+8080+#if 08181+LE64_BITMASK(BCH_MEMBER_NR_READ_ERRORS, struct bch_member, flags[1], 0, 20);8282+LE64_BITMASK(BCH_MEMBER_NR_WRITE_ERRORS,struct bch_member, flags[1], 20, 40);8383+#endif8484+8585+#define BCH_MEMBER_STATES() \8686+ x(rw, 0) \8787+ x(ro, 1) \8888+ x(failed, 2) \8989+ x(spare, 3)9090+9191+enum bch_member_state {9292+#define x(t, n) BCH_MEMBER_STATE_##t = n,9393+ BCH_MEMBER_STATES()9494+#undef x9595+ BCH_MEMBER_STATE_NR9696+};9797+9898+struct bch_sb_field_members_v1 {9999+ struct bch_sb_field field;100100+ struct bch_member _members[]; //Members are now variable size101101+};102102+103103+struct bch_sb_field_members_v2 {104104+ struct bch_sb_field field;105105+ __le16 member_bytes; //size of single member entry106106+ u8 pad[6];107107+ struct bch_member _members[];108108+};109109+110110+#endif /* _BCACHEFS_SB_MEMBERS_FORMAT_H */
+48-40
fs/bcachefs/snapshot.c
···10421042 return ret;10431043}1044104410451045+int bch2_check_key_has_snapshot(struct btree_trans *trans,10461046+ struct btree_iter *iter,10471047+ struct bkey_s_c k)10481048+{10491049+ struct bch_fs *c = trans->c;10501050+ struct printbuf buf = PRINTBUF;10511051+ int ret = 0;10521052+10531053+ if (fsck_err_on(!bch2_snapshot_equiv(c, k.k->p.snapshot), c,10541054+ bkey_in_missing_snapshot,10551055+ "key in missing snapshot %s, delete?",10561056+ (bch2_bkey_val_to_text(&buf, c, k), buf.buf)))10571057+ ret = bch2_btree_delete_at(trans, iter,10581058+ BTREE_UPDATE_internal_snapshot_node) ?: 1;10591059+fsck_err:10601060+ printbuf_exit(&buf);10611061+ return ret;10621062+}10631063+10451064/*10461065 * Mark a snapshot as deleted, for future cleanup:10471066 */···13701351 * that key to snapshot leaf nodes, where we can mutate it13711352 */1372135313731373-static int snapshot_delete_key(struct btree_trans *trans,13541354+static int delete_dead_snapshots_process_key(struct btree_trans *trans,13741355 struct btree_iter *iter,13751356 struct bkey_s_c k,13761357 snapshot_id_list *deleted,13771358 snapshot_id_list *equiv_seen,13781359 struct bpos *last_pos)13791360{13611361+ int ret = bch2_check_key_has_snapshot(trans, iter, k);13621362+ if (ret)13631363+ return ret < 0 ? ret : 0;13641364+13801365 struct bch_fs *c = trans->c;13811366 u32 equiv = bch2_snapshot_equiv(c, k.k->p.snapshot);13671367+ if (!equiv) /* key for invalid snapshot node, but we chose not to delete */13681368+ return 0;1382136913831370 if (!bkey_eq(k.k->p, *last_pos))13841371 equiv_seen->nr = 0;13851385- *last_pos = k.k->p;1386137213871387- if (snapshot_list_has_id(deleted, k.k->p.snapshot) ||13881388- snapshot_list_has_id(equiv_seen, equiv)) {13731373+ if (snapshot_list_has_id(deleted, k.k->p.snapshot))13891374 return bch2_btree_delete_at(trans, iter,13901375 BTREE_UPDATE_internal_snapshot_node);13911391- } else {13921392- return snapshot_list_add(c, equiv_seen, equiv);13931393- }13941394-}1395137613961396-static int move_key_to_correct_snapshot(struct btree_trans *trans,13971397- struct btree_iter *iter,13981398- struct bkey_s_c k)13991399-{14001400- struct bch_fs *c = trans->c;14011401- u32 equiv = bch2_snapshot_equiv(c, k.k->p.snapshot);13771377+ if (!bpos_eq(*last_pos, k.k->p) &&13781378+ snapshot_list_has_id(equiv_seen, equiv))13791379+ return bch2_btree_delete_at(trans, iter,13801380+ BTREE_UPDATE_internal_snapshot_node);13811381+13821382+ *last_pos = k.k->p;13831383+13841384+ ret = snapshot_list_add_nodup(c, equiv_seen, equiv);13851385+ if (ret)13861386+ return ret;1402138714031388 /*14041389 * When we have a linear chain of snapshot nodes, we consider···14121389 *14131390 * If there are multiple keys in different snapshots at the same14141391 * position, we're only going to keep the one in the newest14151415- * snapshot - the rest have been overwritten and are redundant,14161416- * and for the key we're going to keep we need to move it to the14171417- * equivalance class ID if it's not there already.13921392+ * snapshot (we delete the others above) - the rest have been13931393+ * overwritten and are redundant, and for the key we're going to keep we13941394+ * need to move it to the equivalance class ID if it's not there13951395+ * already.14181396 */14191397 if (equiv != k.k->p.snapshot) {14201398 struct bkey_i *new = bch2_bkey_make_mut_noupdate(trans, k);14211421- struct btree_iter new_iter;14221422- int ret;14231423-14241424- ret = PTR_ERR_OR_ZERO(new);13991399+ int ret = PTR_ERR_OR_ZERO(new);14251400 if (ret)14261401 return ret;1427140214281403 new->k.p.snapshot = equiv;1429140414051405+ struct btree_iter new_iter;14301406 bch2_trans_iter_init(trans, &new_iter, iter->btree_id, new->k.p,14311407 BTREE_ITER_all_snapshots|14321408 BTREE_ITER_cached|···15601538 struct btree_trans *trans;15611539 snapshot_id_list deleted = { 0 };15621540 snapshot_id_list deleted_interior = { 0 };15631563- u32 id;15641541 int ret = 0;1565154215661543 if (!test_and_clear_bit(BCH_FS_need_delete_dead_snapshots, &c->flags))···16061585 if (ret)16071586 goto err;1608158716091609- for (id = 0; id < BTREE_ID_NR; id++) {15881588+ for (unsigned btree = 0; btree < BTREE_ID_NR; btree++) {16101589 struct bpos last_pos = POS_MIN;16111590 snapshot_id_list equiv_seen = { 0 };16121591 struct disk_reservation res = { 0 };1613159216141614- if (!btree_type_has_snapshots(id))16151615- continue;16161616-16171617- /*16181618- * deleted inodes btree is maintained by a trigger on the inodes16191619- * btree - no work for us to do here, and it's not safe to scan16201620- * it because we'll see out of date keys due to the btree write16211621- * buffer:16221622- */16231623- if (id == BTREE_ID_deleted_inodes)15931593+ if (!btree_type_has_snapshots(btree))16241594 continue;1625159516261596 ret = for_each_btree_key_commit(trans, iter,16271627- id, POS_MIN,15971597+ btree, POS_MIN,16281598 BTREE_ITER_prefetch|BTREE_ITER_all_snapshots, k,16291599 &res, NULL, BCH_TRANS_COMMIT_no_enospc,16301630- snapshot_delete_key(trans, &iter, k, &deleted, &equiv_seen, &last_pos)) ?:16311631- for_each_btree_key_commit(trans, iter,16321632- id, POS_MIN,16331633- BTREE_ITER_prefetch|BTREE_ITER_all_snapshots, k,16341634- &res, NULL, BCH_TRANS_COMMIT_no_enospc,16351635- move_key_to_correct_snapshot(trans, &iter, k));16001600+ delete_dead_snapshots_process_key(trans, &iter, k, &deleted,16011601+ &equiv_seen, &last_pos));1636160216371603 bch2_disk_reservation_put(c, &res);16381604 darray_exit(&equiv_seen);
···23602360 * - unhash this dentry and free it.23612361 *23622362 * Usually, we want to just turn this into23632363- * a negative dentry, but certain workloads can23642364- * generate a large number of negative dentries.23652365- * Therefore, it would be better to simply23662366- * unhash it.23632363+ * a negative dentry, but if anybody else is23642364+ * currently using the dentry or the inode23652365+ * we can't do that and we fall back on removing23662366+ * it from the hash queues and waiting for23672367+ * it to be deleted later when it has no users23672368 */2368236923692370/**23702371 * d_delete - delete a dentry23712372 * @dentry: The dentry to delete23722373 *23732373- * Remove the dentry from the hash queues so it can be deleted later.23742374+ * Turn the dentry into a negative dentry if possible, otherwise23752375+ * remove it from the hash queues so it can be deleted later23742376 */2375237723762378void d_delete(struct dentry * dentry)···2381237923822380 spin_lock(&inode->i_lock);23832381 spin_lock(&dentry->d_lock);23842384- __d_drop(dentry);23852385-23862382 /*23872383 * Are we the only user?23882384 */···23882388 dentry->d_flags &= ~DCACHE_CANT_MOUNT;23892389 dentry_unlink_inode(dentry);23902390 } else {23912391+ __d_drop(dentry);23912392 spin_unlock(&dentry->d_lock);23922393 spin_unlock(&inode->i_lock);23932394 }
···1212static void netfs_cleanup_dio_write(struct netfs_io_request *wreq)1313{1414 struct inode *inode = wreq->inode;1515- unsigned long long end = wreq->start + wreq->len;1515+ unsigned long long end = wreq->start + wreq->transferred;16161717 if (!wreq->error &&1818 i_size_read(inode) < end) {
···510510 * stream has a gap that can be jumped.511511 */512512 if (notes & SOME_EMPTY) {513513- unsigned long long jump_to = wreq->start + wreq->len;513513+ unsigned long long jump_to = wreq->start + READ_ONCE(wreq->submitted);514514515515 for (s = 0; s < NR_IO_STREAMS; s++) {516516 stream = &wreq->io_streams[s];···690690 wake_up_bit(&wreq->flags, NETFS_RREQ_IN_PROGRESS);691691692692 if (wreq->iocb) {693693- wreq->iocb->ki_pos += wreq->transferred;693693+ size_t written = min(wreq->transferred, wreq->len);694694+ wreq->iocb->ki_pos += written;694695 if (wreq->iocb->ki_complete)695696 wreq->iocb->ki_complete(696696- wreq->iocb, wreq->error ? wreq->error : wreq->transferred);697697+ wreq->iocb, wreq->error ? wreq->error : written);697698 wreq->iocb = VFS_PTR_POISON;698699 }699700
···282282 if (IS_ERR(file)) {283283 put_unused_fd(ufd);284284 kfree(ctx);285285- return ufd;285285+ return PTR_ERR(file);286286 }287287 file->f_mode |= FMODE_NOWAIT;288288289289- /*290290- * When we call this, the initialization must be complete, since291291- * anon_inode_getfd() will install the fd.292292- */293289 fd_install(ufd, file);294290 } else {295291 struct fd f = fdget(ufd);
···329329 return nblks;330330}331331332332-/* Initialize transaction reservation for attr operations */333333-void334334-xfs_init_attr_trans(335335- struct xfs_da_args *args,336336- struct xfs_trans_res *tres,337337- unsigned int *total)332332+/* Initialize transaction reservation for an xattr set/replace/upsert */333333+inline struct xfs_trans_res334334+xfs_attr_set_resv(335335+ const struct xfs_da_args *args)338336{339339- struct xfs_mount *mp = args->dp->i_mount;337337+ struct xfs_mount *mp = args->dp->i_mount;338338+ struct xfs_trans_res ret = {339339+ .tr_logres = M_RES(mp)->tr_attrsetm.tr_logres +340340+ M_RES(mp)->tr_attrsetrt.tr_logres * args->total,341341+ .tr_logcount = XFS_ATTRSET_LOG_COUNT,342342+ .tr_logflags = XFS_TRANS_PERM_LOG_RES,343343+ };340344341341- if (args->value) {342342- tres->tr_logres = M_RES(mp)->tr_attrsetm.tr_logres +343343- M_RES(mp)->tr_attrsetrt.tr_logres *344344- args->total;345345- tres->tr_logcount = XFS_ATTRSET_LOG_COUNT;346346- tres->tr_logflags = XFS_TRANS_PERM_LOG_RES;347347- *total = args->total;348348- } else {349349- *tres = M_RES(mp)->tr_attrrm;350350- *total = XFS_ATTRRM_SPACE_RES(mp);351351- }345345+ return ret;352346}353347354348/*···10001006 struct xfs_trans_res tres;10011007 int error, local;10021008 int rmt_blks = 0;10031003- unsigned int total;10091009+ unsigned int total = 0;1004101010051011 ASSERT(!args->trans);10061012···1027103310281034 if (!local)10291035 rmt_blks = xfs_attr3_rmt_blocks(mp, args->valuelen);10361036+10371037+ tres = xfs_attr_set_resv(args);10381038+ total = args->total;10301039 break;10311040 case XFS_ATTRUPDATE_REMOVE:10321041 XFS_STATS_INC(mp, xs_attr_remove);10331042 rmt_blks = xfs_attr3_max_rmt_blocks(mp);10431043+ tres = M_RES(mp)->tr_attrrm;10441044+ total = XFS_ATTRRM_SPACE_RES(mp);10341045 break;10351046 }10361047···10431044 * Root fork attributes can use reserved data blocks for this10441045 * operation if necessary10451046 */10461046- xfs_init_attr_trans(args, &tres, &total);10471047 error = xfs_trans_alloc_inode(dp, &tres, total, 0, rsvd, &args->trans);10481048 if (error)10491049 return error;
+1-2
fs/xfs/libxfs/xfs_attr.h
···565565bool xfs_attr_namecheck(unsigned int attr_flags, const void *name,566566 size_t length);567567int xfs_attr_calc_size(struct xfs_da_args *args, int *local);568568-void xfs_init_attr_trans(struct xfs_da_args *args, struct xfs_trans_res *tres,569569- unsigned int *total);568568+struct xfs_trans_res xfs_attr_set_resv(const struct xfs_da_args *args);570569571570/*572571 * Check to see if the attr should be upgraded from non-existent or shortform to
···374374 /*375375 * For fork types that can contain local data, check that the fork376376 * format matches the size of local data contained within the fork.377377- *378378- * For all types, check that when the size says the should be in extent379379- * or btree format, the inode isn't claiming it is in local format.380377 */381378 if (whichfork == XFS_DATA_FORK) {382382- if (S_ISDIR(mode) || S_ISLNK(mode)) {379379+ /*380380+ * A directory small enough to fit in the inode must be stored381381+ * in local format. The directory sf <-> extents conversion382382+ * code updates the directory size accordingly.383383+ */384384+ if (S_ISDIR(mode)) {383385 if (be64_to_cpu(dip->di_size) <= fork_size &&384386 fork_format != XFS_DINODE_FMT_LOCAL)385387 return __this_address;386388 }387389390390+ /*391391+ * A symlink with a target small enough to fit in the inode can392392+ * be stored in extents format if xattrs were added (thus393393+ * converting the data fork from shortform to remote format)394394+ * and then removed.395395+ */396396+ if (S_ISLNK(mode)) {397397+ if (be64_to_cpu(dip->di_size) <= fork_size &&398398+ fork_format != XFS_DINODE_FMT_EXTENTS &&399399+ fork_format != XFS_DINODE_FMT_LOCAL)400400+ return __this_address;401401+ }402402+403403+ /*404404+ * For all types, check that when the size says the fork should405405+ * be in extent or btree format, the inode isn't claiming to be406406+ * in local format.407407+ */388408 if (be64_to_cpu(dip->di_size) > fork_size &&389409 fork_format == XFS_DINODE_FMT_LOCAL)390410 return __this_address;
···822822823823 /* Grab the first folio that backs this array element. */824824 if (!si->folio) {825825+ struct folio *folio;825826 loff_t next_pos;826827827827- si->folio = xfile_get_folio(si->array->xfile, idx_pos,828828+ folio = xfile_get_folio(si->array->xfile, idx_pos,828829 si->array->obj_size, XFILE_ALLOC);829829- if (IS_ERR(si->folio))830830- return PTR_ERR(si->folio);830830+ if (IS_ERR(folio))831831+ return PTR_ERR(folio);832832+ si->folio = folio;831833832834 si->first_folio_idx = xfarray_idx(si->array,833835 folio_pos(si->folio) + si->array->obj_size - 1);···1050104810511049out_free:10521050 trace_xfarray_sort_stats(si, error);10511051+ xfarray_sort_scan_done(si);10531052 kvfree(si);10541053 return error;10551054}
+15-2
fs/xfs/xfs_attr_item.c
···746746 struct xfs_attri_log_format *attrp;747747 struct xfs_attri_log_nameval *nv = attrip->attri_nameval;748748 int error;749749- int total;749749+ unsigned int total = 0;750750751751 /*752752 * First check the validity of the attr described by the ATTRI. If any···763763 return PTR_ERR(attr);764764 args = attr->xattri_da_args;765765766766- xfs_init_attr_trans(args, &resv, &total);766766+ switch (xfs_attr_intent_op(attr)) {767767+ case XFS_ATTRI_OP_FLAGS_PPTR_SET:768768+ case XFS_ATTRI_OP_FLAGS_PPTR_REPLACE:769769+ case XFS_ATTRI_OP_FLAGS_SET:770770+ case XFS_ATTRI_OP_FLAGS_REPLACE:771771+ resv = xfs_attr_set_resv(args);772772+ total = args->total;773773+ break;774774+ case XFS_ATTRI_OP_FLAGS_PPTR_REMOVE:775775+ case XFS_ATTRI_OP_FLAGS_REMOVE:776776+ resv = M_RES(mp)->tr_attrrm;777777+ total = XFS_ATTRRM_SPACE_RES(mp);778778+ break;779779+ }767780 resv = xlog_recover_resv(&resv);768781 error = xfs_trans_alloc(mp, &resv, total, 0, XFS_TRANS_RESERVE, &tp);769782 if (error)
+1-6
fs/xfs/xfs_handle.c
···773773 trace_xfs_getparents_expand_lastrec(gpx->ip, gp, &gpx->context, gpr);774774}775775776776-static inline void __user *u64_to_uptr(u64 val)777777-{778778- return (void __user *)(uintptr_t)val;779779-}780780-781776/* Retrieve the parent pointers for a given inode. */782777STATIC int783778xfs_getparents(···857862 ASSERT(gpx->context.firstu <= gpx->gph.gph_request.gp_bufsize);858863859864 /* Copy the records to userspace. */860860- if (copy_to_user(u64_to_uptr(gpx->gph.gph_request.gp_buffer),865865+ if (copy_to_user(u64_to_user_ptr(gpx->gph.gph_request.gp_buffer),861866 gpx->krecords, gpx->context.firstu))862867 error = -EFAULT;863868
+2-3
fs/xfs/xfs_iwalk.c
···351351 int *has_more)352352{353353 struct xfs_mount *mp = iwag->mp;354354- struct xfs_inobt_rec_incore *irec;355354 xfs_agino_t next_agino;356355 int error;357356···360361361362 /* Delete cursor but remember the last record we cached... */362363 xfs_iwalk_del_inobt(iwag->tp, curpp, agi_bpp, 0);363363- irec = &iwag->recs[iwag->nr_recs - 1];364364- ASSERT(next_agino >= irec->ir_startino + XFS_INODES_PER_CHUNK);364364+ ASSERT(next_agino >= iwag->recs[iwag->nr_recs - 1].ir_startino +365365+ XFS_INODES_PER_CHUNK);365366366367 if (iwag->drop_trans) {367368 xfs_trans_cancel(iwag->tp);
···5656 struct list_head tmp_link;5757};58585959-/* Order-zero must be at least PAGE_SIZE */6060-#define DRM_BUDDY_MAX_ORDER (63 - PAGE_SHIFT)5959+/* Order-zero must be at least SZ_4K */6060+#define DRM_BUDDY_MAX_ORDER (63 - 12)61616262/*6363 * Binary Buddy System.···8585 unsigned int n_roots;8686 unsigned int max_order;87878888- /* Must be at least PAGE_SIZE */8888+ /* Must be at least SZ_4K */8989 u64 chunk_size;9090 u64 size;9191 u64 avail;
···186186 */187187 unsigned int nr_zones;188188 unsigned int zone_capacity;189189+ unsigned int last_zone_capacity;189190 unsigned long *conv_zones_bitmap;190191 unsigned int zone_wplugs_hash_bits;191192 spinlock_t zone_wplugs_lock;
+8
include/linux/etherdevice.h
···636636 }637637}638638639639+static inline struct ethhdr *eth_skb_pull_mac(struct sk_buff *skb)640640+{641641+ struct ethhdr *eth = (struct ethhdr *)skb->data;642642+643643+ skb_pull_inline(skb, ETH_HLEN);644644+ return eth;645645+}646646+639647/**640648 * eth_skb_pad - Pad buffer to mininum number of octets for Ethernet frame641649 * @skb: Buffer to pad
···6868 loff_t remote_i_size; /* Size of the remote file */6969 loff_t zero_point; /* Size after which we assume there's no data7070 * on the server */7171+ atomic_t io_count; /* Number of outstanding reqs */7172 unsigned long flags;7273#define NETFS_ICTX_ODIRECT 0 /* The file has DIO in progress */7374#define NETFS_ICTX_UNBUFFERED 1 /* I/O should not use the pagecache */···475474 ctx->remote_i_size = i_size_read(&ctx->inode);476475 ctx->zero_point = LLONG_MAX;477476 ctx->flags = 0;477477+ atomic_set(&ctx->io_count, 0);478478#if IS_ENABLED(CONFIG_FSCACHE)479479 ctx->cache = NULL;480480#endif···517515#else518516 return NULL;519517#endif518518+}519519+520520+/**521521+ * netfs_wait_for_outstanding_io - Wait for outstanding I/O to complete522522+ * @ctx: The netfs inode to wait on523523+ *524524+ * Wait for outstanding I/O requests of any type to complete. This is intended525525+ * to be called from inode eviction routines. This makes sure that any526526+ * resources held by those requests are cleaned up before we let the inode get527527+ * cleaned up.528528+ */529529+static inline void netfs_wait_for_outstanding_io(struct inode *inode)530530+{531531+ struct netfs_inode *ictx = netfs_inode(inode);532532+533533+ wait_var_event(&ictx->io_count, atomic_read(&ictx->io_count) == 0);520534}521535522536#endif /* _LINUX_NETFS_H */
+21-13
include/linux/pagemap.h
···346346 m->gfp_mask = mask;347347}348348349349+/*350350+ * There are some parts of the kernel which assume that PMD entries351351+ * are exactly HPAGE_PMD_ORDER. Those should be fixed, but until then,352352+ * limit the maximum allocation order to PMD size. I'm not aware of any353353+ * assumptions about maximum order if THP are disabled, but 8 seems like354354+ * a good order (that's 1MB if you're using 4kB pages)355355+ */356356+#ifdef CONFIG_TRANSPARENT_HUGEPAGE357357+#define MAX_PAGECACHE_ORDER HPAGE_PMD_ORDER358358+#else359359+#define MAX_PAGECACHE_ORDER 8360360+#endif361361+349362/**350363 * mapping_set_large_folios() - Indicate the file supports large folios.351364 * @mapping: The file.···383370{384371 return IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) &&385372 test_bit(AS_LARGE_FOLIO_SUPPORT, &mapping->flags);373373+}374374+375375+/* Return the maximum folio size for this pagecache mapping, in bytes. */376376+static inline size_t mapping_max_folio_size(struct address_space *mapping)377377+{378378+ if (mapping_large_folio_support(mapping))379379+ return PAGE_SIZE << MAX_PAGECACHE_ORDER;380380+ return PAGE_SIZE;386381}387382388383static inline int filemap_nr_thps(struct address_space *mapping)···550529{551530 return folio_detach_private(page_folio(page));552531}553553-554554-/*555555- * There are some parts of the kernel which assume that PMD entries556556- * are exactly HPAGE_PMD_ORDER. Those should be fixed, but until then,557557- * limit the maximum allocation order to PMD size. I'm not aware of any558558- * assumptions about maximum order if THP are disabled, but 8 seems like559559- * a good order (that's 1MB if you're using 4kB pages)560560- */561561-#ifdef CONFIG_TRANSPARENT_HUGEPAGE562562-#define MAX_PAGECACHE_ORDER HPAGE_PMD_ORDER563563-#else564564-#define MAX_PAGECACHE_ORDER 8565565-#endif566532567533#ifdef CONFIG_NUMA568534struct folio *filemap_alloc_folio_noprof(gfp_t gfp, unsigned int order);
-17
include/linux/tpm.h
···394394 TPM2_OA_SIGN = BIT(18),395395};396396397397-/*398398- * definitions for the canonical template. These are mandated399399- * by the TCG key template documents400400- */401401-402402-#define AES_KEY_BYTES AES_KEYSIZE_128403403-#define AES_KEY_BITS (AES_KEY_BYTES*8)404404-#define TPM2_OA_TMPL (TPM2_OA_NO_DA | \405405- TPM2_OA_FIXED_TPM | \406406- TPM2_OA_FIXED_PARENT | \407407- TPM2_OA_SENSITIVE_DATA_ORIGIN | \408408- TPM2_OA_USER_WITH_AUTH | \409409- TPM2_OA_DECRYPT | \410410- TPM2_OA_RESTRICTED)411411-412397enum tpm2_session_attributes {413398 TPM2_SA_CONTINUE_SESSION = BIT(0),414399 TPM2_SA_AUDIT_EXCLUSIVE = BIT(1),···421436u8 tpm_buf_read_u8(struct tpm_buf *buf, off_t *offset);422437u16 tpm_buf_read_u16(struct tpm_buf *buf, off_t *offset);423438u32 tpm_buf_read_u32(struct tpm_buf *buf, off_t *offset);424424-425425-u8 *tpm_buf_parameters(struct tpm_buf *buf);426439427440/*428441 * Check if TPM device is in the firmware upgrade mode.
···45454646/**4747 * struct page_pool_params - page pool parameters4848+ * @fast: params accessed frequently on hotpath4849 * @order: 2^order pages on allocation4950 * @pool_size: size of the ptr_ring5051 * @nid: NUMA node id to allocate from pages from5152 * @dev: device, for DMA pre-mapping purposes5252- * @netdev: netdev this pool will serve (leave as NULL if none or multiple)5353 * @napi: NAPI which is the sole consumer of pages, otherwise NULL5454 * @dma_dir: DMA mapping direction5555 * @max_len: max DMA sync memory size for PP_FLAG_DMA_SYNC_DEV5656 * @offset: DMA sync address offset for PP_FLAG_DMA_SYNC_DEV5757- * @netdev: corresponding &net_device for Netlink introspection5757+ * @slow: params with slowpath access only (initialization and Netlink)5858+ * @netdev: netdev this pool will serve (leave as NULL if none or multiple)5859 * @flags: PP_FLAG_DMA_MAP, PP_FLAG_DMA_SYNC_DEV, PP_FLAG_SYSTEM_POOL5960 */6061struct page_pool_params {
+12
include/net/request_sock.h
···285285 return atomic_read(&queue->young);286286}287287288288+/* RFC 7323 2.3 Using the Window Scale Option289289+ * The window field (SEG.WND) of every outgoing segment, with the290290+ * exception of <SYN> segments, MUST be right-shifted by291291+ * Rcv.Wind.Shift bits.292292+ *293293+ * This means the SEG.WND carried in SYNACK can not exceed 65535.294294+ * We use this property to harden TCP stack while in NEW_SYN_RECV state.295295+ */296296+static inline u32 tcp_synack_window(const struct request_sock *req)297297+{298298+ return min(req->rsk_rcv_wnd, 65535U);299299+}288300#endif /* _REQUEST_SOCK_H */
···88828882 enum bpf_attach_type eatype = env->prog->expected_attach_type;88838883 enum bpf_prog_type type = resolve_prog_type(env->prog);8884888488858885- if (func_id != BPF_FUNC_map_update_elem)88858885+ if (func_id != BPF_FUNC_map_update_elem &&88868886+ func_id != BPF_FUNC_map_delete_elem)88868887 return false;8887888888888889 /* It's not possible to get access to a locked struct sock in these···88928891 switch (type) {88938892 case BPF_PROG_TYPE_TRACING:88948893 if (eatype == BPF_TRACE_ITER)88948894+ return true;88958895+ break;88968896+ case BPF_PROG_TYPE_SOCK_OPS:88978897+ /* map_update allowed only via dedicated helpers with event type checks */88988898+ if (func_id == BPF_FUNC_map_delete_elem)88958899 return true;88968900 break;88978901 case BPF_PROG_TYPE_SOCKET_FILTER:···89948988 case BPF_MAP_TYPE_SOCKMAP:89958989 if (func_id != BPF_FUNC_sk_redirect_map &&89968990 func_id != BPF_FUNC_sock_map_update &&89978997- func_id != BPF_FUNC_map_delete_elem &&89988991 func_id != BPF_FUNC_msg_redirect_map &&89998992 func_id != BPF_FUNC_sk_select_reuseport &&90008993 func_id != BPF_FUNC_map_lookup_elem &&···90038998 case BPF_MAP_TYPE_SOCKHASH:90048999 if (func_id != BPF_FUNC_sk_redirect_hash &&90059000 func_id != BPF_FUNC_sock_hash_update &&90069006- func_id != BPF_FUNC_map_delete_elem &&90079001 func_id != BPF_FUNC_msg_redirect_hash &&90089002 func_id != BPF_FUNC_sk_select_reuseport &&90099003 func_id != BPF_FUNC_map_lookup_elem &&
+16-9
kernel/dma/map_benchmark.c
···101101 struct task_struct **tsk;102102 int threads = map->bparam.threads;103103 int node = map->bparam.node;104104- const cpumask_t *cpu_mask = cpumask_of_node(node);105104 u64 loops;106105 int ret = 0;107106 int i;···117118 if (IS_ERR(tsk[i])) {118119 pr_err("create dma_map thread failed\n");119120 ret = PTR_ERR(tsk[i]);121121+ while (--i >= 0)122122+ kthread_stop(tsk[i]);120123 goto out;121124 }122125123126 if (node != NUMA_NO_NODE)124124- kthread_bind_mask(tsk[i], cpu_mask);127127+ kthread_bind_mask(tsk[i], cpumask_of_node(node));125128 }126129127130 /* clear the old value in the previous benchmark */···140139141140 msleep_interruptible(map->bparam.seconds * 1000);142141143143- /* wait for the completion of benchmark threads */142142+ /* wait for the completion of all started benchmark threads */144143 for (i = 0; i < threads; i++) {145145- ret = kthread_stop(tsk[i]);146146- if (ret)147147- goto out;144144+ int kthread_ret = kthread_stop_put(tsk[i]);145145+146146+ if (kthread_ret)147147+ ret = kthread_ret;148148 }149149+150150+ if (ret)151151+ goto out;149152150153 loops = atomic64_read(&map->loops);151154 if (likely(loops > 0)) {···175170 }176171177172out:178178- for (i = 0; i < threads; i++)179179- put_task_struct(tsk[i]);180173 put_device(map->dev);181174 kfree(tsk);182175 return ret;···211208 }212209213210 if (map->bparam.node != NUMA_NO_NODE &&214214- !node_possible(map->bparam.node)) {211211+ (map->bparam.node < 0 || map->bparam.node >= MAX_NUMNODES ||212212+ !node_possible(map->bparam.node))) {215213 pr_err("invalid numa node\n");216214 return -EINVAL;217215 }···256252 * dma_mask changed by benchmark257253 */258254 dma_set_mask(map->dev, old_dma_mask);255255+256256+ if (ret)257257+ return ret;259258 break;260259 default:261260 return -EINVAL;
+7-2
kernel/gen_kheaders.sh
···1414arch/$SRCARCH/include/1515"16161717-type cpio > /dev/null1717+if ! command -v cpio >/dev/null; then1818+ echo >&2 "***"1919+ echo >&2 "*** 'cpio' could not be found."2020+ echo >&2 "***"2121+ exit 12222+fi18231924# Support incremental builds by skipping archive generation2025# if timestamps of files being archived are not changed.···89849085# Create archive and try to normalize metadata for reproducibility.9186tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \9292- --owner=0 --group=0 --sort=name --numeric-owner \8787+ --owner=0 --group=0 --sort=name --numeric-owner --mode=u=rw,go=r,a+X \9388 -I $XZ -cf $tarfile -C $cpio_dir/ . > /dev/null94899590echo $headers_md5 > kernel/kheaders.md5
···423423 struct sock *sk;424424 int err = 0;425425426426- if (irqs_disabled())427427- return -EOPNOTSUPP; /* locks here are hardirq-unsafe */428428-429426 spin_lock_bh(&stab->lock);430427 sk = *psk;431428 if (!sk_test || sk_test == sk)···944947 struct bpf_shtab_bucket *bucket;945948 struct bpf_shtab_elem *elem;946949 int ret = -ENOENT;947947-948948- if (irqs_disabled())949949- return -EOPNOTSUPP; /* locks here are hardirq-unsafe */950950951951 hash = sock_hash_bucket_hash(key, key_size);952952 bucket = sock_hash_select_bucket(htab, hash);···1674168016751681 lock_sock(sk);16761682 rcu_read_lock();16771677- psock = sk_psock_get(sk);16781678- if (unlikely(!psock)) {16791679- rcu_read_unlock();16801680- release_sock(sk);16811681- saved_close = READ_ONCE(sk->sk_prot)->close;16821682- } else {16831683+ psock = sk_psock(sk);16841684+ if (likely(psock)) {16831685 saved_close = psock->saved_close;16841686 sock_map_remove_links(sk, psock);16871687+ psock = sk_psock_get(sk);16881688+ if (unlikely(!psock))16891689+ goto no_psock;16851690 rcu_read_unlock();16861691 sk_psock_stop(psock);16871692 release_sock(sk);16881693 cancel_delayed_work_sync(&psock->work);16891694 sk_psock_put(sk, psock);16951695+ } else {16961696+ saved_close = READ_ONCE(sk->sk_prot)->close;16971697+no_psock:16981698+ rcu_read_unlock();16991699+ release_sock(sk);16901700 }1691170116921702 /* Make sure we do not recurse. This is a bug.
+1-3
net/ethernet/eth.c
···161161 skb->dev = dev;162162 skb_reset_mac_header(skb);163163164164- eth = (struct ethhdr *)skb->data;165165- skb_pull_inline(skb, ETH_HLEN);166166-164164+ eth = eth_skb_pull_mac(skb);167165 eth_skb_pkt_type(skb, dev);168166169167 /*
+1-1
net/ipv4/af_inet.c
···15321532 }1533153315341534 NAPI_GRO_CB(skb)->flush |= flush;15351535- NAPI_GRO_CB(skb)->inner_network_offset = off;15351535+ NAPI_GRO_CB(skb)->network_offsets[NAPI_GRO_CB(skb)->encap_mark] = off;1536153615371537 /* Note : No need to call skb_gro_postpull_rcsum() here,15381538 * as we already checked checksum over ipv4 header was 0
+4-3
net/ipv4/devinet.c
···18871887 goto done;1888188818891889 if (fillargs.ifindex) {18901890- err = -ENODEV;18911890 dev = dev_get_by_index_rcu(tgt_net, fillargs.ifindex);18921892- if (!dev)18911891+ if (!dev) {18921892+ err = -ENODEV;18931893 goto done;18941894+ }18941895 in_dev = __in_dev_get_rcu(dev);18951896 if (!in_dev)18961897 goto done;···1903190219041903 cb->seq = inet_base_seq(tgt_net);1905190419061906- for_each_netdev_dump(net, dev, ctx->ifindex) {19051905+ for_each_netdev_dump(tgt_net, dev, ctx->ifindex) {19071906 in_dev = __in_dev_get_rcu(dev);19081907 if (!in_dev)19091908 continue;
+2
net/ipv4/netfilter/nf_tproxy_ipv4.c
···58585959 laddr = 0;6060 indev = __in_dev_get_rcu(skb->dev);6161+ if (!indev)6262+ return daddr;61636264 in_dev_for_each_ifa_rcu(ifa, indev) {6365 if (ifa->ifa_flags & IFA_F_SECONDARY)
···12721272 /* sk->sk_state == TCP_LISTEN -> for regular TCP_SYN_RECV12731273 * sk->sk_state == TCP_SYN_RECV -> for Fast Open.12741274 */12751275- /* RFC 7323 2.312761276- * The window field (SEG.WND) of every outgoing segment, with the12771277- * exception of <SYN> segments, MUST be right-shifted by12781278- * Rcv.Wind.Shift bits:12791279- */12801275 tcp_v6_send_ack(sk, skb, (sk->sk_state == TCP_LISTEN) ?12811276 tcp_rsk(req)->snt_isn + 1 : tcp_sk(sk)->snd_nxt,12821277 tcp_rsk(req)->rcv_nxt,12831283- req->rsk_rcv_wnd >> inet_rsk(req)->rcv_wscale,12781278+ tcp_synack_window(req) >> inet_rsk(req)->rcv_wscale,12841279 tcp_rsk_tsval(tcp_rsk(req)),12851280 READ_ONCE(req->ts_recent), sk->sk_bound_dev_if,12861281 &key, ipv6_get_dsfield(ipv6_hdr(skb)), 0,
+3
net/netfilter/ipset/ip_set_list_set.c
···549549550550 if (SET_WITH_TIMEOUT(set))551551 timer_shutdown_sync(&map->gc);552552+553553+ /* Flush list to drop references to other ipsets */554554+ list_set_flush(set);552555}553556554557static const struct ip_set_type_variant set_variant = {
···11511151 list_for_each_entry(entry, &new->entries, list)11521152 cycle = ktime_add_ns(cycle, entry->interval);1153115311541154- if (!cycle) {11551155- NL_SET_ERR_MSG(extack, "'cycle_time' can never be 0");11561156- return -EINVAL;11571157- }11581158-11591154 if (cycle < 0 || cycle > INT_MAX) {11601155 NL_SET_ERR_MSG(extack, "'cycle_time' is too big");11611156 return -EINVAL;11621157 }1163115811641159 new->cycle_time = cycle;11601160+ }11611161+11621162+ if (new->cycle_time < new->num_entries * length_to_duration(q, ETH_ZLEN)) {11631163+ NL_SET_ERR_MSG(extack, "'cycle_time' is too small");11641164+ return -EINVAL;11651165 }1166116611671167 taprio_calculate_gate_durations(q, new);···18481848 }18491849 q->flags = taprio_flags;1850185018511851+ /* Needed for length_to_duration() during netlink attribute parsing */18521852+ taprio_set_picos_per_byte(dev, q);18531853+18511854 err = taprio_parse_mqprio_opt(dev, mqprio, extack, q->flags);18521855 if (err < 0)18531856 return err;···19101907 if (err < 0)19111908 goto free_sched;1912190919131913- taprio_set_picos_per_byte(dev, q);19141910 taprio_update_queue_max_sdu(q, new_admin, stab);1915191119161912 if (FULL_OFFLOAD_IS_ENABLED(q->flags))
+12-7
net/unix/af_unix.c
···731731 if (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET)732732 goto out; /* Only stream/seqpacket sockets accept */733733 err = -EINVAL;734734- if (!u->addr)734734+ if (!READ_ONCE(u->addr))735735 goto out; /* No listens on an unbound socket */736736 unix_state_lock(sk);737737 if (sk->sk_state != TCP_CLOSE && sk->sk_state != TCP_LISTEN)···1131113111321132static int unix_autobind(struct sock *sk)11331133{11341134- unsigned int new_hash, old_hash = sk->sk_hash;11351134 struct unix_sock *u = unix_sk(sk);11351135+ unsigned int new_hash, old_hash;11361136 struct net *net = sock_net(sk);11371137 struct unix_address *addr;11381138 u32 lastnum, ordernum;···11551155 addr->name->sun_family = AF_UNIX;11561156 refcount_set(&addr->refcnt, 1);1157115711581158+ old_hash = sk->sk_hash;11581159 ordernum = get_random_u32();11591160 lastnum = ordernum & 0xFFFFF;11601161retry:···11961195{11971196 umode_t mode = S_IFSOCK |11981197 (SOCK_INODE(sk->sk_socket)->i_mode & ~current_umask());11991199- unsigned int new_hash, old_hash = sk->sk_hash;12001198 struct unix_sock *u = unix_sk(sk);11991199+ unsigned int new_hash, old_hash;12011200 struct net *net = sock_net(sk);12021201 struct mnt_idmap *idmap;12031202 struct unix_address *addr;···12351234 if (u->addr)12361235 goto out_unlock;1237123612371237+ old_hash = sk->sk_hash;12381238 new_hash = unix_bsd_hash(d_backing_inode(dentry));12391239 unix_table_double_lock(net, old_hash, new_hash);12401240 u->path.mnt = mntget(parent.mnt);···12631261static int unix_bind_abstract(struct sock *sk, struct sockaddr_un *sunaddr,12641262 int addr_len)12651263{12661266- unsigned int new_hash, old_hash = sk->sk_hash;12671264 struct unix_sock *u = unix_sk(sk);12651265+ unsigned int new_hash, old_hash;12681266 struct net *net = sock_net(sk);12691267 struct unix_address *addr;12701268 int err;···12821280 goto out_mutex;12831281 }1284128212831283+ old_hash = sk->sk_hash;12851284 new_hash = unix_abstract_hash(addr->name, addr->len, sk->sk_type);12861285 unix_table_double_lock(net, old_hash, new_hash);12871286···1372136913731370 if ((test_bit(SOCK_PASSCRED, &sock->flags) ||13741371 test_bit(SOCK_PASSPIDFD, &sock->flags)) &&13751375- !unix_sk(sk)->addr) {13721372+ !READ_ONCE(unix_sk(sk)->addr)) {13761373 err = unix_autobind(sk);13771374 if (err)13781375 goto out;···14841481 goto out;1485148214861483 if ((test_bit(SOCK_PASSCRED, &sock->flags) ||14871487- test_bit(SOCK_PASSPIDFD, &sock->flags)) && !u->addr) {14841484+ test_bit(SOCK_PASSPIDFD, &sock->flags)) &&14851485+ !READ_ONCE(u->addr)) {14881486 err = unix_autobind(sk);14891487 if (err)14901488 goto out;···19541950 }1955195119561952 if ((test_bit(SOCK_PASSCRED, &sock->flags) ||19571957- test_bit(SOCK_PASSPIDFD, &sock->flags)) && !u->addr) {19531953+ test_bit(SOCK_PASSPIDFD, &sock->flags)) &&19541954+ !READ_ONCE(u->addr)) {19581955 err = unix_autobind(sk);19591956 if (err)19601957 goto out;
+3-8
net/xfrm/xfrm_policy.c
···39103910 /* Impossible. Such dst must be popped before reaches point of failure. */39113911}3912391239133913-static struct dst_entry *xfrm_negative_advice(struct dst_entry *dst)39133913+static void xfrm_negative_advice(struct sock *sk, struct dst_entry *dst)39143914{39153915- if (dst) {39163916- if (dst->obsolete) {39173917- dst_release(dst);39183918- dst = NULL;39193919- }39203920- }39213921- return dst;39153915+ if (dst->obsolete)39163916+ sk_dst_reset(sk);39223917}3923391839243919static void xfrm_init_pmtu(struct xfrm_dst **bundle, int nr)
+1-1
scripts/dtc/Makefile
···3344# *** Also keep .gitignore in sync when changing ***55hostprogs-always-$(CONFIG_DTC) += dtc fdtoverlay66-hostprogs-always-$(CHECK_DT_BINDING) += dtc66+hostprogs-always-$(CHECK_DTBS) += dtc7788dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \99 srcpos.o checks.o util.o
···14141515struct symbol symbol_yes = {1616 .name = "y",1717+ .type = S_TRISTATE,1718 .curr = { "y", yes },1819 .menus = LIST_HEAD_INIT(symbol_yes.menus),1920 .flags = SYMBOL_CONST|SYMBOL_VALID,···22212322struct symbol symbol_mod = {2423 .name = "m",2424+ .type = S_TRISTATE,2525 .curr = { "m", mod },2626 .menus = LIST_HEAD_INIT(symbol_mod.menus),2727 .flags = SYMBOL_CONST|SYMBOL_VALID,···30283129struct symbol symbol_no = {3230 .name = "n",3131+ .type = S_TRISTATE,3332 .curr = { "n", no },3433 .menus = LIST_HEAD_INIT(symbol_no.menus),3534 .flags = SYMBOL_CONST|SYMBOL_VALID,···823820 case no:824821 return "n";825822 case mod:826826- sym_calc_value(modules_sym);827827- return (modules_sym->curr.tri == no) ? "n" : "m";823823+ return "m";828824 case yes:829825 return "y";830826 }
+4-5
scripts/link-vmlinux.sh
···179179 kallsyms_S=${kallsyms_vmlinux}.S180180181181 vmlinux_link ${kallsyms_vmlinux} "${kallsymso_prev}" ${btf_vmlinux_bin_o}182182- mksysmap ${kallsyms_vmlinux} ${kallsyms_vmlinux}.syms ${kallsymso_prev}182182+ mksysmap ${kallsyms_vmlinux} ${kallsyms_vmlinux}.syms183183 kallsyms ${kallsyms_vmlinux}.syms ${kallsyms_S}184184185185- info AS ${kallsyms_S}185185+ info AS ${kallsymso}186186 ${CC} ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS} \187187 ${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} \188188 -c -o ${kallsymso} ${kallsyms_S}···193193mksysmap()194194{195195 info NM ${2}196196- ${CONFIG_SHELL} "${srctree}/scripts/mksysmap" ${1} ${2} ${3}196196+ ${NM} -n "${1}" | "${srctree}/scripts/mksysmap" > "${2}"197197}198198199199sorttable()···201201 ${objtree}/scripts/sorttable ${1}202202}203203204204-# Delete output files in case of error205204cleanup()206205{207206 rm -f .btf.*···281282 ${RESOLVE_BTFIDS} vmlinux282283fi283284284284-mksysmap vmlinux System.map ${kallsymso}285285+mksysmap vmlinux System.map285286286287if is_enabled CONFIG_BUILDTIME_TABLE_SORT; then287288 info SORTTAB vmlinux
+1-2
scripts/make_fit.py
···190190 Args:191191 fsw (libfdt.FdtSw): Object to use for writing192192 seq (int): Sequence number (1 for first)193193- fmame (str): Filename containing the DTB193193+ fname (str): Filename containing the DTB194194 arch: FIT architecture, e.g. 'arm64'195195 compress (str): Compressed algorithm, e.g. 'gzip'196196···211211 fsw.property_string('type', 'flat_dt')212212 fsw.property_string('arch', arch)213213 fsw.property_string('compression', compress)214214- fsw.property('compatible', bytes(compat))215214216215 with open(fname, 'rb') as inf:217216 compressed = compress_data(inf, compress)
+6-22
scripts/mksysmap
···11-#!/bin/sh -x22-# Based on the vmlinux file create the System.map file11+#!/bin/sed -f22+# SPDX-License-Identifier: GPL-2.0-only33+#44+# sed script to filter out symbols that are not needed for System.map,55+# or not suitable for kallsyms. The input should be 'nm -n <file>'.66+#37# System.map is used by module-init tools and some debugging48# tools to retrieve the actual addresses of symbols in the kernel.59#66-# Usage77-# mksysmap vmlinux System.map [exclude]88-99-1010-#####1111-# Generate System.map (actual filename passed as second argument)1212-# The following refers to the symbol type as per nm(1).1313-1410# readprofile starts reading symbols when _stext is found, and1511# continue until it finds a symbol which is not either of 'T', 't',1612# 'W' or 'w'.1713#1818-1919-${NM} -n ${1} | sed >${2} -e "2014# ---------------------------------------------------------------------------2115# Ignored symbol types2216#···8692# ppc stub8793/\.long_branch\./d8894/\.plt_branch\./d8989-9090-# ---------------------------------------------------------------------------9191-# Ignored kallsyms symbols9292-#9393-# If the 3rd parameter exists, symbols from it will be omitted from the output.9494-# This makes kallsyms have the identical symbol lists in the step 1 and 2.9595-# Without this, the step2 would get new symbols generated by scripts/kallsyms.c9696-# when CONFIG_KALLSYMS_ALL is enabled. That might require one more pass.9797-$(if [ $# -ge 3 ]; then ${NM} ${3} | sed -n '/ U /!s:.* \([^ ]*\)$:/ \1$/d:p'; fi)9898-"
+11-2
security/landlock/fs.c
···11101110 bool allow_parent1, allow_parent2;11111111 access_mask_t access_request_parent1, access_request_parent2;11121112 struct path mnt_dir;11131113+ struct dentry *old_parent;11131114 layer_mask_t layer_masks_parent1[LANDLOCK_NUM_ACCESS_FS] = {},11141115 layer_masks_parent2[LANDLOCK_NUM_ACCESS_FS] = {};11151116···11581157 mnt_dir.mnt = new_dir->mnt;11591158 mnt_dir.dentry = new_dir->mnt->mnt_root;1160115911601160+ /*11611161+ * old_dentry may be the root of the common mount point and11621162+ * !IS_ROOT(old_dentry) at the same time (e.g. with open_tree() and11631163+ * OPEN_TREE_CLONE). We do not need to call dget(old_parent) because11641164+ * we keep a reference to old_dentry.11651165+ */11661166+ old_parent = (old_dentry == mnt_dir.dentry) ? old_dentry :11671167+ old_dentry->d_parent;11681168+11611169 /* new_dir->dentry is equal to new_dentry->d_parent */11621162- allow_parent1 = collect_domain_accesses(dom, mnt_dir.dentry,11631163- old_dentry->d_parent,11701170+ allow_parent1 = collect_domain_accesses(dom, mnt_dir.dentry, old_parent,11641171 &layer_masks_parent1);11651172 allow_parent2 = collect_domain_accesses(11661173 dom, mnt_dir.dentry, new_dir->dentry, &layer_masks_parent2);
+5-4
sound/core/init.c
···537537 synchronize_irq(card->sync_irq);538538539539 snd_info_card_disconnect(card);540540+#ifdef CONFIG_SND_DEBUG541541+ debugfs_remove(card->debugfs_root);542542+ card->debugfs_root = NULL;543543+#endif544544+540545 if (card->registered) {541546 device_del(&card->card_dev);542547 card->registered = false;···591586 dev_warn(card->dev, "unable to free card info\n");592587 /* Not fatal error */593588 }594594-#ifdef CONFIG_SND_DEBUG595595- debugfs_remove(card->debugfs_root);596596- card->debugfs_root = NULL;597597-#endif598589 if (card->release_completion)599590 complete(card->release_completion);600591 if (!card->managed)
···685685 */686686int snd_ump_switch_protocol(struct snd_ump_endpoint *ump, unsigned int protocol)687687{688688+ unsigned int type;689689+688690 protocol &= ump->info.protocol_caps;689691 if (protocol == ump->info.protocol)692692+ return 0;693693+694694+ type = protocol & SNDRV_UMP_EP_INFO_PROTO_MIDI_MASK;695695+ if (type != SNDRV_UMP_EP_INFO_PROTO_MIDI1 &&696696+ type != SNDRV_UMP_EP_INFO_PROTO_MIDI2)690697 return 0;691698692699 ump->info.protocol = protocol;···966959 UMP_STREAM_MSG_STATUS_STREAM_CFG);967960 if (err < 0)968961 ump_dbg(ump, "Unable to get UMP EP stream config\n");962962+963963+ /* If no protocol is set by some reason, assume the valid one */964964+ if (!(ump->info.protocol & SNDRV_UMP_EP_INFO_PROTO_MIDI_MASK)) {965965+ if (ump->info.protocol_caps & SNDRV_UMP_EP_INFO_PROTO_MIDI2)966966+ ump->info.protocol |= SNDRV_UMP_EP_INFO_PROTO_MIDI2;967967+ else if (ump->info.protocol_caps & SNDRV_UMP_EP_INFO_PROTO_MIDI1)968968+ ump->info.protocol |= SNDRV_UMP_EP_INFO_PROTO_MIDI1;969969+ }969970970971 /* Query and create blocks from Function Blocks */971972 for (blk = 0; blk < ump->info.num_blocks; blk++) {
···668668 return SND_INTEL_DSP_DRIVER_LEGACY;669669 }670670671671- dev_info(&pci->dev, "DSP detected with PCI class/subclass/prog-if info 0x%06x\n", pci->class);671671+ dev_dbg(&pci->dev, "DSP detected with PCI class/subclass/prog-if info 0x%06x\n", pci->class);672672673673 /* find the configuration for the specific device */674674 cfg = snd_intel_dsp_find_config(pci, config_table, ARRAY_SIZE(config_table));···678678 if (cfg->flags & FLAG_SOF) {679679 if (cfg->flags & FLAG_SOF_ONLY_IF_SOUNDWIRE &&680680 snd_intel_dsp_check_soundwire(pci) > 0) {681681- dev_info(&pci->dev, "SoundWire enabled on CannonLake+ platform, using SOF driver\n");681681+ dev_info_once(&pci->dev, "SoundWire enabled on CannonLake+ platform, using SOF driver\n");682682 return SND_INTEL_DSP_DRIVER_SOF;683683 }684684 if (cfg->flags & FLAG_SOF_ONLY_IF_DMIC &&685685 snd_intel_dsp_check_dmic(pci)) {686686- dev_info(&pci->dev, "Digital mics found on Skylake+ platform, using SOF driver\n");686686+ dev_info_once(&pci->dev, "Digital mics found on Skylake+ platform, using SOF driver\n");687687 return SND_INTEL_DSP_DRIVER_SOF;688688 }689689 if (!(cfg->flags & FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE))···694694 if (cfg->flags & FLAG_SST) {695695 if (cfg->flags & FLAG_SST_ONLY_IF_DMIC) {696696 if (snd_intel_dsp_check_dmic(pci)) {697697- dev_info(&pci->dev, "Digital mics found on Skylake+ platform, using SST driver\n");697697+ dev_info_once(&pci->dev, "Digital mics found on Skylake+ platform, using SST driver\n");698698 return SND_INTEL_DSP_DRIVER_SST;699699 }700700 } else {
···652652653653config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH654654 tristate "SoundWire generic machine driver"655655- depends on I2C && ACPI655655+ depends on I2C && SPI_MASTER && ACPI656656 depends on MFD_INTEL_LPSS || COMPILE_TEST657657 depends on SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES || COMPILE_TEST658658 depends on SOUNDWIRE
+2-2
sound/soc/sof/amd/acp-common.c
···258258};259259EXPORT_SYMBOL_NS(sof_acp_common_ops, SND_SOC_SOF_AMD_COMMON);260260261261+MODULE_LICENSE("Dual BSD/GPL");262262+MODULE_DESCRIPTION("ACP SOF COMMON Driver");261263MODULE_IMPORT_NS(SND_SOC_SOF_AMD_COMMON);262264MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA);263265MODULE_IMPORT_NS(SOUNDWIRE_AMD_INIT);264264-MODULE_DESCRIPTION("ACP SOF COMMON Driver");265265-MODULE_LICENSE("Dual BSD/GPL");
+1-1
sound/soc/sof/amd/acp.c
···801801}802802EXPORT_SYMBOL_NS(amd_sof_acp_remove, SND_SOC_SOF_AMD_COMMON);803803804804+MODULE_LICENSE("Dual BSD/GPL");804805MODULE_DESCRIPTION("AMD ACP sof driver");805806MODULE_IMPORT_NS(SOUNDWIRE_AMD_INIT);806807MODULE_IMPORT_NS(SND_AMD_SOUNDWIRE_ACPI);807807-MODULE_LICENSE("Dual BSD/GPL");
-4
sound/soc/sof/amd/acp63.c
···140140141141 return 0;142142}143143-144144-MODULE_IMPORT_NS(SND_SOC_SOF_AMD_COMMON);145145-MODULE_DESCRIPTION("ACP63 SOF Driver");146146-MODULE_LICENSE("Dual BSD/GPL");
+1
sound/soc/sof/amd/pci-acp63.c
···109109module_pci_driver(snd_sof_pci_amd_acp63_driver);110110111111MODULE_LICENSE("Dual BSD/GPL");112112+MODULE_DESCRIPTION("ACP63 SOF Driver");112113MODULE_IMPORT_NS(SND_SOC_SOF_AMD_COMMON);113114MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
+1
sound/soc/sof/amd/pci-rmb.c
···9999module_pci_driver(snd_sof_pci_amd_rmb_driver);100100101101MODULE_LICENSE("Dual BSD/GPL");102102+MODULE_DESCRIPTION("REMBRANDT SOF Driver");102103MODULE_IMPORT_NS(SND_SOC_SOF_AMD_COMMON);103104MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
+1
sound/soc/sof/amd/pci-rn.c
···103103module_pci_driver(snd_sof_pci_amd_rn_driver);104104105105MODULE_LICENSE("Dual BSD/GPL");106106+MODULE_DESCRIPTION("RENOIR SOF Driver");106107MODULE_IMPORT_NS(SND_SOC_SOF_AMD_COMMON);107108MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
+1
sound/soc/sof/amd/pci-vangogh.c
···101101module_pci_driver(snd_sof_pci_amd_vgh_driver);102102103103MODULE_LICENSE("Dual BSD/GPL");104104+MODULE_DESCRIPTION("VANGOGH SOF Driver");104105MODULE_IMPORT_NS(SND_SOC_SOF_AMD_COMMON);105106MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
-4
sound/soc/sof/amd/rembrandt.c
···140140141141 return 0;142142}143143-144144-MODULE_IMPORT_NS(SND_SOC_SOF_AMD_COMMON);145145-MODULE_DESCRIPTION("REMBRANDT SOF Driver");146146-MODULE_LICENSE("Dual BSD/GPL");
-4
sound/soc/sof/amd/renoir.c
···115115116116 return 0;117117}118118-119119-MODULE_IMPORT_NS(SND_SOC_SOF_AMD_COMMON);120120-MODULE_DESCRIPTION("RENOIR SOF Driver");121121-MODULE_LICENSE("Dual BSD/GPL");
-4
sound/soc/sof/amd/vangogh.c
···161161162162 return 0;163163}164164-165165-MODULE_IMPORT_NS(SND_SOC_SOF_AMD_COMMON);166166-MODULE_DESCRIPTION("VANGOGH SOF Driver");167167-MODULE_LICENSE("Dual BSD/GPL");
+1-1
sound/soc/sof/core.c
···769769EXPORT_SYMBOL(sof_machine_unregister);770770771771MODULE_AUTHOR("Liam Girdwood");772772-MODULE_DESCRIPTION("Sound Open Firmware (SOF) Core");773772MODULE_LICENSE("Dual BSD/GPL");773773+MODULE_DESCRIPTION("Sound Open Firmware (SOF) Core");774774MODULE_ALIAS("platform:sof-audio");775775MODULE_IMPORT_NS(SND_SOC_SOF_CLIENT);
+1
sound/soc/sof/imx/imx-common.c
···7575EXPORT_SYMBOL(imx8_dump);76767777MODULE_LICENSE("Dual BSD/GPL");7878+MODULE_DESCRIPTION("SOF helpers for IMX platforms");
+2-1
sound/soc/sof/imx/imx8.c
···667667};668668module_platform_driver(snd_sof_of_imx8_driver);669669670670-MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA);671670MODULE_LICENSE("Dual BSD/GPL");671671+MODULE_DESCRIPTION("SOF support for IMX8 platforms");672672+MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA);
+2-1
sound/soc/sof/imx/imx8m.c
···514514};515515module_platform_driver(snd_sof_of_imx8m_driver);516516517517-MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA);518517MODULE_LICENSE("Dual BSD/GPL");518518+MODULE_DESCRIPTION("SOF support for IMX8M platforms");519519+MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA);
+2-1
sound/soc/sof/imx/imx8ulp.c
···516516};517517module_platform_driver(snd_sof_of_imx8ulp_driver);518518519519-MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA);520519MODULE_LICENSE("Dual BSD/GPL");520520+MODULE_DESCRIPTION("SOF support for IMX8ULP platforms");521521+MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA);
+1
sound/soc/sof/intel/atom.c
···418418EXPORT_SYMBOL_NS(atom_set_mach_params, SND_SOC_SOF_INTEL_ATOM_HIFI_EP);419419420420MODULE_LICENSE("Dual BSD/GPL");421421+MODULE_DESCRIPTION("SOF support for Atom platforms");
+1
sound/soc/sof/intel/bdw.c
···694694module_platform_driver(snd_sof_acpi_intel_bdw_driver);695695696696MODULE_LICENSE("Dual BSD/GPL");697697+MODULE_DESCRIPTION("SOF support for Broadwell platforms");697698MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HIFI_EP_IPC);698699MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA);699700MODULE_IMPORT_NS(SND_SOC_SOF_ACPI_DEV);
+1
sound/soc/sof/intel/byt.c
···475475module_platform_driver(snd_sof_acpi_intel_byt_driver);476476477477MODULE_LICENSE("Dual BSD/GPL");478478+MODULE_DESCRIPTION("SOF support for Baytrail/Cherrytrail");478479MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HIFI_EP_IPC);479480MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA);480481MODULE_IMPORT_NS(SND_SOC_SOF_ACPI_DEV);
+1
sound/soc/sof/intel/hda-codec.c
···457457#endif458458459459MODULE_LICENSE("Dual BSD/GPL");460460+MODULE_DESCRIPTION("SOF support for HDaudio codecs");
+1
sound/soc/sof/intel/hda-ctrl.c
···328328}329329330330MODULE_LICENSE("Dual BSD/GPL");331331+MODULE_DESCRIPTION("SOF helpers for HDaudio platforms");331332MODULE_IMPORT_NS(SND_SOC_SOF_HDA_MLINK);332333MODULE_IMPORT_NS(SND_SOC_SOF_HDA_AUDIO_CODEC);333334MODULE_IMPORT_NS(SND_SOC_SOF_HDA_AUDIO_CODEC_I915);
+1
sound/soc/sof/intel/hda-mlink.c
···972972#endif973973974974MODULE_LICENSE("Dual BSD/GPL");975975+MODULE_DESCRIPTION("SOF support for HDaudio multi-link");
+1
sound/soc/sof/intel/hda.c
···15221522}1523152315241524MODULE_LICENSE("Dual BSD/GPL");15251525+MODULE_DESCRIPTION("SOF support for HDaudio platforms");15251526MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);15261527MODULE_IMPORT_NS(SND_SOC_SOF_HDA_AUDIO_CODEC);15271528MODULE_IMPORT_NS(SND_SOC_SOF_HDA_AUDIO_CODEC_I915);
+1
sound/soc/sof/intel/pci-apl.c
···105105module_pci_driver(snd_sof_pci_intel_apl_driver);106106107107MODULE_LICENSE("Dual BSD/GPL");108108+MODULE_DESCRIPTION("SOF support for ApolloLake platforms");108109MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_GENERIC);109110MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);110111MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
+1
sound/soc/sof/intel/pci-cnl.c
···143143module_pci_driver(snd_sof_pci_intel_cnl_driver);144144145145MODULE_LICENSE("Dual BSD/GPL");146146+MODULE_DESCRIPTION("SOF support for CannonLake platforms");146147MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_GENERIC);147148MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);148149MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
+1
sound/soc/sof/intel/pci-icl.c
···108108module_pci_driver(snd_sof_pci_intel_icl_driver);109109110110MODULE_LICENSE("Dual BSD/GPL");111111+MODULE_DESCRIPTION("SOF support for IceLake platforms");111112MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_GENERIC);112113MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);113114MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_CNL);
+1
sound/soc/sof/intel/pci-lnl.c
···7070module_pci_driver(snd_sof_pci_intel_lnl_driver);71717272MODULE_LICENSE("Dual BSD/GPL");7373+MODULE_DESCRIPTION("SOF support for LunarLake platforms");7374MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_GENERIC);7475MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);7576MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_MTL);
+1
sound/soc/sof/intel/pci-mtl.c
···133133module_pci_driver(snd_sof_pci_intel_mtl_driver);134134135135MODULE_LICENSE("Dual BSD/GPL");136136+MODULE_DESCRIPTION("SOF support for MeteorLake platforms");136137MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_GENERIC);137138MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);138139MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
+1
sound/soc/sof/intel/pci-skl.c
···8989module_pci_driver(snd_sof_pci_intel_skl_driver);90909191MODULE_LICENSE("Dual BSD/GPL");9292+MODULE_DESCRIPTION("SOF support for SkyLake platforms");9293MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_GENERIC);9394MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);9495MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
+1
sound/soc/sof/intel/pci-tgl.c
···317317module_pci_driver(snd_sof_pci_intel_tgl_driver);318318319319MODULE_LICENSE("Dual BSD/GPL");320320+MODULE_DESCRIPTION("SOF support for TigerLake platforms");320321MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_GENERIC);321322MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);322323MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_CNL);
+1
sound/soc/sof/intel/pci-tng.c
···244244module_pci_driver(snd_sof_pci_intel_tng_driver);245245246246MODULE_LICENSE("Dual BSD/GPL");247247+MODULE_DESCRIPTION("SOF support for Tangier platforms");247248MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HIFI_EP_IPC);248249MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA);249250MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
+6-6
sound/soc/sof/ipc4-pcm.c
···650650 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);651651 struct sof_ipc4_audio_format *ipc4_fmt;652652 struct sof_ipc4_copier *ipc4_copier;653653- bool single_fmt = false;653653+ bool single_bitdepth = false;654654 u32 valid_bits = 0;655655 int dir, ret;656656···682682 return 0;683683684684 if (dir == SNDRV_PCM_STREAM_PLAYBACK) {685685- if (sof_ipc4_copier_is_single_format(sdev,685685+ if (sof_ipc4_copier_is_single_bitdepth(sdev,686686 available_fmt->output_pin_fmts,687687 available_fmt->num_output_formats)) {688688 ipc4_fmt = &available_fmt->output_pin_fmts->audio_fmt;689689- single_fmt = true;689689+ single_bitdepth = true;690690 }691691 } else {692692- if (sof_ipc4_copier_is_single_format(sdev,692692+ if (sof_ipc4_copier_is_single_bitdepth(sdev,693693 available_fmt->input_pin_fmts,694694 available_fmt->num_input_formats)) {695695 ipc4_fmt = &available_fmt->input_pin_fmts->audio_fmt;696696- single_fmt = true;696696+ single_bitdepth = true;697697 }698698 }699699 }···703703 if (ret)704704 return ret;705705706706- if (single_fmt) {706706+ if (single_bitdepth) {707707 snd_mask_none(fmt);708708 valid_bits = SOF_IPC4_AUDIO_FORMAT_CFG_V_BIT_DEPTH(ipc4_fmt->fmt_cfg);709709 dev_dbg(component->dev, "Set %s to %d bit format\n", dai->name, valid_bits);
+93-47
sound/soc/sof/ipc4-topology.c
···195195 for (i = 0; i < num_formats; i++) {196196 struct sof_ipc4_audio_format *fmt = &pin_fmt[i].audio_fmt;197197 dev_dbg(dev,198198- "Pin index #%d: %uHz, %ubit (ch_map %#x ch_cfg %u interleaving_style %u fmt_cfg %#x) buffer size %d\n",199199- pin_fmt[i].pin_index, fmt->sampling_frequency, fmt->bit_depth, fmt->ch_map,200200- fmt->ch_cfg, fmt->interleaving_style, fmt->fmt_cfg,198198+ "Pin index #%d: %uHz, %ubit, %luch (ch_map %#x ch_cfg %u interleaving_style %u fmt_cfg %#x) buffer size %d\n",199199+ pin_fmt[i].pin_index, fmt->sampling_frequency, fmt->bit_depth,200200+ SOF_IPC4_AUDIO_FORMAT_CFG_CHANNELS_COUNT(fmt->fmt_cfg),201201+ fmt->ch_map, fmt->ch_cfg, fmt->interleaving_style, fmt->fmt_cfg,201202 pin_fmt[i].buffer_size);202203 }203204}···218217 }219218220219 process = swidget->private;220220+221221+ /*222222+ * For process modules without base config extension, base module config223223+ * format is used for all input pins224224+ */225225+ if (process->init_config != SOF_IPC4_MODULE_INIT_CONFIG_TYPE_BASE_CFG_WITH_EXT)226226+ return &process->base_config.audio_fmt;227227+221228 base_cfg_ext = process->base_config_ext;222229223230 /*···1431142214321423static int14331424snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_sof_dai *dai,14341434- bool single_format,14251425+ bool single_bitdepth,14351426 struct snd_pcm_hw_params *params, u32 dai_index,14361427 u32 linktype, u8 dir, u32 **dst, u32 *len)14371428{···14541445 * Look for 32-bit blob first instead of 16-bit if copier14551446 * supports multiple formats14561447 */14571457- if (bit_depth == 16 && !single_format) {14481448+ if (bit_depth == 16 && !single_bitdepth) {14581449 dev_dbg(sdev->dev, "Looking for 32-bit blob first for DMIC\n");14591450 format_change = true;14601451 bit_depth = 32;···15021493 bit_depth = params_width(params);15031494 format_change = false;15041495 get_new_blob = true;15051505- } else if (linktype == SOF_DAI_INTEL_DMIC && !single_format) {14961496+ } else if (linktype == SOF_DAI_INTEL_DMIC && !single_bitdepth) {15061497 /*15071498 * The requested 32-bit blob (no format change for the15081499 * blob request) was not found in NHLT table, try to···15581549#else15591550static int15601551snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_sof_dai *dai,15611561- bool single_format,15521552+ bool single_bitdepth,15621553 struct snd_pcm_hw_params *params, u32 dai_index,15631554 u32 linktype, u8 dir, u32 **dst, u32 *len)15641555{···15661557}15671558#endif1568155915691569-bool sof_ipc4_copier_is_single_format(struct snd_sof_dev *sdev,15701570- struct sof_ipc4_pin_format *pin_fmts,15711571- u32 pin_fmts_size)15601560+bool sof_ipc4_copier_is_single_bitdepth(struct snd_sof_dev *sdev,15611561+ struct sof_ipc4_pin_format *pin_fmts,15621562+ u32 pin_fmts_size)15721563{15731564 struct sof_ipc4_audio_format *fmt;15741565 u32 valid_bits;···15921583}1593158415941585static int15861586+sof_ipc4_adjust_params_to_dai_format(struct snd_sof_dev *sdev,15871587+ struct snd_pcm_hw_params *params,15881588+ struct sof_ipc4_pin_format *pin_fmts,15891589+ u32 pin_fmts_size)15901590+{15911591+ u32 params_mask = BIT(SNDRV_PCM_HW_PARAM_RATE) |15921592+ BIT(SNDRV_PCM_HW_PARAM_CHANNELS) |15931593+ BIT(SNDRV_PCM_HW_PARAM_FORMAT);15941594+ struct sof_ipc4_audio_format *fmt;15951595+ u32 rate, channels, valid_bits;15961596+ int i;15971597+15981598+ fmt = &pin_fmts[0].audio_fmt;15991599+ rate = fmt->sampling_frequency;16001600+ channels = SOF_IPC4_AUDIO_FORMAT_CFG_CHANNELS_COUNT(fmt->fmt_cfg);16011601+ valid_bits = SOF_IPC4_AUDIO_FORMAT_CFG_V_BIT_DEPTH(fmt->fmt_cfg);16021602+16031603+ /* check if parameters in topology defined formats are the same */16041604+ for (i = 1; i < pin_fmts_size; i++) {16051605+ u32 val;16061606+16071607+ fmt = &pin_fmts[i].audio_fmt;16081608+16091609+ if (params_mask & BIT(SNDRV_PCM_HW_PARAM_RATE)) {16101610+ val = fmt->sampling_frequency;16111611+ if (val != rate)16121612+ params_mask &= ~BIT(SNDRV_PCM_HW_PARAM_RATE);16131613+ }16141614+ if (params_mask & BIT(SNDRV_PCM_HW_PARAM_CHANNELS)) {16151615+ val = SOF_IPC4_AUDIO_FORMAT_CFG_CHANNELS_COUNT(fmt->fmt_cfg);16161616+ if (val != channels)16171617+ params_mask &= ~BIT(SNDRV_PCM_HW_PARAM_CHANNELS);16181618+ }16191619+ if (params_mask & BIT(SNDRV_PCM_HW_PARAM_FORMAT)) {16201620+ val = SOF_IPC4_AUDIO_FORMAT_CFG_V_BIT_DEPTH(fmt->fmt_cfg);16211621+ if (val != valid_bits)16221622+ params_mask &= ~BIT(SNDRV_PCM_HW_PARAM_FORMAT);16231623+ }16241624+ }16251625+16261626+ if (params_mask)16271627+ return sof_ipc4_update_hw_params(sdev, params,16281628+ &pin_fmts[0].audio_fmt,16291629+ params_mask);16301630+16311631+ return 0;16321632+}16331633+16341634+static int15951635sof_ipc4_prepare_dai_copier(struct snd_sof_dev *sdev, struct snd_sof_dai *dai,15961636 struct snd_pcm_hw_params *params, int dir)15971637{15981638 struct sof_ipc4_available_audio_format *available_fmt;15991639 struct snd_pcm_hw_params dai_params = *params;16001640 struct sof_ipc4_copier_data *copier_data;16411641+ struct sof_ipc4_pin_format *pin_fmts;16011642 struct sof_ipc4_copier *ipc4_copier;16021602- bool single_format;16431643+ bool single_bitdepth;16441644+ u32 num_pin_fmts;16031645 int ret;1604164616051647 ipc4_copier = dai->private;···16581598 available_fmt = &ipc4_copier->available_fmt;1659159916601600 /*16611661- * If the copier on the DAI side supports only single bit depth then16621662- * this depth (format) should be used to look for the NHLT blob (if16631663- * needed) and in case of capture this should be used for the input16641664- * format lookup16011601+ * Fixup the params based on the format parameters of the DAI. If any16021602+ * of the RATE, CHANNELS, bit depth is static among the formats then16031603+ * narrow the params to only allow that specific parameter value.16651604 */16661605 if (dir == SNDRV_PCM_STREAM_PLAYBACK) {16671667- single_format = sof_ipc4_copier_is_single_format(sdev,16681668- available_fmt->output_pin_fmts,16691669- available_fmt->num_output_formats);16701670-16711671- /* Update the dai_params with the only supported format */16721672- if (single_format) {16731673- ret = sof_ipc4_update_hw_params(sdev, &dai_params,16741674- &available_fmt->output_pin_fmts[0].audio_fmt,16751675- BIT(SNDRV_PCM_HW_PARAM_FORMAT));16761676- if (ret)16771677- return ret;16781678- }16061606+ pin_fmts = available_fmt->output_pin_fmts;16071607+ num_pin_fmts = available_fmt->num_output_formats;16791608 } else {16801680- single_format = sof_ipc4_copier_is_single_format(sdev,16811681- available_fmt->input_pin_fmts,16821682- available_fmt->num_input_formats);16831683-16841684- /* Update the dai_params with the only supported format */16851685- if (single_format) {16861686- ret = sof_ipc4_update_hw_params(sdev, &dai_params,16871687- &available_fmt->input_pin_fmts[0].audio_fmt,16881688- BIT(SNDRV_PCM_HW_PARAM_FORMAT));16891689- if (ret)16901690- return ret;16911691- }16091609+ pin_fmts = available_fmt->input_pin_fmts;16101610+ num_pin_fmts = available_fmt->num_input_formats;16921611 }1693161216941694- ret = snd_sof_get_nhlt_endpoint_data(sdev, dai, single_format,16131613+ ret = sof_ipc4_adjust_params_to_dai_format(sdev, &dai_params, pin_fmts,16141614+ num_pin_fmts);16151615+ if (ret)16161616+ return ret;16171617+16181618+ single_bitdepth = sof_ipc4_copier_is_single_bitdepth(sdev, pin_fmts,16191619+ num_pin_fmts);16201620+ ret = snd_sof_get_nhlt_endpoint_data(sdev, dai, single_bitdepth,16951621 &dai_params,16961622 ipc4_copier->dai_index,16971623 ipc4_copier->dai_type, dir,···17121666 u32 out_ref_rate, out_ref_channels;17131667 u32 deep_buffer_dma_ms = 0;17141668 int output_fmt_index;17151715- bool single_output_format;16691669+ bool single_output_bitdepth;17161670 int i;1717167117181672 dev_dbg(sdev->dev, "copier %s, type %d", swidget->widget->name, swidget->id);···18491803 return ret;1850180418511805 /* set the reference params for output format selection */18521852- single_output_format = sof_ipc4_copier_is_single_format(sdev,18531853- available_fmt->output_pin_fmts,18541854- available_fmt->num_output_formats);18061806+ single_output_bitdepth = sof_ipc4_copier_is_single_bitdepth(sdev,18071807+ available_fmt->output_pin_fmts,18081808+ available_fmt->num_output_formats);18551809 switch (swidget->id) {18561810 case snd_soc_dapm_aif_in:18571811 case snd_soc_dapm_dai_out:···18631817 out_ref_rate = in_fmt->sampling_frequency;18641818 out_ref_channels = SOF_IPC4_AUDIO_FORMAT_CFG_CHANNELS_COUNT(in_fmt->fmt_cfg);1865181918661866- if (!single_output_format)18201820+ if (!single_output_bitdepth)18671821 out_ref_valid_bits =18681822 SOF_IPC4_AUDIO_FORMAT_CFG_V_BIT_DEPTH(in_fmt->fmt_cfg);18691823 break;···18721826 case snd_soc_dapm_dai_in:18731827 out_ref_rate = params_rate(fe_params);18741828 out_ref_channels = params_channels(fe_params);18751875- if (!single_output_format) {18291829+ if (!single_output_bitdepth) {18761830 out_ref_valid_bits = sof_ipc4_get_valid_bits(sdev, fe_params);18771831 if (out_ref_valid_bits < 0)18781832 return out_ref_valid_bits;···18901844 * if the output format is the same across all available output formats, choose18911845 * that as the reference.18921846 */18931893- if (single_output_format) {18471847+ if (single_output_bitdepth) {18941848 struct sof_ipc4_audio_format *out_fmt;1895184918961850 out_fmt = &available_fmt->output_pin_fmts[0].audio_fmt;
···666666};667667module_platform_driver(snd_sof_of_mt8186_driver);668668669669+MODULE_LICENSE("Dual BSD/GPL");670670+MODULE_DESCRIPTION("SOF support for MT8186/MT8188 platforms");669671MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA);670672MODULE_IMPORT_NS(SND_SOC_SOF_MTK_COMMON);671671-MODULE_LICENSE("Dual BSD/GPL");
+2-1
sound/soc/sof/mediatek/mt8195/mt8195.c
···619619};620620module_platform_driver(snd_sof_of_mt8195_driver);621621622622+MODULE_LICENSE("Dual BSD/GPL");623623+MODULE_DESCRIPTION("SOF support for MTL 8195 platforms");622624MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA);623625MODULE_IMPORT_NS(SND_SOC_SOF_MTK_COMMON);624624-MODULE_LICENSE("Dual BSD/GPL");
+1
sound/soc/sof/mediatek/mtk-adsp-common.c
···8282EXPORT_SYMBOL(mtk_adsp_dump);83838484MODULE_LICENSE("Dual BSD/GPL");8585+MODULE_DESCRIPTION("SOF helpers for MTK ADSP platforms");
+1-1
sound/soc/sof/nocodec.c
···110110};111111module_platform_driver(sof_nocodec_audio)112112113113+MODULE_LICENSE("Dual BSD/GPL");113114MODULE_DESCRIPTION("ASoC sof nocodec");114115MODULE_AUTHOR("Liam Girdwood");115115-MODULE_LICENSE("Dual BSD/GPL");116116MODULE_ALIAS("platform:sof-nocodec");
+1
sound/soc/sof/sof-acpi-dev.c
···100100EXPORT_SYMBOL_NS(sof_acpi_remove, SND_SOC_SOF_ACPI_DEV);101101102102MODULE_LICENSE("Dual BSD/GPL");103103+MODULE_DESCRIPTION("SOF support for ACPI platforms");
+1-1
sound/soc/sof/sof-client-ipc-flood-test.c
···394394395395module_auxiliary_driver(sof_ipc_flood_client_drv);396396397397-MODULE_DESCRIPTION("SOF IPC Flood Test Client Driver");398397MODULE_LICENSE("GPL");398398+MODULE_DESCRIPTION("SOF IPC Flood Test Client Driver");399399MODULE_IMPORT_NS(SND_SOC_SOF_CLIENT);
···9393EXPORT_SYMBOL(sof_of_shutdown);94949595MODULE_LICENSE("Dual BSD/GPL");9696+MODULE_DESCRIPTION("SOF support for OF/DT platforms");
+1
sound/soc/sof/sof-pci-dev.c
···304304EXPORT_SYMBOL_NS(sof_pci_shutdown, SND_SOC_SOF_PCI_DEV);305305306306MODULE_LICENSE("Dual BSD/GPL");307307+MODULE_DESCRIPTION("SOF support for PCI platforms");
···392392 link_fd = bpf_link_create(prog_fd, -1, BPF_TRACE_UPROBE_MULTI, &link_opts);393393 err = -errno; /* close() can clobber errno */394394395395+ if (link_fd >= 0 || err != -EBADF) {396396+ close(link_fd);397397+ close(prog_fd);398398+ return 0;399399+ }400400+401401+ /* Initial multi-uprobe support in kernel didn't handle PID filtering402402+ * correctly (it was doing thread filtering, not process filtering).403403+ * So now we'll detect if PID filtering logic was fixed, and, if not,404404+ * we'll pretend multi-uprobes are not supported, if not.405405+ * Multi-uprobes are used in USDT attachment logic, and we need to be406406+ * conservative here, because multi-uprobe selection happens early at407407+ * load time, while the use of PID filtering is known late at408408+ * attachment time, at which point it's too late to undo multi-uprobe409409+ * selection.410410+ *411411+ * Creating uprobe with pid == -1 for (invalid) '/' binary will fail412412+ * early with -EINVAL on kernels with fixed PID filtering logic;413413+ * otherwise -ESRCH would be returned if passed correct binary path414414+ * (but we'll just get -BADF, of course).415415+ */416416+ link_opts.uprobe_multi.pid = -1; /* invalid PID */417417+ link_opts.uprobe_multi.path = "/"; /* invalid path */418418+ link_opts.uprobe_multi.offsets = &offset;419419+ link_opts.uprobe_multi.cnt = 1;420420+421421+ link_fd = bpf_link_create(prog_fd, -1, BPF_TRACE_UPROBE_MULTI, &link_opts);422422+ err = -errno; /* close() can clobber errno */423423+395424 if (link_fd >= 0)396425 close(link_fd);397426 close(prog_fd);398427399399- return link_fd < 0 && err == -EBADF;428428+ return link_fd < 0 && err == -EINVAL;400429}401430402431static int probe_kern_bpf_cookie(int token_fd)
···21212222MPTCP_LIB_SUBTESTS=()2323MPTCP_LIB_SUBTESTS_DUPLICATED=02424+MPTCP_LIB_SUBTEST_FLAKY=02425MPTCP_LIB_TEST_COUNTER=02526MPTCP_LIB_TEST_FORMAT="%02u %-50s"2627MPTCP_LIB_IP_MPTCP=0···4140 readonly MPTCP_LIB_COLOR_BLUE=4241 readonly MPTCP_LIB_COLOR_RESET=4342fi4343+4444+# SELFTESTS_MPTCP_LIB_OVERRIDE_FLAKY env var can be set not to ignore errors4545+# from subtests marked as flaky4646+mptcp_lib_override_flaky() {4747+ [ "${SELFTESTS_MPTCP_LIB_OVERRIDE_FLAKY:-}" = 1 ]4848+}4949+5050+mptcp_lib_subtest_is_flaky() {5151+ [ "${MPTCP_LIB_SUBTEST_FLAKY}" = 1 ] && ! mptcp_lib_override_flaky5252+}44534554# $1: color, $2: text4655mptcp_lib_print_color() {···8372}84738574mptcp_lib_pr_fail() {8686- mptcp_lib_print_err "[FAIL]${1:+ ${*}}"7575+ local title cmt7676+7777+ if mptcp_lib_subtest_is_flaky; then7878+ title="IGNO"7979+ cmt=" (flaky)"8080+ else8181+ title="FAIL"8282+ fi8383+8484+ mptcp_lib_print_err "[${title}]${cmt}${1:+ ${*}}"8785}88868987mptcp_lib_pr_info() {···228208229209# $1: test name230210mptcp_lib_result_fail() {231231- __mptcp_lib_result_add "not ok" "${1}"211211+ if mptcp_lib_subtest_is_flaky; then212212+ # It might sound better to use 'not ok # TODO' or 'ok # SKIP',213213+ # but some CIs don't understand 'TODO' and treat SKIP as errors.214214+ __mptcp_lib_result_add "ok" "${1} # IGNORE Flaky"215215+ else216216+ __mptcp_lib_result_add "not ok" "${1}"217217+ fi232218}233219234220# $1: test name
+3-3
tools/testing/selftests/net/mptcp/simult_flows.sh
···244244 do_transfer $small $large $time245245 lret=$?246246 mptcp_lib_result_code "${lret}" "${msg}"247247- if [ $lret -ne 0 ]; then247247+ if [ $lret -ne 0 ] && ! mptcp_lib_subtest_is_flaky; then248248 ret=$lret249249 [ $bail -eq 0 ] || exit $ret250250 fi···254254 do_transfer $large $small $time255255 lret=$?256256 mptcp_lib_result_code "${lret}" "${msg}"257257- if [ $lret -ne 0 ]; then257257+ if [ $lret -ne 0 ] && ! mptcp_lib_subtest_is_flaky; then258258 ret=$lret259259 [ $bail -eq 0 ] || exit $ret260260 fi···290290run_test 10 10 1 25 "balanced bwidth with unbalanced delay"291291292292# we still need some additional infrastructure to pass the following test-cases293293-run_test 10 3 0 0 "unbalanced bwidth"293293+MPTCP_LIB_SUBTEST_FLAKY=1 run_test 10 3 0 0 "unbalanced bwidth"294294run_test 10 3 1 25 "unbalanced bwidth with unbalanced delay"295295run_test 10 3 25 1 "unbalanced bwidth with opposed, unbalanced delay"296296