···731731Description:732732 [RW] If the device is registered for writeback throttling, then733733 this file shows the target minimum read latency. If this latency734734- is exceeded in a given window of time (see wb_window_usec), then734734+ is exceeded in a given window of time (see curr_win_nsec), then735735 the writeback throttling will start scaling back writes. Writing736736 a value of '0' to this file disables the feature. Writing a737737 value of '-1' to this file resets the value to the default
+1-1
Documentation/admin-guide/blockdev/zoned_loop.rst
···7979 the zone size. Default: zone size.8080conv_zones Total number of conventioanl zones starting from sector 0.8181 Default: 8.8282-base_dir Path to the base directoy where to create the directory8282+base_dir Path to the base directory where to create the directory8383 containing the zone files of the device.8484 Default=/var/local/zloop.8585 The device directory containing the zone files is always
···214214Spectre_v2 X X215215Spectre_v2_user X X * (Note 1)216216SRBDS X X X X217217-SRSO X X217217+SRSO X X X X218218SSB (Note 4)219219TAA X X X X * (Note 2)220220TSA X X X X
···14201420 A negative value means the networking namespace does not own its14211421 hash buckets and shares the initial networking namespace's one.1422142214231423-udp_child_ehash_entries - INTEGER14231423+udp_child_hash_entries - INTEGER14241424 Control the number of hash buckets for UDP sockets in the child14251425 networking namespace, which must be set before clone() or unshare().14261426
+4-6
MAINTAINERS
···1143811438HUNG TASK DETECTOR1143911439M: Andrew Morton <akpm@linux-foundation.org>1144011440R: Lance Yang <lance.yang@linux.dev>1144111441+R: Masami Hiramatsu <mhiramat@kernel.org>1144111442L: linux-kernel@vger.kernel.org1144211443S: Maintained1144311444F: include/linux/hung_task.h···1258412583F: drivers/cpufreq/intel_pstate.c12585125841258612585INTEL PTP DFL ToD DRIVER1258712587-M: Tianfei Zhang <tianfei.zhang@intel.com>1258812586L: linux-fpga@vger.kernel.org1258912587L: netdev@vger.kernel.org1259012590-S: Maintained1258812588+S: Orphan1259112589F: drivers/ptp/ptp_dfl_tod.c12592125901259312591INTEL QUADRATURE ENCODER PERIPHERAL DRIVER···1272412724F: drivers/platform/x86/intel/wmi/thunderbolt.c12725127251272612726INTEL WWAN IOSM DRIVER1272712727-M: M Chetan Kumar <m.chetan.kumar@intel.com>1272812727L: netdev@vger.kernel.org1272912729-S: Maintained1272812728+S: Orphan1273012729F: drivers/net/wwan/iosm/12731127301273212731INTEL(R) FLEXIBLE RETURN AND EVENT DELIVERY···13685136861368613687KPROBES1368713688M: Naveen N Rao <naveen@kernel.org>1368813688-M: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>1368913689M: "David S. Miller" <davem@davemloft.net>1369013690M: Masami Hiramatsu <mhiramat@kernel.org>1369113691L: linux-kernel@vger.kernel.org···1567215674M: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>1567315675R: Chiranjeevi Rapolu <chiranjeevi.rapolu@linux.intel.com>1567415676R: Liu Haijun <haijun.liu@mediatek.com>1567515675-R: M Chetan Kumar <m.chetan.kumar@linux.intel.com>1567615677R: Ricardo Martinez <ricardo.martinez@linux.intel.com>1567715678L: netdev@vger.kernel.org1567815679S: Supported···1744817451NETFILTER1744917452M: Pablo Neira Ayuso <pablo@netfilter.org>1745017453M: Jozsef Kadlecsik <kadlec@netfilter.org>1745417454+M: Florian Westphal <fw@strlen.de>1745117455L: netfilter-devel@vger.kernel.org1745217456L: coreteam@netfilter.org1745317457S: Maintained
···106106 cpuid(0x80000001, &ignored, &ignored, &cpu.flags[6],107107 &cpu.flags[1]);108108 }109109+110110+ if (max_amd_level >= 0x8000001f) {111111+ u32 ebx;112112+113113+ /*114114+ * The X86_FEATURE_COHERENCY_SFW_NO feature bit is in115115+ * the virtualization flags entry (word 8) and set by116116+ * scattered.c, so the bit needs to be explicitly set.117117+ */118118+ cpuid(0x8000001f, &ignored, &ebx, &ignored, &ignored);119119+ if (ebx & BIT(31))120120+ set_bit(X86_FEATURE_COHERENCY_SFW_NO, cpu.flags);121121+ }109122 }110123}
+8
arch/x86/boot/startup/sev-shared.c
···785785 pc->entry[0].page_size = RMP_PG_SIZE_4K;786786 pc->entry[0].action = validate;787787 pc->entry[0].ignore_cf = 0;788788+ pc->entry[0].rsvd = 0;788789 pc->entry[0].pfn = paddr >> PAGE_SHIFT;789790790791 /* Protocol 0, Call ID 1 */···811810 if (ret)812811 sev_es_terminate(SEV_TERM_SET_LINUX, GHCB_TERM_PVALIDATE);813812 }813813+814814+ /*815815+ * If validating memory (making it private) and affected by the816816+ * cache-coherency vulnerability, perform the cache eviction mitigation.817817+ */818818+ if (validate && !has_cpuflag(X86_FEATURE_COHERENCY_SFW_NO))819819+ sev_evict_cache((void *)vaddr, 1);814820}815821816822/*
+23
arch/x86/coco/sev/core.c
···227227 pe->page_size = RMP_PG_SIZE_4K;228228 pe->action = action;229229 pe->ignore_cf = 0;230230+ pe->rsvd = 0;230231 pe->pfn = pfn;231232232233 pe++;···258257 pe->page_size = e->pagesize ? RMP_PG_SIZE_2M : RMP_PG_SIZE_4K;259258 pe->action = e->operation == SNP_PAGE_STATE_PRIVATE;260259 pe->ignore_cf = 0;260260+ pe->rsvd = 0;261261 pe->pfn = e->gfn;262262263263 pe++;···360358361359static void pvalidate_pages(struct snp_psc_desc *desc)362360{361361+ struct psc_entry *e;362362+ unsigned int i;363363+363364 if (snp_vmpl)364365 svsm_pval_pages(desc);365366 else366367 pval_pages(desc);368368+369369+ /*370370+ * If not affected by the cache-coherency vulnerability there is no need371371+ * to perform the cache eviction mitigation.372372+ */373373+ if (cpu_feature_enabled(X86_FEATURE_COHERENCY_SFW_NO))374374+ return;375375+376376+ for (i = 0; i <= desc->hdr.end_entry; i++) {377377+ e = &desc->entries[i];378378+379379+ /*380380+ * If validating memory (making it private) perform the cache381381+ * eviction mitigation.382382+ */383383+ if (e->operation == SNP_PAGE_STATE_PRIVATE)384384+ sev_evict_cache(pfn_to_kaddr(e->gfn), e->pagesize ? 512 : 1);385385+ }367386}368387369388static int vmgexit_psc(struct ghcb *ghcb, struct snp_psc_desc *desc)
+17-16
arch/x86/coco/sev/vc-handle.c
···371371 * executing with Secure TSC enabled, so special handling is required for372372 * accesses of MSR_IA32_TSC and MSR_AMD64_GUEST_TSC_FREQ.373373 */374374-static enum es_result __vc_handle_secure_tsc_msrs(struct pt_regs *regs, bool write)374374+static enum es_result __vc_handle_secure_tsc_msrs(struct es_em_ctxt *ctxt, bool write)375375{376376+ struct pt_regs *regs = ctxt->regs;376377 u64 tsc;377378378379 /*379379- * GUEST_TSC_FREQ should not be intercepted when Secure TSC is enabled.380380- * Terminate the SNP guest when the interception is enabled.380380+ * Writing to MSR_IA32_TSC can cause subsequent reads of the TSC to381381+ * return undefined values, and GUEST_TSC_FREQ is read-only. Generate382382+ * a #GP on all writes.383383+ */384384+ if (write) {385385+ ctxt->fi.vector = X86_TRAP_GP;386386+ ctxt->fi.error_code = 0;387387+ return ES_EXCEPTION;388388+ }389389+390390+ /*391391+ * GUEST_TSC_FREQ read should not be intercepted when Secure TSC is392392+ * enabled. Terminate the guest if a read is attempted.381393 */382394 if (regs->cx == MSR_AMD64_GUEST_TSC_FREQ)383395 return ES_VMM_ERROR;384396385385- /*386386- * Writes: Writing to MSR_IA32_TSC can cause subsequent reads of the TSC387387- * to return undefined values, so ignore all writes.388388- *389389- * Reads: Reads of MSR_IA32_TSC should return the current TSC value, use390390- * the value returned by rdtsc_ordered().391391- */392392- if (write) {393393- WARN_ONCE(1, "TSC MSR writes are verboten!\n");394394- return ES_OK;395395- }396396-397397+ /* Reads of MSR_IA32_TSC should return the current TSC value. */397398 tsc = rdtsc_ordered();398399 regs->ax = lower_32_bits(tsc);399400 regs->dx = upper_32_bits(tsc);···417416 case MSR_IA32_TSC:418417 case MSR_AMD64_GUEST_TSC_FREQ:419418 if (sev_status & MSR_AMD64_SNP_SECURE_TSC)420420- return __vc_handle_secure_tsc_msrs(regs, write);419419+ return __vc_handle_secure_tsc_msrs(ctxt, write);421420 break;422421 default:423422 break;
···619619void snp_leak_pages(u64 pfn, unsigned int npages);620620void kdump_sev_callback(void);621621void snp_fixup_e820_tables(void);622622+623623+static inline void sev_evict_cache(void *va, int npages)624624+{625625+ volatile u8 val __always_unused;626626+ u8 *bytes = va;627627+ int page_idx;628628+629629+ /*630630+ * For SEV guests, a read from the first/last cache-lines of a 4K page631631+ * using the guest key is sufficient to cause a flush of all cache-lines632632+ * associated with that 4K page without incurring all the overhead of a633633+ * full CLFLUSH sequence.634634+ */635635+ for (page_idx = 0; page_idx < npages; page_idx++) {636636+ val = bytes[page_idx * PAGE_SIZE];637637+ val = bytes[page_idx * PAGE_SIZE + PAGE_SIZE - 1];638638+ }639639+}622640#else623641static inline bool snp_probe_rmptable_info(void) { return false; }624642static inline int snp_rmptable_init(void) { return -ENOSYS; }···652634static inline void snp_leak_pages(u64 pfn, unsigned int npages) {}653635static inline void kdump_sev_callback(void) { }654636static inline void snp_fixup_e820_tables(void) {}637637+static inline void sev_evict_cache(void *va, int npages) {}655638#endif656639657640#endif
+11-2
arch/x86/kernel/cpu/bugs.c
···386386387387 case X86_BUG_SPECTRE_V2:388388 case X86_BUG_RETBLEED:389389- case X86_BUG_SRSO:390389 case X86_BUG_L1TF:391390 case X86_BUG_ITS:392391 return cpu_attack_vector_mitigated(CPU_MITIGATE_USER_KERNEL) ||···31833184 }3184318531853186 if (srso_mitigation == SRSO_MITIGATION_AUTO) {31863186- if (should_mitigate_vuln(X86_BUG_SRSO)) {31873187+ /*31883188+ * Use safe-RET if user->kernel or guest->host protection is31893189+ * required. Otherwise the 'microcode' mitigation is sufficient31903190+ * to protect the user->user and guest->guest vectors.31913191+ */31923192+ if (cpu_attack_vector_mitigated(CPU_MITIGATE_GUEST_HOST) ||31933193+ (cpu_attack_vector_mitigated(CPU_MITIGATE_USER_KERNEL) &&31943194+ !boot_cpu_has(X86_FEATURE_SRSO_USER_KERNEL_NO))) {31873195 srso_mitigation = SRSO_MITIGATION_SAFE_RET;31963196+ } else if (cpu_attack_vector_mitigated(CPU_MITIGATE_USER_USER) ||31973197+ cpu_attack_vector_mitigated(CPU_MITIGATE_GUEST_GUEST)) {31983198+ srso_mitigation = SRSO_MITIGATION_MICROCODE;31883199 } else {31893200 srso_mitigation = SRSO_MITIGATION_NONE;31903201 return;
···18811881#ifdef CONFIG_PROC_PID_ARCH_STATUS18821882/*18831883 * Report the amount of time elapsed in millisecond since last AVX51218841884- * use in the task.18841884+ * use in the task. Report -1 if no AVX-512 usage.18851885 */18861886static void avx512_status(struct seq_file *m, struct task_struct *task)18871887{18881888- unsigned long timestamp = READ_ONCE(x86_task_fpu(task)->avx512_timestamp);18891889- long delta;18881888+ unsigned long timestamp;18891889+ long delta = -1;1890189018911891- if (!timestamp) {18921892- /*18931893- * Report -1 if no AVX512 usage18941894- */18951895- delta = -1;18961896- } else {18911891+ /* AVX-512 usage is not tracked for kernel threads. Don't report anything. */18921892+ if (task->flags & (PF_KTHREAD | PF_USER_WORKER))18931893+ return;18941894+18951895+ timestamp = READ_ONCE(x86_task_fpu(task)->avx512_timestamp);18961896+18971897+ if (timestamp) {18971898 delta = (long)(jiffies - timestamp);18981899 /*18991900 * Cap to LONG_MAX if time difference > LONG_MAX
···18291829 struct hl_dmabuf_priv *hl_dmabuf = dmabuf->priv;18301830 struct hl_ctx *ctx;1831183118321832- if (!hl_dmabuf)18331833- return;18341834-18351832 ctx = hl_dmabuf->ctx;1836183318371834 if (hl_dmabuf->memhash_hnode)···18561859{18571860 DEFINE_DMA_BUF_EXPORT_INFO(exp_info);18581861 struct hl_device *hdev = ctx->hdev;18591859- int rc, fd;18621862+ CLASS(get_unused_fd, fd)(flags);18631863+18641864+ if (fd < 0) {18651865+ dev_err(hdev->dev, "failed to get a file descriptor for a dma-buf, %d\n", fd);18661866+ return fd;18671867+ }1860186818611869 exp_info.ops = &habanalabs_dmabuf_ops;18621870 exp_info.size = total_size;···18721870 if (IS_ERR(hl_dmabuf->dmabuf)) {18731871 dev_err(hdev->dev, "failed to export dma-buf\n");18741872 return PTR_ERR(hl_dmabuf->dmabuf);18751875- }18761876-18771877- fd = dma_buf_fd(hl_dmabuf->dmabuf, flags);18781878- if (fd < 0) {18791879- dev_err(hdev->dev, "failed to get a file descriptor for a dma-buf, %d\n", fd);18801880- rc = fd;18811881- goto err_dma_buf_put;18821873 }1883187418841875 hl_dmabuf->ctx = ctx;···18851890 get_file(ctx->hpriv->file_priv->filp);1886189118871892 *dmabuf_fd = fd;18931893+ fd_install(take_fd(fd), hl_dmabuf->dmabuf->file);1888189418891895 return 0;18901890-18911891-err_dma_buf_put:18921892- hl_dmabuf->dmabuf->priv = NULL;18931893- dma_buf_put(hl_dmabuf->dmabuf);18941894- return rc;18951896}1896189718971898static int validate_export_params_common(struct hl_device *hdev, u64 addr, u64 size, u64 offset)
+7-3
drivers/acpi/ec.c
···20332033 goto out;20342034 }2035203520362036- if (!strstarts(ecdt_ptr->id, "\\")) {20362036+ if (!strlen(ecdt_ptr->id)) {20372037 /*20382038 * The ECDT table on some MSI notebooks contains invalid data, together20392039 * with an empty ID string ("").···20422042 * a "fully qualified reference to the (...) embedded controller device",20432043 * so this string always has to start with a backslash.20442044 *20452045- * By verifying this we can avoid such faulty ECDT tables in a safe way.20452045+ * However some ThinkBook machines have a ECDT table with a valid EC20462046+ * description but an invalid ID string ("_SB.PC00.LPCB.EC0").20472047+ *20482048+ * Because of this we only check if the ID string is empty in order to20492049+ * avoid the obvious cases.20462050 */20472047- pr_err(FW_BUG "Ignoring ECDT due to invalid ID string \"%s\"\n", ecdt_ptr->id);20512051+ pr_err(FW_BUG "Ignoring ECDT due to empty ID string\n");20482052 goto out;20492053 }20502054
+4-1
drivers/acpi/processor_perflib.c
···180180 struct acpi_processor *pr = per_cpu(processors, cpu);181181 int ret;182182183183- if (!pr || !pr->performance)183183+ if (!pr)184184 continue;185185186186 /*···196196 if (ret < 0)197197 pr_err("Failed to add freq constraint for CPU%d (%d)\n",198198 cpu, ret);199199+200200+ if (!pr->performance)201201+ continue;199202200203 ret = acpi_processor_get_platform_limit(pr);201204 if (ret)
+7-2
drivers/ata/libata-eh.c
···20752075 * Check if a link is established. This is a relaxed version of20762076 * ata_phys_link_online() which accounts for the fact that this is potentially20772077 * called after changing the link power management policy, which may not be20782078- * reflected immediately in the SSTAUS register (e.g., we may still be seeing20782078+ * reflected immediately in the SStatus register (e.g., we may still be seeing20792079 * the PHY in partial, slumber or devsleep Partial power management state.20802080 * So check that:20812081 * - A device is still present, that is, DET is 1h (Device presence detected···20892089 u32 sstatus;20902090 u8 det, ipm;2091209120922092+ /*20932093+ * For old IDE/PATA adapters that do not have a valid scr_read method,20942094+ * or if reading the SStatus register fails, assume that the device is20952095+ * present. Device probe will determine if that is really the case.20962096+ */20922097 if (sata_scr_read(link, SCR_STATUS, &sstatus))20932093- return false;20982098+ return true;2094209920952100 det = sstatus & 0x0f;20962101 ipm = (sstatus >> 8) & 0x0f;
+3-8
drivers/ata/libata-scsi.c
···39043904 /* Check cdl_ctrl */39053905 switch (buf[0] & 0x03) {39063906 case 0:39073907- /* Disable CDL if it is enabled */39083908- if (!(dev->flags & ATA_DFLAG_CDL_ENABLED))39093909- return 0;39073907+ /* Disable CDL */39103908 ata_dev_dbg(dev, "Disabling CDL\n");39113909 cdl_action = 0;39123910 dev->flags &= ~ATA_DFLAG_CDL_ENABLED;39133911 break;39143912 case 0x02:39153913 /*39163916- * Enable CDL if not already enabled. Since this is mutually39173917- * exclusive with NCQ priority, allow this only if NCQ priority39183918- * is disabled.39143914+ * Enable CDL. Since CDL is mutually exclusive with NCQ39153915+ * priority, allow this only if NCQ priority is disabled.39193916 */39203920- if (dev->flags & ATA_DFLAG_CDL_ENABLED)39213921- return 0;39223917 if (dev->flags & ATA_DFLAG_NCQ_PRIO_ENABLED) {39233918 ata_dev_err(dev,39243919 "NCQ priority must be disabled to enable CDL\n");
+6-33
drivers/block/drbd/drbd_int.h
···380380 /* this is/was a write request */381381 __EE_WRITE,382382383383+ /* hand back using mempool_free(e, drbd_buffer_page_pool) */384384+ __EE_RELEASE_TO_MEMPOOL,385385+383386 /* this is/was a write same request */384387 __EE_WRITE_SAME,385388···405402#define EE_IN_INTERVAL_TREE (1<<__EE_IN_INTERVAL_TREE)406403#define EE_SUBMITTED (1<<__EE_SUBMITTED)407404#define EE_WRITE (1<<__EE_WRITE)405405+#define EE_RELEASE_TO_MEMPOOL (1<<__EE_RELEASE_TO_MEMPOOL)408406#define EE_WRITE_SAME (1<<__EE_WRITE_SAME)409407#define EE_APPLICATION (1<<__EE_APPLICATION)410408#define EE_RS_THIN_REQ (1<<__EE_RS_THIN_REQ)···862858 struct list_head sync_ee; /* IO in progress (P_RS_DATA_REPLY gets written to disk) */863859 struct list_head done_ee; /* need to send P_WRITE_ACK */864860 struct list_head read_ee; /* [RS]P_DATA_REQUEST being read */865865- struct list_head net_ee; /* zero-copy network send in progress */866861867862 struct list_head resync_reads;868863 atomic_t pp_in_use; /* allocated from page pool */···13321329extern mempool_t drbd_request_mempool;13331330extern mempool_t drbd_ee_mempool;1334133113351335-/* drbd's page pool, used to buffer data received from the peer,13361336- * or data requested by the peer.13371337- *13381338- * This does not have an emergency reserve.13391339- *13401340- * When allocating from this pool, it first takes pages from the pool.13411341- * Only if the pool is depleted will try to allocate from the system.13421342- *13431343- * The assumption is that pages taken from this pool will be processed,13441344- * and given back, "quickly", and then can be recycled, so we can avoid13451345- * frequent calls to alloc_page(), and still will be able to make progress even13461346- * under memory pressure.13471347- */13481348-extern struct page *drbd_pp_pool;13491349-extern spinlock_t drbd_pp_lock;13501350-extern int drbd_pp_vacant;13511351-extern wait_queue_head_t drbd_pp_wait;13521352-13531332/* We also need a standard (emergency-reserve backed) page pool13541333 * for meta data IO (activity log, bitmap).13551334 * We can keep it global, as long as it is used as "N pages at a time".···13391354 */13401355#define DRBD_MIN_POOL_PAGES 12813411356extern mempool_t drbd_md_io_page_pool;13571357+extern mempool_t drbd_buffer_page_pool;1342135813431359/* We also need to make sure we get a bio13441360 * when we need it for housekeeping purposes */···14741488 sector_t, unsigned int,14751489 unsigned int,14761490 gfp_t) __must_hold(local);14771477-extern void __drbd_free_peer_req(struct drbd_device *, struct drbd_peer_request *,14781478- int);14791479-#define drbd_free_peer_req(m,e) __drbd_free_peer_req(m, e, 0)14801480-#define drbd_free_net_peer_req(m,e) __drbd_free_peer_req(m, e, 1)14911491+extern void drbd_free_peer_req(struct drbd_device *device, struct drbd_peer_request *req);14811492extern struct page *drbd_alloc_pages(struct drbd_peer_device *, unsigned int, bool);14821493extern void _drbd_clear_done_ee(struct drbd_device *device, struct list_head *to_be_freed);14831494extern int drbd_connected(struct drbd_peer_device *);···15921609#define page_chain_for_each_safe(page, n) \15931610 for (; page && ({ n = page_chain_next(page); 1; }); page = n)1594161115951595-15961596-static inline int drbd_peer_req_has_active_page(struct drbd_peer_request *peer_req)15971597-{15981598- struct page *page = peer_req->pages;15991599- page_chain_for_each(page) {16001600- if (page_count(page) > 1)16011601- return 1;16021602- }16031603- return 0;16041604-}1605161216061613static inline union drbd_state drbd_read_state(struct drbd_device *device)16071614{
+15-44
drivers/block/drbd/drbd_main.c
···114114mempool_t drbd_request_mempool;115115mempool_t drbd_ee_mempool;116116mempool_t drbd_md_io_page_pool;117117+mempool_t drbd_buffer_page_pool;117118struct bio_set drbd_md_io_bio_set;118119struct bio_set drbd_io_bio_set;119119-120120-/* I do not use a standard mempool, because:121121- 1) I want to hand out the pre-allocated objects first.122122- 2) I want to be able to interrupt sleeping allocation with a signal.123123- Note: This is a single linked list, the next pointer is the private124124- member of struct page.125125- */126126-struct page *drbd_pp_pool;127127-DEFINE_SPINLOCK(drbd_pp_lock);128128-int drbd_pp_vacant;129129-wait_queue_head_t drbd_pp_wait;130120131121DEFINE_RATELIMIT_STATE(drbd_ratelimit_state, 5 * HZ, 5);132122···16011611static int _drbd_send_zc_ee(struct drbd_peer_device *peer_device,16021612 struct drbd_peer_request *peer_req)16031613{16141614+ bool use_sendpage = !(peer_req->flags & EE_RELEASE_TO_MEMPOOL);16041615 struct page *page = peer_req->pages;16051616 unsigned len = peer_req->i.size;16061617 int err;···16101619 page_chain_for_each(page) {16111620 unsigned l = min_t(unsigned, len, PAGE_SIZE);1612162116131613- err = _drbd_send_page(peer_device, page, 0, l,16141614- page_chain_next(page) ? MSG_MORE : 0);16221622+ if (likely(use_sendpage))16231623+ err = _drbd_send_page(peer_device, page, 0, l,16241624+ page_chain_next(page) ? MSG_MORE : 0);16251625+ else16261626+ err = _drbd_no_send_page(peer_device, page, 0, l,16271627+ page_chain_next(page) ? MSG_MORE : 0);16281628+16151629 if (err)16161630 return err;16171631 len -= l;···19581962 INIT_LIST_HEAD(&device->sync_ee);19591963 INIT_LIST_HEAD(&device->done_ee);19601964 INIT_LIST_HEAD(&device->read_ee);19611961- INIT_LIST_HEAD(&device->net_ee);19621965 INIT_LIST_HEAD(&device->resync_reads);19631966 INIT_LIST_HEAD(&device->resync_work.list);19641967 INIT_LIST_HEAD(&device->unplug_work.list);···20382043 D_ASSERT(device, list_empty(&device->sync_ee));20392044 D_ASSERT(device, list_empty(&device->done_ee));20402045 D_ASSERT(device, list_empty(&device->read_ee));20412041- D_ASSERT(device, list_empty(&device->net_ee));20422046 D_ASSERT(device, list_empty(&device->resync_reads));20432047 D_ASSERT(device, list_empty(&first_peer_device(device)->connection->sender_work.q));20442048 D_ASSERT(device, list_empty(&device->resync_work.list));···2049205520502056static void drbd_destroy_mempools(void)20512057{20522052- struct page *page;20532053-20542054- while (drbd_pp_pool) {20552055- page = drbd_pp_pool;20562056- drbd_pp_pool = (struct page *)page_private(page);20572057- __free_page(page);20582058- drbd_pp_vacant--;20592059- }20602060-20612058 /* D_ASSERT(device, atomic_read(&drbd_pp_vacant)==0); */2062205920632060 bioset_exit(&drbd_io_bio_set);20642061 bioset_exit(&drbd_md_io_bio_set);20622062+ mempool_exit(&drbd_buffer_page_pool);20652063 mempool_exit(&drbd_md_io_page_pool);20662064 mempool_exit(&drbd_ee_mempool);20672065 mempool_exit(&drbd_request_mempool);···2072208620732087static int drbd_create_mempools(void)20742088{20752075- struct page *page;20762089 const int number = (DRBD_MAX_BIO_SIZE/PAGE_SIZE) * drbd_minor_count;20772077- int i, ret;20902090+ int ret;2078209120792092 /* caches */20802093 drbd_request_cache = kmem_cache_create(···21102125 if (ret)21112126 goto Enomem;2112212721282128+ ret = mempool_init_page_pool(&drbd_buffer_page_pool, number, 0);21292129+ if (ret)21302130+ goto Enomem;21312131+21132132 ret = mempool_init_slab_pool(&drbd_request_mempool, number,21142133 drbd_request_cache);21152134 if (ret)···21222133 ret = mempool_init_slab_pool(&drbd_ee_mempool, number, drbd_ee_cache);21232134 if (ret)21242135 goto Enomem;21252125-21262126- for (i = 0; i < number; i++) {21272127- page = alloc_page(GFP_HIGHUSER);21282128- if (!page)21292129- goto Enomem;21302130- set_page_private(page, (unsigned long)drbd_pp_pool);21312131- drbd_pp_pool = page;21322132- }21332133- drbd_pp_vacant = number;2134213621352137 return 0;21362138···21492169 rr = drbd_free_peer_reqs(device, &device->done_ee);21502170 if (rr)21512171 drbd_err(device, "%d EEs in done list found!\n", rr);21522152-21532153- rr = drbd_free_peer_reqs(device, &device->net_ee);21542154- if (rr)21552155- drbd_err(device, "%d EEs in net list found!\n", rr);21562172}2157217321582174/* caution. no locking. */···28382862 DRBD_MAJOR);28392863 return err;28402864 }28412841-28422842- /*28432843- * allocate all necessary structs28442844- */28452845- init_waitqueue_head(&drbd_pp_wait);2846286528472866 drbd_proc = NULL; /* play safe for drbd_cleanup */28482867 idr_init(&drbd_devices);
+31-231
drivers/block/drbd/drbd_receiver.c
···3333#include <linux/string.h>3434#include <linux/scatterlist.h>3535#include <linux/part_stat.h>3636+#include <linux/mempool.h>3637#include "drbd_int.h"3738#include "drbd_protocol.h"3839#include "drbd_req.h"···64636564#define GFP_TRY (__GFP_HIGHMEM | __GFP_NOWARN)66656767-/*6868- * some helper functions to deal with single linked page lists,6969- * page->private being our "next" pointer.7070- */7171-7272-/* If at least n pages are linked at head, get n pages off.7373- * Otherwise, don't modify head, and return NULL.7474- * Locking is the responsibility of the caller.7575- */7676-static struct page *page_chain_del(struct page **head, int n)7777-{7878- struct page *page;7979- struct page *tmp;8080-8181- BUG_ON(!n);8282- BUG_ON(!head);8383-8484- page = *head;8585-8686- if (!page)8787- return NULL;8888-8989- while (page) {9090- tmp = page_chain_next(page);9191- if (--n == 0)9292- break; /* found sufficient pages */9393- if (tmp == NULL)9494- /* insufficient pages, don't use any of them. */9595- return NULL;9696- page = tmp;9797- }9898-9999- /* add end of list marker for the returned list */100100- set_page_private(page, 0);101101- /* actual return value, and adjustment of head */102102- page = *head;103103- *head = tmp;104104- return page;105105-}106106-107107-/* may be used outside of locks to find the tail of a (usually short)108108- * "private" page chain, before adding it back to a global chain head109109- * with page_chain_add() under a spinlock. */110110-static struct page *page_chain_tail(struct page *page, int *len)111111-{112112- struct page *tmp;113113- int i = 1;114114- while ((tmp = page_chain_next(page))) {115115- ++i;116116- page = tmp;117117- }118118- if (len)119119- *len = i;120120- return page;121121-}122122-123123-static int page_chain_free(struct page *page)124124-{125125- struct page *tmp;126126- int i = 0;127127- page_chain_for_each_safe(page, tmp) {128128- put_page(page);129129- ++i;130130- }131131- return i;132132-}133133-134134-static void page_chain_add(struct page **head,135135- struct page *chain_first, struct page *chain_last)136136-{137137-#if 1138138- struct page *tmp;139139- tmp = page_chain_tail(chain_first, NULL);140140- BUG_ON(tmp != chain_last);141141-#endif142142-143143- /* add chain to head */144144- set_page_private(chain_last, (unsigned long)*head);145145- *head = chain_first;146146-}147147-148148-static struct page *__drbd_alloc_pages(struct drbd_device *device,149149- unsigned int number)6666+static struct page *__drbd_alloc_pages(unsigned int number)15067{15168 struct page *page = NULL;15269 struct page *tmp = NULL;15370 unsigned int i = 0;15471155155- /* Yes, testing drbd_pp_vacant outside the lock is racy.156156- * So what. It saves a spin_lock. */157157- if (drbd_pp_vacant >= number) {158158- spin_lock(&drbd_pp_lock);159159- page = page_chain_del(&drbd_pp_pool, number);160160- if (page)161161- drbd_pp_vacant -= number;162162- spin_unlock(&drbd_pp_lock);163163- if (page)164164- return page;165165- }166166-16772 /* GFP_TRY, because we must not cause arbitrary write-out: in a DRBD16873 * "criss-cross" setup, that might cause write-out on some other DRBD,16974 * which in turn might block on the other node at this very place. */17075 for (i = 0; i < number; i++) {171171- tmp = alloc_page(GFP_TRY);7676+ tmp = mempool_alloc(&drbd_buffer_page_pool, GFP_TRY);17277 if (!tmp)173173- break;7878+ goto fail;17479 set_page_private(tmp, (unsigned long)page);17580 page = tmp;17681 }177177-178178- if (i == number)179179- return page;180180-181181- /* Not enough pages immediately available this time.182182- * No need to jump around here, drbd_alloc_pages will retry this183183- * function "soon". */184184- if (page) {185185- tmp = page_chain_tail(page, NULL);186186- spin_lock(&drbd_pp_lock);187187- page_chain_add(&drbd_pp_pool, page, tmp);188188- drbd_pp_vacant += i;189189- spin_unlock(&drbd_pp_lock);8282+ return page;8383+fail:8484+ page_chain_for_each_safe(page, tmp) {8585+ set_page_private(page, 0);8686+ mempool_free(page, &drbd_buffer_page_pool);19087 }19188 return NULL;192192-}193193-194194-static void reclaim_finished_net_peer_reqs(struct drbd_device *device,195195- struct list_head *to_be_freed)196196-{197197- struct drbd_peer_request *peer_req, *tmp;198198-199199- /* The EEs are always appended to the end of the list. Since200200- they are sent in order over the wire, they have to finish201201- in order. As soon as we see the first not finished we can202202- stop to examine the list... */203203-204204- list_for_each_entry_safe(peer_req, tmp, &device->net_ee, w.list) {205205- if (drbd_peer_req_has_active_page(peer_req))206206- break;207207- list_move(&peer_req->w.list, to_be_freed);208208- }209209-}210210-211211-static void drbd_reclaim_net_peer_reqs(struct drbd_device *device)212212-{213213- LIST_HEAD(reclaimed);214214- struct drbd_peer_request *peer_req, *t;215215-216216- spin_lock_irq(&device->resource->req_lock);217217- reclaim_finished_net_peer_reqs(device, &reclaimed);218218- spin_unlock_irq(&device->resource->req_lock);219219- list_for_each_entry_safe(peer_req, t, &reclaimed, w.list)220220- drbd_free_net_peer_req(device, peer_req);221221-}222222-223223-static void conn_reclaim_net_peer_reqs(struct drbd_connection *connection)224224-{225225- struct drbd_peer_device *peer_device;226226- int vnr;227227-228228- rcu_read_lock();229229- idr_for_each_entry(&connection->peer_devices, peer_device, vnr) {230230- struct drbd_device *device = peer_device->device;231231- if (!atomic_read(&device->pp_in_use_by_net))232232- continue;233233-234234- kref_get(&device->kref);235235- rcu_read_unlock();236236- drbd_reclaim_net_peer_reqs(device);237237- kref_put(&device->kref, drbd_destroy_device);238238- rcu_read_lock();239239- }240240- rcu_read_unlock();24189}2429024391/**···113263 bool retry)114264{115265 struct drbd_device *device = peer_device->device;116116- struct page *page = NULL;266266+ struct page *page;117267 struct net_conf *nc;118118- DEFINE_WAIT(wait);119268 unsigned int mxb;120269121270 rcu_read_lock();···122273 mxb = nc ? nc->max_buffers : 1000000;123274 rcu_read_unlock();124275125125- if (atomic_read(&device->pp_in_use) < mxb)126126- page = __drbd_alloc_pages(device, number);127127-128128- /* Try to keep the fast path fast, but occasionally we need129129- * to reclaim the pages we lended to the network stack. */130130- if (page && atomic_read(&device->pp_in_use_by_net) > 512)131131- drbd_reclaim_net_peer_reqs(device);132132-133133- while (page == NULL) {134134- prepare_to_wait(&drbd_pp_wait, &wait, TASK_INTERRUPTIBLE);135135-136136- drbd_reclaim_net_peer_reqs(device);137137-138138- if (atomic_read(&device->pp_in_use) < mxb) {139139- page = __drbd_alloc_pages(device, number);140140- if (page)141141- break;142142- }143143-144144- if (!retry)145145- break;146146-147147- if (signal_pending(current)) {148148- drbd_warn(device, "drbd_alloc_pages interrupted!\n");149149- break;150150- }151151-152152- if (schedule_timeout(HZ/10) == 0)153153- mxb = UINT_MAX;154154- }155155- finish_wait(&drbd_pp_wait, &wait);276276+ if (atomic_read(&device->pp_in_use) >= mxb)277277+ schedule_timeout_interruptible(HZ / 10);278278+ page = __drbd_alloc_pages(number);156279157280 if (page)158281 atomic_add(number, &device->pp_in_use);···135314 * Is also used from inside an other spin_lock_irq(&resource->req_lock);136315 * Either links the page chain back to the global pool,137316 * or returns all pages to the system. */138138-static void drbd_free_pages(struct drbd_device *device, struct page *page, int is_net)317317+static void drbd_free_pages(struct drbd_device *device, struct page *page)139318{140140- atomic_t *a = is_net ? &device->pp_in_use_by_net : &device->pp_in_use;141141- int i;319319+ struct page *tmp;320320+ int i = 0;142321143322 if (page == NULL)144323 return;145324146146- if (drbd_pp_vacant > (DRBD_MAX_BIO_SIZE/PAGE_SIZE) * drbd_minor_count)147147- i = page_chain_free(page);148148- else {149149- struct page *tmp;150150- tmp = page_chain_tail(page, &i);151151- spin_lock(&drbd_pp_lock);152152- page_chain_add(&drbd_pp_pool, page, tmp);153153- drbd_pp_vacant += i;154154- spin_unlock(&drbd_pp_lock);325325+ page_chain_for_each_safe(page, tmp) {326326+ set_page_private(page, 0);327327+ if (page_count(page) == 1)328328+ mempool_free(page, &drbd_buffer_page_pool);329329+ else330330+ put_page(page);331331+ i++;155332 }156156- i = atomic_sub_return(i, a);333333+ i = atomic_sub_return(i, &device->pp_in_use);157334 if (i < 0)158158- drbd_warn(device, "ASSERTION FAILED: %s: %d < 0\n",159159- is_net ? "pp_in_use_by_net" : "pp_in_use", i);160160- wake_up(&drbd_pp_wait);335335+ drbd_warn(device, "ASSERTION FAILED: pp_in_use: %d < 0\n", i);161336}162337163338/*···197380 gfpflags_allow_blocking(gfp_mask));198381 if (!page)199382 goto fail;383383+ if (!mempool_is_saturated(&drbd_buffer_page_pool))384384+ peer_req->flags |= EE_RELEASE_TO_MEMPOOL;200385 }201386202387 memset(peer_req, 0, sizeof(*peer_req));···222403 return NULL;223404}224405225225-void __drbd_free_peer_req(struct drbd_device *device, struct drbd_peer_request *peer_req,226226- int is_net)406406+void drbd_free_peer_req(struct drbd_device *device, struct drbd_peer_request *peer_req)227407{228408 might_sleep();229409 if (peer_req->flags & EE_HAS_DIGEST)230410 kfree(peer_req->digest);231231- drbd_free_pages(device, peer_req->pages, is_net);411411+ drbd_free_pages(device, peer_req->pages);232412 D_ASSERT(device, atomic_read(&peer_req->pending_bios) == 0);233413 D_ASSERT(device, drbd_interval_empty(&peer_req->i));234414 if (!expect(device, !(peer_req->flags & EE_CALL_AL_COMPLETE_IO))) {···242424 LIST_HEAD(work_list);243425 struct drbd_peer_request *peer_req, *t;244426 int count = 0;245245- int is_net = list == &device->net_ee;246427247428 spin_lock_irq(&device->resource->req_lock);248429 list_splice_init(list, &work_list);249430 spin_unlock_irq(&device->resource->req_lock);250431251432 list_for_each_entry_safe(peer_req, t, &work_list, w.list) {252252- __drbd_free_peer_req(device, peer_req, is_net);433433+ drbd_free_peer_req(device, peer_req);253434 count++;254435 }255436 return count;···260443static int drbd_finish_peer_reqs(struct drbd_device *device)261444{262445 LIST_HEAD(work_list);263263- LIST_HEAD(reclaimed);264446 struct drbd_peer_request *peer_req, *t;265447 int err = 0;266448267449 spin_lock_irq(&device->resource->req_lock);268268- reclaim_finished_net_peer_reqs(device, &reclaimed);269450 list_splice_init(&device->done_ee, &work_list);270451 spin_unlock_irq(&device->resource->req_lock);271271-272272- list_for_each_entry_safe(peer_req, t, &reclaimed, w.list)273273- drbd_free_net_peer_req(device, peer_req);274452275453 /* possible callbacks here:276454 * e_end_block, and e_end_resync_block, e_send_superseded.···17871975 data_size -= len;17881976 }17891977 kunmap(page);17901790- drbd_free_pages(peer_device->device, page, 0);19781978+ drbd_free_pages(peer_device->device, page);17911979 return err;17921980}17931981···50365224 put_ldev(device);50375225 }5038522650395039- /* tcp_close and release of sendpage pages can be deferred. I don't50405040- * want to use SO_LINGER, because apparently it can be deferred for50415041- * more than 20 seconds (longest time I checked).50425042- *50435043- * Actually we don't care for exactly when the network stack does its50445044- * put_page(), but release our reference on these pages right here.50455045- */50465046- i = drbd_free_peer_reqs(device, &device->net_ee);50475047- if (i)50485048- drbd_info(device, "net_ee not empty, killed %u entries\n", i);50495227 i = atomic_read(&device->pp_in_use_by_net);50505228 if (i)50515229 drbd_info(device, "pp_in_use_by_net = %d, expected 0\n", i);···5781597957825980 while (get_t_state(thi) == RUNNING) {57835981 drbd_thread_current_set_cpu(thi);57845784-57855785- conn_reclaim_net_peer_reqs(connection);5786598257875983 if (test_and_clear_bit(SEND_PING, &connection->flags)) {57885984 if (drbd_send_ping(connection)) {
+18-38
drivers/block/drbd/drbd_worker.c
···10301030 return 1;10311031}1032103210331033-/* helper */10341034-static void move_to_net_ee_or_free(struct drbd_device *device, struct drbd_peer_request *peer_req)10351035-{10361036- if (drbd_peer_req_has_active_page(peer_req)) {10371037- /* This might happen if sendpage() has not finished */10381038- int i = PFN_UP(peer_req->i.size);10391039- atomic_add(i, &device->pp_in_use_by_net);10401040- atomic_sub(i, &device->pp_in_use);10411041- spin_lock_irq(&device->resource->req_lock);10421042- list_add_tail(&peer_req->w.list, &device->net_ee);10431043- spin_unlock_irq(&device->resource->req_lock);10441044- wake_up(&drbd_pp_wait);10451045- } else10461046- drbd_free_peer_req(device, peer_req);10471047-}10481048-10491033/**10501034 * w_e_end_data_req() - Worker callback, to send a P_DATA_REPLY packet in response to a P_DATA_REQUEST10511035 * @w: work object.···10431059 int err;1044106010451061 if (unlikely(cancel)) {10461046- drbd_free_peer_req(device, peer_req);10471047- dec_unacked(device);10481048- return 0;10621062+ err = 0;10631063+ goto out;10491064 }1050106510511066 if (likely((peer_req->flags & EE_WAS_ERROR) == 0)) {···10571074 err = drbd_send_ack(peer_device, P_NEG_DREPLY, peer_req);10581075 }1059107610601060- dec_unacked(device);10611061-10621062- move_to_net_ee_or_free(device, peer_req);10631063-10641077 if (unlikely(err))10651078 drbd_err(device, "drbd_send_block() failed\n");10791079+out:10801080+ dec_unacked(device);10811081+ drbd_free_peer_req(device, peer_req);10821082+10661083 return err;10671084}10681085···11031120 int err;1104112111051122 if (unlikely(cancel)) {11061106- drbd_free_peer_req(device, peer_req);11071107- dec_unacked(device);11081108- return 0;11231123+ err = 0;11241124+ goto out;11091125 }1110112611111127 if (get_ldev_if_state(device, D_FAILED)) {···11371155 /* update resync data with failure */11381156 drbd_rs_failed_io(peer_device, peer_req->i.sector, peer_req->i.size);11391157 }11401140-11411141- dec_unacked(device);11421142-11431143- move_to_net_ee_or_free(device, peer_req);11441144-11451158 if (unlikely(err))11461159 drbd_err(device, "drbd_send_block() failed\n");11601160+out:11611161+ dec_unacked(device);11621162+ drbd_free_peer_req(device, peer_req);11631163+11471164 return err;11481165}11491166···11571176 int err, eq = 0;1158117711591178 if (unlikely(cancel)) {11601160- drbd_free_peer_req(device, peer_req);11611161- dec_unacked(device);11621162- return 0;11791179+ err = 0;11801180+ goto out;11631181 }1164118211651183 if (get_ldev(device)) {···12001220 if (drbd_ratelimit())12011221 drbd_err(device, "Sending NegDReply. I guess it gets messy.\n");12021222 }12031203-12041204- dec_unacked(device);12051205- move_to_net_ee_or_free(device, peer_req);12061206-12071223 if (unlikely(err))12081224 drbd_err(device, "drbd_send_block/ack() failed\n");12251225+out:12261226+ dec_unacked(device);12271227+ drbd_free_peer_req(device, peer_req);12281228+12091229 return err;12101230}12111231
+12-16
drivers/block/ublk_drv.c
···235235236236 struct completion completion;237237 unsigned int nr_queues_ready;238238- unsigned int nr_privileged_daemon;238238+ bool unprivileged_daemons;239239 struct mutex cancel_mutex;240240 bool canceling;241241 pid_t ublksrv_tgid;···13891389{13901390 blk_status_t res;1391139113921392- if (unlikely(ubq->fail_io))13921392+ if (unlikely(READ_ONCE(ubq->fail_io)))13931393 return BLK_STS_TARGET;1394139413951395 /* With recovery feature enabled, force_abort is set in···14011401 * Note: force_abort is guaranteed to be seen because it is set14021402 * before request queue is unqiuesced.14031403 */14041404- if (ublk_nosrv_should_queue_io(ubq) && unlikely(ubq->force_abort))14041404+ if (ublk_nosrv_should_queue_io(ubq) &&14051405+ unlikely(READ_ONCE(ubq->force_abort)))14051406 return BLK_STS_IOERR;1406140714071408 if (check_cancel && unlikely(ubq->canceling))···15511550 /* set to NULL, otherwise new tasks cannot mmap io_cmd_buf */15521551 ub->mm = NULL;15531552 ub->nr_queues_ready = 0;15541554- ub->nr_privileged_daemon = 0;15531553+ ub->unprivileged_daemons = false;15551554 ub->ublksrv_tgid = -1;15561555}15571556···16451644 * Transition the device to the nosrv state. What exactly this16461645 * means depends on the recovery flags16471646 */16481648- blk_mq_quiesce_queue(disk->queue);16491647 if (ublk_nosrv_should_stop_dev(ub)) {16501648 /*16511649 * Allow any pending/future I/O to pass through quickly···16521652 * waits for all pending I/O to complete16531653 */16541654 for (i = 0; i < ub->dev_info.nr_hw_queues; i++)16551655- ublk_get_queue(ub, i)->force_abort = true;16561656- blk_mq_unquiesce_queue(disk->queue);16551655+ WRITE_ONCE(ublk_get_queue(ub, i)->force_abort, true);1657165616581657 ublk_stop_dev_unlocked(ub);16591658 } else {···16621663 } else {16631664 ub->dev_info.state = UBLK_S_DEV_FAIL_IO;16641665 for (i = 0; i < ub->dev_info.nr_hw_queues; i++)16651665- ublk_get_queue(ub, i)->fail_io = true;16661666+ WRITE_ONCE(ublk_get_queue(ub, i)->fail_io, true);16661667 }16671667- blk_mq_unquiesce_queue(disk->queue);16681668 }16691669unlock:16701670 mutex_unlock(&ub->mutex);···19781980 __must_hold(&ub->mutex)19791981{19801982 ubq->nr_io_ready++;19811981- if (ublk_queue_ready(ubq)) {19831983+ if (ublk_queue_ready(ubq))19821984 ub->nr_queues_ready++;19831983-19841984- if (capable(CAP_SYS_ADMIN))19851985- ub->nr_privileged_daemon++;19861986- }19851985+ if (!ub->unprivileged_daemons && !capable(CAP_SYS_ADMIN))19861986+ ub->unprivileged_daemons = true;1987198719881988 if (ub->nr_queues_ready == ub->dev_info.nr_hw_queues) {19891989 /* now we are ready for handling ublk io request */···2876288028772881 ublk_apply_params(ub);2878288228792879- /* don't probe partitions if any one ubq daemon is un-trusted */28802880- if (ub->nr_privileged_daemon != ub->nr_queues_ready)28832883+ /* don't probe partitions if any daemon task is un-trusted */28842884+ if (ub->unprivileged_daemons)28812885 set_bit(GD_SUPPRESS_PART_SCAN, &disk->state);2882288628832887 ublk_get_device(ub);
···8888 }89899090 r = amdgpu_vm_bo_map(adev, *bo_va, csa_addr, 0, size,9191- AMDGPU_PTE_READABLE | AMDGPU_PTE_WRITEABLE |9292- AMDGPU_PTE_EXECUTABLE);9191+ AMDGPU_VM_PAGE_READABLE | AMDGPU_VM_PAGE_WRITEABLE |9292+ AMDGPU_VM_PAGE_EXECUTABLE);93939494 if (r) {9595 DRM_ERROR("failed to do bo_map on static CSA, err=%d\n", r);
+16-3
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
···10391039{10401040 int ret;10411041 uint64_t reserv_addr, reserv_addr_ext;10421042- uint32_t reserv_size, reserv_size_ext;10421042+ uint32_t reserv_size, reserv_size_ext, mp0_ip_ver;10431043 struct amdgpu_device *adev = psp->adev;10441044+10451045+ mp0_ip_ver = amdgpu_ip_version(adev, MP0_HWIP, 0);1044104610451047 if (amdgpu_sriov_vf(psp->adev))10461048 return 0;1047104910481048- if ((amdgpu_ip_version(adev, MP0_HWIP, 0) != IP_VERSION(14, 0, 2)) &&10491049- (amdgpu_ip_version(adev, MP0_HWIP, 0) != IP_VERSION(14, 0, 3)))10501050+ switch (mp0_ip_ver) {10511051+ case IP_VERSION(14, 0, 2):10521052+ if (adev->psp.sos.fw_version < 0x3b0e0d)10531053+ return 0;10541054+ break;10551055+10561056+ case IP_VERSION(14, 0, 3):10571057+ if (adev->psp.sos.fw_version < 0x3a0e14)10581058+ return 0;10591059+ break;10601060+10611061+ default:10501062 return 0;10631063+ }1051106410521065 ret = psp_get_fw_reservation_info(psp, GFX_CMD_ID_FB_FW_RESERV_ADDR, &reserv_addr, &reserv_size);10531066 if (ret)
+11-4
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
···654654 * Check if all VM PDs/PTs are ready for updates655655 *656656 * Returns:657657- * True if VM is not evicting.657657+ * True if VM is not evicting and all VM entities are not stopped658658 */659659bool amdgpu_vm_ready(struct amdgpu_vm *vm)660660{661661- bool empty;662661 bool ret;663662664663 amdgpu_vm_eviction_lock(vm);···665666 amdgpu_vm_eviction_unlock(vm);666667667668 spin_lock(&vm->status_lock);668668- empty = list_empty(&vm->evicted);669669+ ret &= list_empty(&vm->evicted);669670 spin_unlock(&vm->status_lock);670671671671- return ret && empty;672672+ spin_lock(&vm->immediate.lock);673673+ ret &= !vm->immediate.stopped;674674+ spin_unlock(&vm->immediate.lock);675675+676676+ spin_lock(&vm->delayed.lock);677677+ ret &= !vm->delayed.stopped;678678+ spin_unlock(&vm->delayed.lock);679679+680680+ return ret;672681}673682674683/**
···12271227/**12281228 * drm_bridge_detect - check if anything is attached to the bridge output12291229 * @bridge: bridge control structure12301230+ * @connector: attached connector12301231 *12311232 * If the bridge supports output detection, as reported by the12321233 * DRM_BRIDGE_OP_DETECT bridge ops flag, call &drm_bridge_funcs.detect for the
···332332 int ret = 0;333333 u32 reg_val, max;334334 struct xe_reg rapl_limit;335335+ u64 max_supp_power_limit = 0;335336336337 mutex_lock(&hwmon->hwmon_lock);337338···355354 ret = -EOPNOTSUPP;356355 }357356 goto unlock;357357+ }358358+359359+ /*360360+ * If the sysfs value exceeds the maximum pcode supported power limit value, clamp it to361361+ * the supported maximum (U12.3 format).362362+ * This is to avoid truncation during reg_val calculation below and ensure the valid363363+ * power limit is sent for pcode which would clamp it to card-supported value.364364+ */365365+ max_supp_power_limit = ((PWR_LIM_VAL) >> hwmon->scl_shift_power) * SF_POWER;366366+ if (value > max_supp_power_limit) {367367+ value = max_supp_power_limit;368368+ drm_info(&hwmon->xe->drm,369369+ "Power limit clamped as selected %s exceeds channel %d limit\n",370370+ PWR_ATTR_TO_STR(attr), channel);358371 }359372360373 /* Computation in 64-bits to avoid overflow. Round to nearest. */···754739{755740 int ret;756741 u32 uval;742742+ u64 max_crit_power_curr = 0;757743758744 mutex_lock(&hwmon->hwmon_lock);759745746746+ /*747747+ * If the sysfs value exceeds the pcode mailbox cmd POWER_SETUP_SUBCOMMAND_WRITE_I1748748+ * max supported value, clamp it to the command's max (U10.6 format).749749+ * This is to avoid truncation during uval calculation below and ensure the valid power750750+ * limit is sent for pcode which would clamp it to card-supported value.751751+ */752752+ max_crit_power_curr = (POWER_SETUP_I1_DATA_MASK >> POWER_SETUP_I1_SHIFT) * scale_factor;753753+ if (value > max_crit_power_curr) {754754+ value = max_crit_power_curr;755755+ drm_info(&hwmon->xe->drm,756756+ "Power limit clamped as selected exceeds channel %d limit\n",757757+ channel);758758+ }760759 uval = DIV_ROUND_CLOSEST_ULL(value << POWER_SETUP_I1_SHIFT, scale_factor);761760 ret = xe_hwmon_pcode_write_i1(hwmon, uval);762761
+27-15
drivers/gpu/drm/xe/xe_migrate.c
···18201820 if (!IS_ALIGNED(len, XE_CACHELINE_BYTES) ||18211821 !IS_ALIGNED((unsigned long)buf + offset, XE_CACHELINE_BYTES)) {18221822 int buf_offset = 0;18231823+ void *bounce;18241824+ int err;18251825+18261826+ BUILD_BUG_ON(!is_power_of_2(XE_CACHELINE_BYTES));18271827+ bounce = kmalloc(XE_CACHELINE_BYTES, GFP_KERNEL);18281828+ if (!bounce)18291829+ return -ENOMEM;1823183018241831 /*18251832 * Less than ideal for large unaligned access but this should be18261833 * fairly rare, can fixup if this becomes common.18271834 */18281835 do {18291829- u8 bounce[XE_CACHELINE_BYTES];18301830- void *ptr = (void *)bounce;18311831- int err;18321836 int copy_bytes = min_t(int, bytes_left,18331837 XE_CACHELINE_BYTES -18341838 (offset & XE_CACHELINE_MASK));···18411837 err = xe_migrate_access_memory(m, bo,18421838 offset &18431839 ~XE_CACHELINE_MASK,18441844- (void *)ptr,18451845- sizeof(bounce), 0);18401840+ bounce,18411841+ XE_CACHELINE_BYTES, 0);18461842 if (err)18471847- return err;18431843+ break;1848184418491845 if (write) {18501850- memcpy(ptr + ptr_offset, buf + buf_offset, copy_bytes);18461846+ memcpy(bounce + ptr_offset, buf + buf_offset, copy_bytes);1851184718521848 err = xe_migrate_access_memory(m, bo,18531849 offset & ~XE_CACHELINE_MASK,18541854- (void *)ptr,18551855- sizeof(bounce), write);18501850+ bounce,18511851+ XE_CACHELINE_BYTES, write);18561852 if (err)18571857- return err;18531853+ break;18581854 } else {18591859- memcpy(buf + buf_offset, ptr + ptr_offset,18551855+ memcpy(buf + buf_offset, bounce + ptr_offset,18601856 copy_bytes);18611857 }18621858···18651861 offset += copy_bytes;18661862 } while (bytes_left);1867186318681868- return 0;18641864+ kfree(bounce);18651865+ return err;18691866 }1870186718711868 dma_addr = xe_migrate_dma_map(xe, buf, len + page_offset, write);···18871882 else18881883 current_bytes = min_t(int, bytes_left, cursor.size);1889188418901890- if (fence)18911891- dma_fence_put(fence);18851885+ if (current_bytes & ~PAGE_MASK) {18861886+ int pitch = 4;18871887+18881888+ current_bytes = min_t(int, current_bytes, S16_MAX * pitch);18891889+ }1892189018931891 __fence = xe_migrate_vram(m, current_bytes,18941892 (unsigned long)buf & ~PAGE_MASK,···19001892 XE_MIGRATE_COPY_TO_VRAM :19011893 XE_MIGRATE_COPY_TO_SRAM);19021894 if (IS_ERR(__fence)) {19031903- if (fence)18951895+ if (fence) {19041896 dma_fence_wait(fence, false);18971897+ dma_fence_put(fence);18981898+ }19051899 fence = __fence;19061900 goto out_err;19071901 }19021902+19031903+ dma_fence_put(fence);19081904 fence = __fence;1909190519101906 buf += current_bytes;
···211211 struct stmmac_resources stmmac_res;212212 struct plat_stmmacenet_data *plat;213213 struct thead_dwmac *dwmac;214214+ struct clk *apb_clk;214215 void __iomem *apb;215216 int ret;216217···224223 if (IS_ERR(plat))225224 return dev_err_probe(&pdev->dev, PTR_ERR(plat),226225 "dt configuration failed\n");226226+227227+ /*228228+ * The APB clock is essential for accessing glue registers. However,229229+ * old devicetrees don't describe it correctly. We continue to probe230230+ * and emit a warning if it isn't present.231231+ */232232+ apb_clk = devm_clk_get_enabled(&pdev->dev, "apb");233233+ if (PTR_ERR(apb_clk) == -ENOENT)234234+ dev_warn(&pdev->dev,235235+ "cannot get apb clock, link may break after speed changes\n");236236+ else if (IS_ERR(apb_clk))237237+ return dev_err_probe(&pdev->dev, PTR_ERR(apb_clk),238238+ "failed to get apb clock\n");227239228240 dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL);229241 if (!dwmac)
+2-1
drivers/net/ethernet/ti/icssg/icss_iep.c
···621621622622static int icss_iep_extts_enable(struct icss_iep *iep, u32 index, int on)623623{624624- u32 val, cap, ret = 0;624624+ u32 val, cap;625625+ int ret = 0;625626626627 mutex_lock(&iep->ptp_clk_mutex);627628
+6
drivers/net/ethernet/ti/icssg/icssg_prueth.c
···5050/* CTRLMMR_ICSSG_RGMII_CTRL register bits */5151#define ICSSG_CTRL_RGMII_ID_MODE BIT(24)52525353+static void emac_adjust_link(struct net_device *ndev);5454+5355static int emac_get_tx_ts(struct prueth_emac *emac,5456 struct emac_tx_ts_response *rsp)5557{···231229 ret = icssg_config(prueth, emac, slice);232230 if (ret)233231 goto disable_class;232232+233233+ mutex_lock(&emac->ndev->phydev->lock);234234+ emac_adjust_link(emac->ndev);235235+ mutex_unlock(&emac->ndev->phydev->lock);234236 }235237236238 ret = prueth_emac_start(prueth);
···10611061 struct net_device __rcu *vf_netdev;10621062 struct netvsc_vf_pcpu_stats __percpu *vf_stats;10631063 struct delayed_work vf_takeover;10641064+ struct delayed_work vfns_work;1064106510651066 /* 1: allocated, serial number is valid. 0: not allocated */10661067 u32 vf_alloc;···10751074 /* Used to temporarily save the config info across hibernation */10761075 struct netvsc_device_info *saved_netvsc_dev_info;10771076};10771077+10781078+void netvsc_vfns_work(struct work_struct *w);1078107910791080/* Azure hosts don't support non-TCP port numbers in hashing for fragmented10801081 * packets. We can use ethtool to change UDP hash level when necessary.
+28-1
drivers/net/hyperv/netvsc_drv.c
···25222522 spin_lock_init(&net_device_ctx->lock);25232523 INIT_LIST_HEAD(&net_device_ctx->reconfig_events);25242524 INIT_DELAYED_WORK(&net_device_ctx->vf_takeover, netvsc_vf_setup);25252525+ INIT_DELAYED_WORK(&net_device_ctx->vfns_work, netvsc_vfns_work);2525252625262527 net_device_ctx->vf_stats25272528 = netdev_alloc_pcpu_stats(struct netvsc_vf_pcpu_stats);···26672666 cancel_delayed_work_sync(&ndev_ctx->dwork);2668266726692668 rtnl_lock();26692669+ cancel_delayed_work_sync(&ndev_ctx->vfns_work);26702670+26702671 nvdev = rtnl_dereference(ndev_ctx->nvdev);26712672 if (nvdev) {26722673 cancel_work_sync(&nvdev->subchan_work);···27102707 cancel_delayed_work_sync(&ndev_ctx->dwork);2711270827122709 rtnl_lock();27102710+ cancel_delayed_work_sync(&ndev_ctx->vfns_work);2713271127142712 nvdev = rtnl_dereference(ndev_ctx->nvdev);27152713 if (nvdev == NULL) {···28042800 }28052801}2806280228032803+void netvsc_vfns_work(struct work_struct *w)28042804+{28052805+ struct net_device_context *ndev_ctx =28062806+ container_of(w, struct net_device_context, vfns_work.work);28072807+ struct net_device *ndev;28082808+28092809+ if (!rtnl_trylock()) {28102810+ schedule_delayed_work(&ndev_ctx->vfns_work, 1);28112811+ return;28122812+ }28132813+28142814+ ndev = hv_get_drvdata(ndev_ctx->device_ctx);28152815+ if (!ndev)28162816+ goto out;28172817+28182818+ netvsc_event_set_vf_ns(ndev);28192819+28202820+out:28212821+ rtnl_unlock();28222822+}28232823+28072824/*28082825 * On Hyper-V, every VF interface is matched with a corresponding28092826 * synthetic interface. The synthetic interface is presented first···28352810 unsigned long event, void *ptr)28362811{28372812 struct net_device *event_dev = netdev_notifier_info_to_dev(ptr);28132813+ struct net_device_context *ndev_ctx;28382814 int ret = 0;2839281528402816 if (event_dev->netdev_ops == &device_ops && event == NETDEV_REGISTER) {28412841- netvsc_event_set_vf_ns(event_dev);28172817+ ndev_ctx = netdev_priv(event_dev);28182818+ schedule_delayed_work(&ndev_ctx->vfns_work, 0);28422819 return NOTIFY_DONE;28432820 }28442821
···443443 if (!mdiodev)444444 continue;445445446446- if (mdiodev->reset_gpio)447447- gpiod_put(mdiodev->reset_gpio);448448-449446 mdiodev->device_remove(mdiodev);450447 mdiodev->device_free(mdiodev);451448 }
···666666 * Take early refcount for outstanding I/O requests we schedule during667667 * delete processing for unreg_vpi. Always keep this before668668 * scsi_remove_host() as we can no longer obtain a reference through669669- * scsi_host_get() after scsi_host_remove as shost is set to SHOST_DEL.669669+ * scsi_host_get() after scsi_remove_host as shost is set to SHOST_DEL.670670 */671671 if (!scsi_host_get(shost))672672 return VPORT_INVAL;
···12321232}1233123312341234static int tegra_powergate_of_get_resets(struct tegra_powergate *pg,12351235- struct device_node *np, bool off)12351235+ struct device_node *np)12361236{12371237 struct device *dev = pg->pmc->dev;12381238 int err;···12471247 err = reset_control_acquire(pg->reset);12481248 if (err < 0) {12491249 pr_err("failed to acquire resets: %d\n", err);12501250- goto out;12511251- }12521252-12531253- if (off) {12541254- err = reset_control_assert(pg->reset);12551255- } else {12561256- err = reset_control_deassert(pg->reset);12571257- if (err < 0)12581258- goto out;12591259-12601260- reset_control_release(pg->reset);12611261- }12621262-12631263-out:12641264- if (err) {12651265- reset_control_release(pg->reset);12661250 reset_control_put(pg->reset);12671251 }12681252···12921308 goto set_available;12931309 }1294131012951295- err = tegra_powergate_of_get_resets(pg, np, off);13111311+ err = tegra_powergate_of_get_resets(pg, np);12961312 if (err < 0) {12971313 dev_err(dev, "failed to get resets for %pOFn: %d\n", np, err);12981314 goto remove_clks;12991315 }1300131613011301- if (!IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS)) {13021302- if (off)13031303- WARN_ON(tegra_powergate_power_up(pg, true));13171317+ /*13181318+ * If the power-domain is off, then ensure the resets are asserted.13191319+ * If the power-domain is on, then power down to ensure that when is13201320+ * it turned on the power-domain, clocks and resets are all in the13211321+ * expected state.13221322+ */13231323+ if (off) {13241324+ err = reset_control_assert(pg->reset);13251325+ if (err) {13261326+ pr_err("failed to assert resets: %d\n", err);13271327+ goto remove_resets;13281328+ }13291329+ } else {13301330+ err = tegra_powergate_power_down(pg);13311331+ if (err) {13321332+ dev_err(dev, "failed to turn off PM domain %s: %d\n",13331333+ pg->genpd.name, err);13341334+ goto remove_resets;13351335+ }13361336+ }1304133713381338+ /*13391339+ * If PM_GENERIC_DOMAINS is not enabled, power-on13401340+ * the domain and skip the genpd registration.13411341+ */13421342+ if (!IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS)) {13431343+ WARN_ON(tegra_powergate_power_up(pg, true));13051344 goto remove_resets;13061345 }1307134613081308- err = pm_genpd_init(&pg->genpd, NULL, off);13471347+ err = pm_genpd_init(&pg->genpd, NULL, true);13091348 if (err < 0) {13101349 dev_err(dev, "failed to initialise PM domain %pOFn: %d\n", np,13111350 err);
+8-4
drivers/ufs/core/ufshcd.c
···71387138static irqreturn_t ufshcd_intr(int irq, void *__hba)71397139{71407140 struct ufs_hba *hba = __hba;71417141+ u32 intr_status, enabled_intr_status;7141714271427143 /* Move interrupt handling to thread when MCQ & ESI are not enabled */71437144 if (!hba->mcq_enabled || !hba->mcq_esi_enabled)71447145 return IRQ_WAKE_THREAD;7145714671477147+ intr_status = ufshcd_readl(hba, REG_INTERRUPT_STATUS);71487148+ enabled_intr_status = intr_status & ufshcd_readl(hba, REG_INTERRUPT_ENABLE);71497149+71507150+ ufshcd_writel(hba, intr_status, REG_INTERRUPT_STATUS);71517151+71467152 /* Directly handle interrupts since MCQ ESI handlers does the hard job */71477147- return ufshcd_sl_intr(hba, ufshcd_readl(hba, REG_INTERRUPT_STATUS) &71487148- ufshcd_readl(hba, REG_INTERRUPT_ENABLE));71537153+ return ufshcd_sl_intr(hba, enabled_intr_status);71497154}7150715571517156static int ufshcd_clear_tm_cmd(struct ufs_hba *hba, int tag)···1052110516 err = devm_add_action_or_reset(dev, ufshcd_devres_release,1052210517 host);1052310518 if (err)1052410524- return dev_err_probe(dev, err,1052510525- "failed to add ufshcd dealloc action\n");1051910519+ return err;10526105201052710521 host->nr_maps = HCTX_TYPE_POLL + 1;1052810522 hba = shost_priv(host);
+1-1
drivers/ufs/host/ufs-mediatek.c
···818818 unsigned int q_index;819819820820 q_index = map->mq_map[cpu];821821- if (q_index > nr) {821821+ if (q_index >= nr) {822822 dev_err(hba->dev, "hwq index %d exceed %d\n",823823 q_index, nr);824824 return MTK_MCQ_INVALID_IRQ;
+12-15
drivers/virt/coco/sev-guest/sev-guest.c
···116116117117static int get_derived_key(struct snp_guest_dev *snp_dev, struct snp_guest_request_ioctl *arg)118118{119119+ struct snp_derived_key_resp *derived_key_resp __free(kfree) = NULL;119120 struct snp_derived_key_req *derived_key_req __free(kfree) = NULL;120120- struct snp_derived_key_resp derived_key_resp = {0};121121 struct snp_msg_desc *mdesc = snp_dev->msg_desc;122122 struct snp_guest_req req = {};123123 int rc, resp_len;124124- /* Response data is 64 bytes and max authsize for GCM is 16 bytes. */125125- u8 buf[64 + 16];126124127125 if (!arg->req_data || !arg->resp_data)128126 return -EINVAL;···130132 * response payload. Make sure that it has enough space to cover the131133 * authtag.132134 */133133- resp_len = sizeof(derived_key_resp.data) + mdesc->ctx->authsize;134134- if (sizeof(buf) < resp_len)135135+ resp_len = sizeof(derived_key_resp->data) + mdesc->ctx->authsize;136136+ derived_key_resp = kzalloc(resp_len, GFP_KERNEL_ACCOUNT);137137+ if (!derived_key_resp)135138 return -ENOMEM;136139137140 derived_key_req = kzalloc(sizeof(*derived_key_req), GFP_KERNEL_ACCOUNT);···148149 req.vmpck_id = mdesc->vmpck_id;149150 req.req_buf = derived_key_req;150151 req.req_sz = sizeof(*derived_key_req);151151- req.resp_buf = buf;152152+ req.resp_buf = derived_key_resp;152153 req.resp_sz = resp_len;153154 req.exit_code = SVM_VMGEXIT_GUEST_REQUEST;154155155156 rc = snp_send_guest_request(mdesc, &req);156157 arg->exitinfo2 = req.exitinfo2;157157- if (rc)158158- return rc;159159-160160- memcpy(derived_key_resp.data, buf, sizeof(derived_key_resp.data));161161- if (copy_to_user((void __user *)arg->resp_data, &derived_key_resp,162162- sizeof(derived_key_resp)))163163- rc = -EFAULT;158158+ if (!rc) {159159+ if (copy_to_user((void __user *)arg->resp_data, derived_key_resp,160160+ sizeof(derived_key_resp->data)))161161+ rc = -EFAULT;162162+ }164163165164 /* The response buffer contains the sensitive data, explicitly clear it. */166166- memzero_explicit(buf, sizeof(buf));167167- memzero_explicit(&derived_key_resp, sizeof(derived_key_resp));165165+ memzero_explicit(derived_key_resp, sizeof(*derived_key_resp));166166+168167 return rc;169168}170169
+6-5
fs/btrfs/extent_io.c
···43314331 unsigned long end = index + (PAGE_SIZE >> fs_info->nodesize_bits) - 1;43324332 int ret;4333433343344334- xa_lock_irq(&fs_info->buffer_tree);43344334+ rcu_read_lock();43354335 xa_for_each_range(&fs_info->buffer_tree, index, eb, start, end) {43364336 /*43374337 * The same as try_release_extent_buffer(), to ensure the eb43384338 * won't disappear out from under us.43394339 */43404340 spin_lock(&eb->refs_lock);43414341+ rcu_read_unlock();43424342+43414343 if (refcount_read(&eb->refs) != 1 || extent_buffer_under_io(eb)) {43424344 spin_unlock(&eb->refs_lock);43454345+ rcu_read_lock();43434346 continue;43444347 }43454348···43614358 * check the folio private at the end. And43624359 * release_extent_buffer() will release the refs_lock.43634360 */43644364- xa_unlock_irq(&fs_info->buffer_tree);43654361 release_extent_buffer(eb);43664366- xa_lock_irq(&fs_info->buffer_tree);43624362+ rcu_read_lock();43674363 }43684368- xa_unlock_irq(&fs_info->buffer_tree);43644364+ rcu_read_unlock();4369436543704366 /*43714367 * Finally to check if we have cleared folio private, as if we have···43774375 ret = 0;43784376 spin_unlock(&folio->mapping->i_private_lock);43794377 return ret;43804380-43814378}4382437943834380int try_release_extent_buffer(struct folio *folio)
+5-3
fs/btrfs/inode.c
···401401402402 while (index <= end_index) {403403 folio = filemap_get_folio(inode->vfs_inode.i_mapping, index);404404- index++;405405- if (IS_ERR(folio))404404+ if (IS_ERR(folio)) {405405+ index++;406406 continue;407407+ }407408409409+ index = folio_end(folio) >> PAGE_SHIFT;408410 /*409411 * Here we just clear all Ordered bits for every page in the410412 * range, then btrfs_mark_ordered_io_finished() will handle···20152013 * cleaered by the caller.20162014 */20172015 if (ret < 0)20182018- btrfs_cleanup_ordered_extents(inode, file_pos, end);20162016+ btrfs_cleanup_ordered_extents(inode, file_pos, len);20192017 return ret;20202018}20212019
···602602 if (btrfs_root_id(root) == objectid) {603603 u64 commit_root_gen;604604605605+ /*606606+ * Relocation will wait for cleaner thread, and any half-dropped607607+ * subvolume will be fully cleaned up at mount time.608608+ * So here we shouldn't hit a subvolume with non-zero drop_progress.609609+ *610610+ * If this isn't the case, error out since it can make us attempt to611611+ * drop references for extents that were already dropped before.612612+ */613613+ if (unlikely(btrfs_disk_key_objectid(&root->root_item.drop_progress))) {614614+ struct btrfs_key cpu_key;615615+616616+ btrfs_disk_key_to_cpu(&cpu_key, &root->root_item.drop_progress);617617+ btrfs_err(fs_info,618618+ "cannot relocate partially dropped subvolume %llu, drop progress key (%llu %u %llu)",619619+ objectid, cpu_key.objectid, cpu_key.type, cpu_key.offset);620620+ ret = -EUCLEAN;621621+ goto fail;622622+ }623623+605624 /* called by btrfs_init_reloc_root */606625 ret = btrfs_copy_root(trans, root, root->commit_root, &eb,607626 BTRFS_TREE_RELOC_OBJECTID);
+7-12
fs/btrfs/tree-log.c
···26052605/*26062606 * Correctly adjust the reserved bytes occupied by a log tree extent buffer26072607 */26082608-static void unaccount_log_buffer(struct btrfs_fs_info *fs_info, u64 start)26082608+static int unaccount_log_buffer(struct btrfs_fs_info *fs_info, u64 start)26092609{26102610 struct btrfs_block_group *cache;2611261126122612 cache = btrfs_lookup_block_group(fs_info, start);26132613 if (!cache) {26142614 btrfs_err(fs_info, "unable to find block group for %llu", start);26152615- return;26152615+ return -ENOENT;26162616 }2617261726182618 spin_lock(&cache->space_info->lock);···26232623 spin_unlock(&cache->space_info->lock);2624262426252625 btrfs_put_block_group(cache);26262626+26272627+ return 0;26262628}2627262926282630static int clean_log_buffer(struct btrfs_trans_handle *trans,26292631 struct extent_buffer *eb)26302632{26312631- int ret;26322632-26332633 btrfs_tree_lock(eb);26342634 btrfs_clear_buffer_dirty(trans, eb);26352635 wait_on_extent_buffer_writeback(eb);26362636 btrfs_tree_unlock(eb);2637263726382638- if (trans) {26392639- ret = btrfs_pin_reserved_extent(trans, eb);26402640- if (ret)26412641- return ret;26422642- } else {26432643- unaccount_log_buffer(eb->fs_info, eb->start);26442644- }26382638+ if (trans)26392639+ return btrfs_pin_reserved_extent(trans, eb);2645264026462646- return 0;26412641+ return unaccount_log_buffer(eb->fs_info, eb->start);26472642}2648264326492644static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans,
···33config EROFS_FS44 tristate "EROFS filesystem support"55 depends on BLOCK66+ select CACHEFILES if EROFS_FS_ONDEMAND67 select CRC3288+ select CRYPTO if EROFS_FS_ZIP_ACCEL99+ select CRYPTO_DEFLATE if EROFS_FS_ZIP_ACCEL710 select FS_IOMAP1111+ select LZ4_DECOMPRESS if EROFS_FS_ZIP1212+ select NETFS_SUPPORT if EROFS_FS_ONDEMAND1313+ select XXHASH if EROFS_FS_XATTR1414+ select XZ_DEC if EROFS_FS_ZIP_LZMA1515+ select XZ_DEC_MICROLZMA if EROFS_FS_ZIP_LZMA1616+ select ZLIB_INFLATE if EROFS_FS_ZIP_DEFLATE1717+ select ZSTD_DECOMPRESS if EROFS_FS_ZIP_ZSTD818 help919 EROFS (Enhanced Read-Only File System) is a lightweight read-only1020 file system with modern designs (e.g. no buffer heads, inline···4838config EROFS_FS_XATTR4939 bool "EROFS extended attributes"5040 depends on EROFS_FS5151- select XXHASH5241 default y5342 help5443 Extended attributes are name:value pairs associated with inodes by···10394config EROFS_FS_ZIP10495 bool "EROFS Data Compression Support"10596 depends on EROFS_FS106106- select LZ4_DECOMPRESS10797 default y10898 help10999 Enable transparent compression support for EROFS file systems.···112104config EROFS_FS_ZIP_LZMA113105 bool "EROFS LZMA compressed data support"114106 depends on EROFS_FS_ZIP115115- select XZ_DEC116116- select XZ_DEC_MICROLZMA117107 help118108 Saying Y here includes support for reading EROFS file systems119109 containing LZMA compressed data, specifically called microLZMA. It···123117config EROFS_FS_ZIP_DEFLATE124118 bool "EROFS DEFLATE compressed data support"125119 depends on EROFS_FS_ZIP126126- select ZLIB_INFLATE127120 help128121 Saying Y here includes support for reading EROFS file systems129122 containing DEFLATE compressed data. It gives better compression···137132config EROFS_FS_ZIP_ZSTD138133 bool "EROFS Zstandard compressed data support"139134 depends on EROFS_FS_ZIP140140- select ZSTD_DECOMPRESS141135 help142136 Saying Y here includes support for reading EROFS file systems143137 containing Zstandard compressed data. It gives better compression···151147config EROFS_FS_ZIP_ACCEL152148 bool "EROFS hardware decompression support"153149 depends on EROFS_FS_ZIP154154- select CRYPTO155155- select CRYPTO_DEFLATE156150 help157151 Saying Y here includes hardware accelerator support for reading158152 EROFS file systems containing compressed data. It gives better···165163config EROFS_FS_ONDEMAND166164 bool "EROFS fscache-based on-demand read support (deprecated)"167165 depends on EROFS_FS168168- select NETFS_SUPPORT169166 select FSCACHE170170- select CACHEFILES171167 select CACHEFILES_ONDEMAND172168 help173169 This permits EROFS to use fscache-backed data blobs with on-demand
+16-12
fs/erofs/super.c
···174174 if (!erofs_is_fileio_mode(sbi)) {175175 dif->dax_dev = fs_dax_get_by_bdev(file_bdev(file),176176 &dif->dax_part_off, NULL, NULL);177177+ if (!dif->dax_dev && test_opt(&sbi->opt, DAX_ALWAYS)) {178178+ erofs_info(sb, "DAX unsupported by %s. Turning off DAX.",179179+ dif->path);180180+ clear_opt(&sbi->opt, DAX_ALWAYS);181181+ }177182 } else if (!S_ISREG(file_inode(file)->i_mode)) {178183 fput(file);179184 return -EINVAL;···215210 ondisk_extradevs, sbi->devs->extra_devices);216211 return -EINVAL;217212 }218218- if (!ondisk_extradevs)213213+ if (!ondisk_extradevs) {214214+ if (test_opt(&sbi->opt, DAX_ALWAYS) && !sbi->dif0.dax_dev) {215215+ erofs_info(sb, "DAX unsupported by block device. Turning off DAX.");216216+ clear_opt(&sbi->opt, DAX_ALWAYS);217217+ }219218 return 0;219219+ }220220221221 if (!sbi->devs->extra_devices && !erofs_is_fscache_mode(sb))222222 sbi->devs->flatdev = true;···323313 sbi->islotbits = ilog2(sizeof(struct erofs_inode_compact));324314 if (erofs_sb_has_48bit(sbi) && dsb->rootnid_8b) {325315 sbi->root_nid = le64_to_cpu(dsb->rootnid_8b);326326- sbi->dif0.blocks = (sbi->dif0.blocks << 32) |327327- le16_to_cpu(dsb->rb.blocks_hi);316316+ sbi->dif0.blocks = sbi->dif0.blocks |317317+ ((u64)le16_to_cpu(dsb->rb.blocks_hi) << 32);328318 } else {329319 sbi->root_nid = le16_to_cpu(dsb->rb.rootnid_2b);330320 }···348338 if (ret < 0)349339 goto out;350340351351- /* handle multiple devices */352341 ret = erofs_scan_devices(sb, dsb);353342354343 if (erofs_sb_has_48bit(sbi))···680671 return invalfc(fc, "cannot use fsoffset in fscache mode");681672 }682673683683- if (test_opt(&sbi->opt, DAX_ALWAYS)) {684684- if (!sbi->dif0.dax_dev) {685685- errorfc(fc, "DAX unsupported by block device. Turning off DAX.");686686- clear_opt(&sbi->opt, DAX_ALWAYS);687687- } else if (sbi->blkszbits != PAGE_SHIFT) {688688- errorfc(fc, "unsupported blocksize for DAX");689689- clear_opt(&sbi->opt, DAX_ALWAYS);690690- }674674+ if (test_opt(&sbi->opt, DAX_ALWAYS) && sbi->blkszbits != PAGE_SHIFT) {675675+ erofs_info(sb, "unsupported blocksize for DAX");676676+ clear_opt(&sbi->opt, DAX_ALWAYS);691677 }692678693679 sb->s_time_gran = 1;
+11-2
fs/erofs/zdata.c
···14321432}14331433#endif1434143414351435+/* Use (kthread_)work in atomic contexts to minimize scheduling overhead */14361436+static inline bool z_erofs_in_atomic(void)14371437+{14381438+ if (IS_ENABLED(CONFIG_PREEMPTION) && rcu_preempt_depth())14391439+ return true;14401440+ if (!IS_ENABLED(CONFIG_PREEMPT_COUNT))14411441+ return true;14421442+ return !preemptible();14431443+}14441444+14351445static void z_erofs_decompress_kickoff(struct z_erofs_decompressqueue *io,14361446 int bios)14371447{···1456144614571447 if (atomic_add_return(bios, &io->pending_bios))14581448 return;14591459- /* Use (kthread_)work and sync decompression for atomic contexts only */14601460- if (!in_task() || irqs_disabled() || rcu_read_lock_any_held()) {14491449+ if (z_erofs_in_atomic()) {14611450#ifdef CONFIG_EROFS_FS_PCPU_KTHREAD14621451 struct kthread_worker *worker;14631452
+3-2
fs/nfsd/localio.c
···103103 if (nfsd_file_get(new) == NULL)104104 goto again;105105 /*106106- * Drop the ref we were going to install and the107107- * one we were going to return.106106+ * Drop the ref we were going to install (both file and107107+ * net) and the one we were going to return (only file).108108 */109109 nfsd_file_put(localio);110110+ nfsd_net_put(net);110111 nfsd_file_put(localio);111112 localio = new;112113 }
+9-1
fs/nfsd/vfs.c
···470470 if (!iap->ia_valid)471471 return 0;472472473473- iap->ia_valid |= ATTR_CTIME;473473+ /*474474+ * If ATTR_DELEG is set, then this is an update from a client that475475+ * holds a delegation. If this is an update for only the atime, the476476+ * ctime should not be changed. If the update contains the mtime477477+ * too, then ATTR_CTIME should already be set.478478+ */479479+ if (!(iap->ia_valid & ATTR_DELEG))480480+ iap->ia_valid |= ATTR_CTIME;481481+474482 return notify_change(&nop_mnt_idmap, dentry, iap, NULL);475483}476484
···145145#endif /* CONFIG_CIFS_NFSD_EXPORT */146146147147/* when changing internal version - update following two lines at same time */148148-#define SMB3_PRODUCT_BUILD 55149149-#define CIFS_VERSION "2.55"148148+#define SMB3_PRODUCT_BUILD 56149149+#define CIFS_VERSION "2.56"150150#endif /* _CIFSFS_H */
+21
fs/smb/client/cifsglob.h
···17321732 int mid_rc; /* rc for MID_RC */17331733 __le16 command; /* smb command code */17341734 unsigned int optype; /* operation type */17351735+ spinlock_t mid_lock;17351736 bool wait_cancelled:1; /* Cancelled while waiting for response */17361737 bool deleted_from_q:1; /* Whether Mid has been dequeued frem pending_mid_q */17371738 bool large_buf:1; /* if valid response, is pointer to large buf */···20372036 * cifsFileInfo->file_info_lock cifsFileInfo->count cifs_new_fileinfo20382037 * ->invalidHandle initiate_cifs_search20392038 * ->oplock_break_cancelled20392039+ * mid_q_entry->mid_lock mid_q_entry->callback alloc_mid20402040+ * smb2_mid_entry_alloc20412041+ * (Any fields of mid_q_entry that will need protection)20402042 ****************************************************************************/2041204320422044#ifdef DECLARE_GLOBALS_HERE···23772373 }23782374 }23792375 return ret;23762376+}23772377+23782378+/*23792379+ * Execute mid callback atomically - ensures callback runs exactly once23802380+ * and prevents sleeping in atomic context.23812381+ */23822382+static inline void mid_execute_callback(struct mid_q_entry *mid)23832383+{23842384+ void (*callback)(struct mid_q_entry *mid);23852385+23862386+ spin_lock(&mid->mid_lock);23872387+ callback = mid->callback;23882388+ mid->callback = NULL; /* Mark as executed, */23892389+ spin_unlock(&mid->mid_lock);23902390+23912391+ if (callback)23922392+ callback(mid);23802393}2381239423822395#define CIFS_REPARSE_SUPPORT(tcon) \
+9-10
fs/smb/client/cifstransport.c
···4646 temp = mempool_alloc(cifs_mid_poolp, GFP_NOFS);4747 memset(temp, 0, sizeof(struct mid_q_entry));4848 kref_init(&temp->refcount);4949+ spin_lock_init(&temp->mid_lock);4950 temp->mid = get_mid(smb_buffer);5051 temp->pid = current->pid;5152 temp->command = cpu_to_le16(smb_buffer->Command);···346345 rc = wait_for_response(server, midQ);347346 if (rc != 0) {348347 send_cancel(server, &rqst, midQ);349349- spin_lock(&server->mid_queue_lock);350350- if (midQ->mid_state == MID_REQUEST_SUBMITTED ||351351- midQ->mid_state == MID_RESPONSE_RECEIVED) {348348+ spin_lock(&midQ->mid_lock);349349+ if (midQ->callback) {352350 /* no longer considered to be "in-flight" */353351 midQ->callback = release_mid;354354- spin_unlock(&server->mid_queue_lock);352352+ spin_unlock(&midQ->mid_lock);355353 add_credits(server, &credits, 0);356354 return rc;357355 }358358- spin_unlock(&server->mid_queue_lock);356356+ spin_unlock(&midQ->mid_lock);359357 }360358361359 rc = cifs_sync_mid_result(midQ, server);···527527 rc = wait_for_response(server, midQ);528528 if (rc) {529529 send_cancel(server, &rqst, midQ);530530- spin_lock(&server->mid_queue_lock);531531- if (midQ->mid_state == MID_REQUEST_SUBMITTED ||532532- midQ->mid_state == MID_RESPONSE_RECEIVED) {530530+ spin_lock(&midQ->mid_lock);531531+ if (midQ->callback) {533532 /* no longer considered to be "in-flight" */534533 midQ->callback = release_mid;535535- spin_unlock(&server->mid_queue_lock);534534+ spin_unlock(&midQ->mid_lock);536535 return rc;537536 }538538- spin_unlock(&server->mid_queue_lock);537537+ spin_unlock(&midQ->mid_lock);539538 }540539541540 /* We got the response - restart system call. */
+16-45
fs/smb/client/compress.c
···155155}156156157157/*158158- * TODO:159159- * Support other iter types, if required.160160- * Only ITER_XARRAY is supported for now.158158+ * Collect some 2K samples with 2K gaps between.161159 */162162-static int collect_sample(const struct iov_iter *iter, ssize_t max, u8 *sample)160160+static int collect_sample(const struct iov_iter *source, ssize_t max, u8 *sample)163161{164164- struct folio *folios[16], *folio;165165- unsigned int nr, i, j, npages;166166- loff_t start = iter->xarray_start + iter->iov_offset;167167- pgoff_t last, index = start / PAGE_SIZE;168168- size_t len, off, foff;169169- void *p;170170- int s = 0;162162+ struct iov_iter iter = *source;163163+ size_t s = 0;171164172172- last = (start + max - 1) / PAGE_SIZE;173173- do {174174- nr = xa_extract(iter->xarray, (void **)folios, index, last, ARRAY_SIZE(folios),175175- XA_PRESENT);176176- if (nr == 0)177177- return -EIO;165165+ while (iov_iter_count(&iter) >= SZ_2K) {166166+ size_t part = umin(umin(iov_iter_count(&iter), SZ_2K), max);167167+ size_t n;178168179179- for (i = 0; i < nr; i++) {180180- folio = folios[i];181181- npages = folio_nr_pages(folio);182182- foff = start - folio_pos(folio);183183- off = foff % PAGE_SIZE;169169+ n = copy_from_iter(sample + s, part, &iter);170170+ if (n != part)171171+ return -EFAULT;184172185185- for (j = foff / PAGE_SIZE; j < npages; j++) {186186- size_t len2;173173+ s += n;174174+ max -= n;187175188188- len = min_t(size_t, max, PAGE_SIZE - off);189189- len2 = min_t(size_t, len, SZ_2K);176176+ if (iov_iter_count(&iter) < PAGE_SIZE - SZ_2K)177177+ break;190178191191- p = kmap_local_page(folio_page(folio, j));192192- memcpy(&sample[s], p, len2);193193- kunmap_local(p);194194-195195- s += len2;196196-197197- if (len2 < SZ_2K || s >= max - SZ_2K)198198- return s;199199-200200- max -= len;201201- if (max <= 0)202202- return s;203203-204204- start += len;205205- off = 0;206206- index++;207207- }208208- }209209- } while (nr == ARRAY_SIZE(folios));179179+ iov_iter_advance(&iter, SZ_2K);180180+ }210181211182 return s;212183}
+4-5
fs/smb/client/connect.c
···335335 cifs_dbg(FYI, "%s: issuing mid callbacks\n", __func__);336336 list_for_each_entry_safe(mid, nmid, &retry_list, qhead) {337337 list_del_init(&mid->qhead);338338- mid->callback(mid);338338+ mid_execute_callback(mid);339339 release_mid(mid);340340 }341341···919919 list_del_init(&mid->qhead);920920 mid->mid_rc = mid_rc;921921 mid->mid_state = MID_RC;922922- mid->callback(mid);922922+ mid_execute_callback(mid);923923 release_mid(mid);924924 }925925···11171117 mid_entry = list_entry(tmp, struct mid_q_entry, qhead);11181118 cifs_dbg(FYI, "Callback mid %llu\n", mid_entry->mid);11191119 list_del_init(&mid_entry->qhead);11201120- mid_entry->callback(mid_entry);11201120+ mid_execute_callback(mid_entry);11211121 release_mid(mid_entry);11221122 }11231123 /* 1/8th of sec is more than enough time for them to exit */···13941394 }1395139513961396 if (!mids[i]->multiRsp || mids[i]->multiEnd)13971397- mids[i]->callback(mids[i]);13971397+ mid_execute_callback(mids[i]);1398139813991399 release_mid(mids[i]);14001400 } else if (server->ops->is_oplock_break &&···42054205 return 0;42064206 }4207420742084208- server->lstrp = jiffies;42094208 server->tcpStatus = CifsInNegotiate;42104209 server->neg_start = jiffies;42114210 spin_unlock(&server->srv_lock);
+32-2
fs/smb/client/inode.c
···19431943 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);19441944 struct tcon_link *tlink;19451945 struct cifs_tcon *tcon;19461946+ __u32 dosattr = 0, origattr = 0;19461947 struct TCP_Server_Info *server;19471948 struct iattr *attrs = NULL;19481948- __u32 dosattr = 0, origattr = 0;19491949+ bool rehash = false;1949195019501951 cifs_dbg(FYI, "cifs_unlink, dir=0x%p, dentry=0x%p\n", dir, dentry);1951195219521953 if (unlikely(cifs_forced_shutdown(cifs_sb)))19531954 return -EIO;19551955+19561956+ /* Unhash dentry in advance to prevent any concurrent opens */19571957+ spin_lock(&dentry->d_lock);19581958+ if (!d_unhashed(dentry)) {19591959+ __d_drop(dentry);19601960+ rehash = true;19611961+ }19621962+ spin_unlock(&dentry->d_lock);1954196319551964 tlink = cifs_sb_tlink(cifs_sb);19561965 if (IS_ERR(tlink))···20122003 cifs_drop_nlink(inode);20132004 }20142005 } else if (rc == -ENOENT) {20152015- d_drop(dentry);20062006+ if (simple_positive(dentry))20072007+ d_delete(dentry);20162008 } else if (rc == -EBUSY) {20172009 if (server->ops->rename_pending_delete) {20182010 rc = server->ops->rename_pending_delete(full_path,···20662056 kfree(attrs);20672057 free_xid(xid);20682058 cifs_put_tlink(tlink);20592059+ if (rehash)20602060+ d_rehash(dentry);20692061 return rc;20702062}20712063···24742462 struct cifs_sb_info *cifs_sb;24752463 struct tcon_link *tlink;24762464 struct cifs_tcon *tcon;24652465+ bool rehash = false;24772466 unsigned int xid;24782467 int rc, tmprc;24792468 int retry_count = 0;···24892476 cifs_sb = CIFS_SB(source_dir->i_sb);24902477 if (unlikely(cifs_forced_shutdown(cifs_sb)))24912478 return -EIO;24792479+24802480+ /*24812481+ * Prevent any concurrent opens on the target by unhashing the dentry.24822482+ * VFS already unhashes the target when renaming directories.24832483+ */24842484+ if (d_is_positive(target_dentry) && !d_is_dir(target_dentry)) {24852485+ if (!d_unhashed(target_dentry)) {24862486+ d_drop(target_dentry);24872487+ rehash = true;24882488+ }24892489+ }2492249024932491 tlink = cifs_sb_tlink(cifs_sb);24942492 if (IS_ERR(tlink))···25422518 }25432519 }2544252025212521+ if (!rc)25222522+ rehash = false;25452523 /*25462524 * No-replace is the natural behavior for CIFS, so skip unlink hacks.25472525 */···26022576 goto cifs_rename_exit;26032577 rc = cifs_do_rename(xid, source_dentry, from_name,26042578 target_dentry, to_name);25792579+ if (!rc)25802580+ rehash = false;26052581 }2606258226072583 /* force revalidate to go get info when needed */26082584 CIFS_I(source_dir)->time = CIFS_I(target_dir)->time = 0;2609258526102586cifs_rename_exit:25872587+ if (rehash)25882588+ d_rehash(target_dentry);26112589 kfree(info_buf_source);26122590 free_dentry_path(page2);26132591 free_dentry_path(page1);
+12-3
fs/smb/client/smb2ops.c
···772772 bytes_left -= sizeof(*p);773773 break;774774 }775775+ /* Validate that Next doesn't point beyond the buffer */776776+ if (next > bytes_left) {777777+ cifs_dbg(VFS, "%s: invalid Next pointer %zu > %zd\n",778778+ __func__, next, bytes_left);779779+ rc = -EINVAL;780780+ goto out;781781+ }775782 p = (struct network_interface_info_ioctl_rsp *)((u8 *)p+next);776783 bytes_left -= next;777784 }···790783 }791784792785 /* Azure rounds the buffer size up 8, to a 16 byte boundary */793793- if ((bytes_left > 8) || p->Next)786786+ if ((bytes_left > 8) ||787787+ (bytes_left >= offsetof(struct network_interface_info_ioctl_rsp, Next)788788+ + sizeof(p->Next) && p->Next))794789 cifs_dbg(VFS, "%s: incomplete interface info\n", __func__);795790796791 ses->iface_last_update = jiffies;···48144805 dw->server->ops->is_network_name_deleted(dw->buf,48154806 dw->server);4816480748174817- mid->callback(mid);48084808+ mid_execute_callback(mid);48184809 } else {48194810 spin_lock(&dw->server->srv_lock);48204811 if (dw->server->tcpStatus == CifsNeedReconnect) {···48224813 mid->mid_state = MID_RETRY_NEEDED;48234814 spin_unlock(&dw->server->mid_queue_lock);48244815 spin_unlock(&dw->server->srv_lock);48254825- mid->callback(mid);48164816+ mid_execute_callback(mid);48264817 } else {48274818 spin_lock(&dw->server->mid_queue_lock);48284819 mid->mid_state = MID_REQUEST_SUBMITTED;
···13371337 log_rdma_event(INFO, "cancelling idle timer\n");13381338 cancel_delayed_work_sync(&info->idle_timer_work);1339133913401340- log_rdma_event(INFO, "wait for all send posted to IB to finish\n");13411341- wait_event(info->wait_send_pending,13421342- atomic_read(&info->send_pending) == 0);13431343-13441340 /* It's not possible for upper layer to get to reassembly */13451341 log_rdma_event(INFO, "drain the reassembly queue\n");13461342 do {···19821986 */1983198719841988 wait_event(info->wait_send_pending,19851985- atomic_read(&info->send_pending) == 0);19891989+ atomic_read(&info->send_pending) == 0 ||19901990+ sc->status != SMBDIRECT_SOCKET_CONNECTED);19911991+19921992+ if (sc->status != SMBDIRECT_SOCKET_CONNECTED && rc == 0)19931993+ rc = -EAGAIN;1986199419871995 return rc;19881996}
···219219 else if (XFS_INO_TO_AGNO(mp, breq->startino) < hdr->agno)220220 return -EINVAL;221221222222- breq->flags |= XFS_IBULK_SAME_AG;222222+ breq->iwalk_flags |= XFS_IWALK_SAME_AG;223223224224 /* Asking for an inode past the end of the AG? We're done! */225225 if (XFS_INO_TO_AGNO(mp, breq->startino) > hdr->agno)
+3-2
fs/xfs/xfs_iops.c
···616616 * write of exactly one single fsblock if the bdev will make that617617 * guarantee for us.618618 */619619- if (xfs_inode_can_hw_atomic_write(ip) || xfs_can_sw_atomic_write(mp))619619+ if (xfs_inode_can_hw_atomic_write(ip) ||620620+ xfs_inode_can_sw_atomic_write(ip))620621 return mp->m_sb.sb_blocksize;621622622623 return 0;···634633 * write of exactly one single fsblock if the bdev will make that635634 * guarantee for us.636635 */637637- if (!xfs_can_sw_atomic_write(mp)) {636636+ if (!xfs_inode_can_sw_atomic_write(ip)) {638637 if (xfs_inode_can_hw_atomic_write(ip))639638 return mp->m_sb.sb_blocksize;640639 return 0;
+2-6
fs/xfs/xfs_itable.c
···307307 .breq = breq,308308 };309309 struct xfs_trans *tp;310310- unsigned int iwalk_flags = 0;311310 int error;312311313312 if (breq->idmap != &nop_mnt_idmap) {···327328 * locking abilities to detect cycles in the inobt without deadlocking.328329 */329330 tp = xfs_trans_alloc_empty(breq->mp);330330- if (breq->flags & XFS_IBULK_SAME_AG)331331- iwalk_flags |= XFS_IWALK_SAME_AG;332332-333333- error = xfs_iwalk(breq->mp, tp, breq->startino, iwalk_flags,331331+ error = xfs_iwalk(breq->mp, tp, breq->startino, breq->iwalk_flags,334332 xfs_bulkstat_iwalk, breq->icount, &bc);335333 xfs_trans_cancel(tp);336334 kfree(bc.buf);···453457 * locking abilities to detect cycles in the inobt without deadlocking.454458 */455459 tp = xfs_trans_alloc_empty(breq->mp);456456- error = xfs_inobt_walk(breq->mp, tp, breq->startino, breq->flags,460460+ error = xfs_inobt_walk(breq->mp, tp, breq->startino, breq->iwalk_flags,457461 xfs_inumbers_walk, breq->icount, &ic);458462 xfs_trans_cancel(tp);459463
+4-6
fs/xfs/xfs_itable.h
···1313 xfs_ino_t startino; /* start with this inode */1414 unsigned int icount; /* number of elements in ubuffer */1515 unsigned int ocount; /* number of records returned */1616- unsigned int flags; /* see XFS_IBULK_FLAG_* */1616+ unsigned int flags; /* XFS_IBULK_FLAG_* */1717+ unsigned int iwalk_flags; /* XFS_IWALK_FLAG_* */1718};18191919-/* Only iterate within the same AG as startino */2020-#define XFS_IBULK_SAME_AG (1U << 0)2121-2220/* Fill out the bs_extents64 field if set. */2323-#define XFS_IBULK_NREXT64 (1U << 1)2121+#define XFS_IBULK_NREXT64 (1U << 0)24222523/* Signal that we can return metadata directories. */2626-#define XFS_IBULK_METADIR (1U << 2)2424+#define XFS_IBULK_METADIR (1U << 1)27252826/*2927 * Advance the user buffer pointer by one record of the given size. If the
+19
fs/xfs/xfs_mount.c
···779779 return -EINVAL;780780 }781781782782+ if (xfs_has_reflink(mp))783783+ goto set_limit;784784+785785+ if (new_max_fsbs == 1) {786786+ if (mp->m_ddev_targp->bt_awu_max ||787787+ (mp->m_rtdev_targp && mp->m_rtdev_targp->bt_awu_max)) {788788+ } else {789789+ xfs_warn(mp,790790+ "cannot support atomic writes of size %lluk with no reflink or HW support",791791+ new_max_bytes >> 10);792792+ return -EINVAL;793793+ }794794+ } else {795795+ xfs_warn(mp,796796+ "cannot support atomic writes of size %lluk with no reflink support",797797+ new_max_bytes >> 10);798798+ return -EINVAL;799799+ }800800+782801set_limit:783802 error = xfs_calc_atomic_write_reservation(mp, new_max_fsbs);784803 if (error) {
···166166static void167167xfs_zone_record_blocks(168168 struct xfs_trans *tp,169169- xfs_fsblock_t fsbno,170170- xfs_filblks_t len,171169 struct xfs_open_zone *oz,172172- bool used)170170+ xfs_fsblock_t fsbno,171171+ xfs_filblks_t len)173172{174173 struct xfs_mount *mp = tp->t_mountp;175174 struct xfs_rtgroup *rtg = oz->oz_rtg;···178179179180 xfs_rtgroup_lock(rtg, XFS_RTGLOCK_RMAP);180181 xfs_rtgroup_trans_join(tp, rtg, XFS_RTGLOCK_RMAP);181181- if (used) {182182- rmapip->i_used_blocks += len;183183- ASSERT(rmapip->i_used_blocks <= rtg_blocks(rtg));184184- } else {185185- xfs_add_frextents(mp, len);186186- }182182+ rmapip->i_used_blocks += len;183183+ ASSERT(rmapip->i_used_blocks <= rtg_blocks(rtg));187184 oz->oz_written += len;188185 if (oz->oz_written == rtg_blocks(rtg))189186 xfs_open_zone_mark_full(oz);190187 xfs_trans_log_inode(tp, rmapip, XFS_ILOG_CORE);188188+}189189+190190+/*191191+ * Called for blocks that have been written to disk, but not actually linked to192192+ * an inode, which can happen when garbage collection races with user data193193+ * writes to a file.194194+ */195195+static void196196+xfs_zone_skip_blocks(197197+ struct xfs_open_zone *oz,198198+ xfs_filblks_t len)199199+{200200+ struct xfs_rtgroup *rtg = oz->oz_rtg;201201+202202+ trace_xfs_zone_skip_blocks(oz, 0, len);203203+204204+ xfs_rtgroup_lock(rtg, XFS_RTGLOCK_RMAP);205205+ oz->oz_written += len;206206+ if (oz->oz_written == rtg_blocks(rtg))207207+ xfs_open_zone_mark_full(oz);208208+ xfs_rtgroup_unlock(rtg, XFS_RTGLOCK_RMAP);209209+210210+ xfs_add_frextents(rtg_mount(rtg), len);191211}192212193213static int···268250 }269251 }270252271271- xfs_zone_record_blocks(tp, new->br_startblock, new->br_blockcount, oz,272272- true);253253+ xfs_zone_record_blocks(tp, oz, new->br_startblock, new->br_blockcount);273254274255 /* Map the new blocks into the data fork. */275256 xfs_bmap_map_extent(tp, ip, XFS_DATA_FORK, new);···276259277260skip:278261 trace_xfs_reflink_cow_remap_skip(ip, new);279279- xfs_zone_record_blocks(tp, new->br_startblock, new->br_blockcount, oz,280280- false);262262+ xfs_zone_skip_blocks(oz, new->br_blockcount);281263 return 0;282264}283265
+48
include/drm/drm_bridge.h
···866866 struct drm_connector *connector,867867 bool enable, int direction);868868869869+ /**870870+ * @hdmi_cec_init:871871+ *872872+ * Initialize CEC part of the bridge.873873+ *874874+ * This callback is optional, it can be implemented by bridges that875875+ * set the @DRM_BRIDGE_OP_HDMI_CEC_ADAPTER flag in their876876+ * &drm_bridge->ops.877877+ *878878+ * Returns:879879+ * 0 on success, a negative error code otherwise880880+ */869881 int (*hdmi_cec_init)(struct drm_bridge *bridge,870882 struct drm_connector *connector);871883884884+ /**885885+ * @hdmi_cec_enable:886886+ *887887+ * Enable or disable the CEC adapter inside the bridge.888888+ *889889+ * This callback is optional, it can be implemented by bridges that890890+ * set the @DRM_BRIDGE_OP_HDMI_CEC_ADAPTER flag in their891891+ * &drm_bridge->ops.892892+ *893893+ * Returns:894894+ * 0 on success, a negative error code otherwise895895+ */872896 int (*hdmi_cec_enable)(struct drm_bridge *bridge, bool enable);873897898898+ /**899899+ * @hdmi_cec_log_addr:900900+ *901901+ * Set the logical address of the CEC adapter inside the bridge.902902+ *903903+ * This callback is optional, it can be implemented by bridges that904904+ * set the @DRM_BRIDGE_OP_HDMI_CEC_ADAPTER flag in their905905+ * &drm_bridge->ops.906906+ *907907+ * Returns:908908+ * 0 on success, a negative error code otherwise909909+ */874910 int (*hdmi_cec_log_addr)(struct drm_bridge *bridge, u8 logical_addr);875911912912+ /**913913+ * @hdmi_cec_transmit:914914+ *915915+ * Transmit the message using the CEC adapter inside the bridge.916916+ *917917+ * This callback is optional, it can be implemented by bridges that918918+ * set the @DRM_BRIDGE_OP_HDMI_CEC_ADAPTER flag in their919919+ * &drm_bridge->ops.920920+ *921921+ * Returns:922922+ * 0 on success, a negative error code otherwise923923+ */876924 int (*hdmi_cec_transmit)(struct drm_bridge *bridge, u8 attempts,877925 u32 signal_free_time, struct cec_msg *msg);878926
···20712071 * @max_pacing_offload_horizon: max EDT offload horizon in nsec.20722072 * @napi_config: An array of napi_config structures containing per-NAPI20732073 * settings.20742074+ * @num_napi_configs: number of allocated NAPI config structs,20752075+ * always >= max(num_rx_queues, num_tx_queues).20742076 * @gro_flush_timeout: timeout for GRO layer in NAPI20752077 * @napi_defer_hard_irqs: If not zero, provides a counter that would20762078 * allow to avoid NIC hard IRQ, on busy queues.···2484248224852483 u64 max_pacing_offload_horizon;24862484 struct napi_config *napi_config;24872487- unsigned long gro_flush_timeout;24852485+ u32 num_napi_configs;24882486 u32 napi_defer_hard_irqs;24872487+ unsigned long gro_flush_timeout;2489248824902489 /**24912490 * @up: copy of @state's IFF_UP, but safe to read with just @lock.
+17-12
include/linux/sched.h
···2152215221532153static inline void __set_task_blocked_on(struct task_struct *p, struct mutex *m)21542154{21552155+ struct mutex *blocked_on = READ_ONCE(p->blocked_on);21562156+21552157 WARN_ON_ONCE(!m);21562158 /* The task should only be setting itself as blocked */21572159 WARN_ON_ONCE(p != current);···21642162 * with a different mutex. Note, setting it to the same21652163 * lock repeatedly is ok.21662164 */21672167- WARN_ON_ONCE(p->blocked_on && p->blocked_on != m);21682168- p->blocked_on = m;21652165+ WARN_ON_ONCE(blocked_on && blocked_on != m);21662166+ WRITE_ONCE(p->blocked_on, m);21692167}2170216821712169static inline void set_task_blocked_on(struct task_struct *p, struct mutex *m)···2176217421772175static inline void __clear_task_blocked_on(struct task_struct *p, struct mutex *m)21782176{21792179- WARN_ON_ONCE(!m);21802180- /* Currently we serialize blocked_on under the mutex::wait_lock */21812181- lockdep_assert_held_once(&m->wait_lock);21822182- /*21832183- * There may be cases where we re-clear already cleared21842184- * blocked_on relationships, but make sure we are not21852185- * clearing the relationship with a different lock.21862186- */21872187- WARN_ON_ONCE(m && p->blocked_on && p->blocked_on != m);21882188- p->blocked_on = NULL;21772177+ if (m) {21782178+ struct mutex *blocked_on = READ_ONCE(p->blocked_on);21792179+21802180+ /* Currently we serialize blocked_on under the mutex::wait_lock */21812181+ lockdep_assert_held_once(&m->wait_lock);21822182+ /*21832183+ * There may be cases where we re-clear already cleared21842184+ * blocked_on relationships, but make sure we are not21852185+ * clearing the relationship with a different lock.21862186+ */21872187+ WARN_ON_ONCE(blocked_on && blocked_on != m);21882188+ }21892189+ WRITE_ONCE(p->blocked_on, NULL);21892190}2190219121912192static inline void clear_task_blocked_on(struct task_struct *p, struct mutex *m)
+5-1
include/net/devlink.h
···7878 * @flavour: flavour of the port7979 * @split: indicates if this is split port8080 * @splittable: indicates if the port can be split.8181+ * @no_phys_port_name: skip automatic phys_port_name generation; for8282+ * compatibility only, newly added driver/port instance8383+ * should never set this.8184 * @lanes: maximum number of lanes the port supports. 0 value is not passed to netlink.8285 * @switch_id: if the port is part of switch, this is buffer with ID, otherwise this is NULL8386 * @phys: physical port attributes···9087 */9188struct devlink_port_attrs {9289 u8 split:1,9393- splittable:1;9090+ splittable:1,9191+ no_phys_port_name:1;9492 u32 lanes;9593 enum devlink_port_flavour flavour;9694 struct netdev_phys_item_id switch_id;
···7171 struct list_head wait_psock_list;7272 struct sk_buff *seq_skb;7373 struct mutex tx_mutex;7474- u32 tx_stopped : 1;75747675 /* Don't use bit fields here, these are set under different locks */7776 bool tx_wait;
···319319{320320 if (can_do_masked_user_access())321321 to = masked_user_access_begin(to);322322- else if (!user_read_access_begin(to, sizeof(*to)))322322+ else if (!user_write_access_begin(to, sizeof(*to)))323323 return -EFAULT;324324 unsafe_put_user(val, to, Efault);325325- user_read_access_end();325325+ user_write_access_end();326326 return 0;327327Efault:328328- user_read_access_end();328328+ user_write_access_end();329329 return -EFAULT;330330}331331
+1
kernel/kthread.c
···893893894894 return ret;895895}896896+EXPORT_SYMBOL_GPL(kthread_affine_preferred);896897897898/*898899 * Re-affine kthreads according to their preferences
+5-1
kernel/locking/ww_mutex.h
···342342 * When waking up the task to wound, be sure to clear the343343 * blocked_on pointer. Otherwise we can see circular344344 * blocked_on relationships that can't resolve.345345+ *346346+ * NOTE: We pass NULL here instead of lock, because we347347+ * are waking the mutex owner, who may be currently348348+ * blocked on a different mutex.345349 */346346- __clear_task_blocked_on(owner, lock);350350+ __clear_task_blocked_on(owner, NULL);347351 wake_q_add(wake_q, owner);348352 }349353 return true;
···763763 cpu_online(rdp->cpu)) {764764 // Get scheduler to re-evaluate and call hooks.765765 // If !IRQ_WORK, FQS scan will eventually IPI.766766- rdp->defer_qs_iw =767767- IRQ_WORK_INIT_HARD(rcu_preempt_deferred_qs_handler);768766 rdp->defer_qs_iw_pending = DEFER_QS_PENDING;769767 irq_work_queue_on(&rdp->defer_qs_iw, rdp->cpu);770768 }···902904 }903905}904906907907+static void rcu_preempt_deferred_qs_init(struct rcu_data *rdp)908908+{909909+ rdp->defer_qs_iw = IRQ_WORK_INIT_HARD(rcu_preempt_deferred_qs_handler);910910+}905911#else /* #ifdef CONFIG_PREEMPT_RCU */906912907913/*···11041102{11051103 WARN_ON_ONCE(!list_empty(&rnp->blkd_tasks));11061104}11051105+11061106+static void rcu_preempt_deferred_qs_init(struct rcu_data *rdp) { }1107110711081108#endif /* #else #ifdef CONFIG_PREEMPT_RCU */11091109
+1-1
lib/ref_tracker.c
···434434 if (dentry && !xa_is_err(dentry))435435 return;436436437437- ret = snprintf(name, sizeof(name), "%s@%px", dir->class, dir);437437+ ret = snprintf(name, sizeof(name), "%s@%p", dir->class, dir);438438 name[sizeof(name) - 1] = '\0';439439440440 if (ret < sizeof(name)) {
+1-1
mm/kasan/kasan_test_c.c
···4747 * Some tests use these global variables to store return values from function4848 * calls that could otherwise be eliminated by the compiler as dead code.4949 */5050-static volatile void *kasan_ptr_result;5050+static void *volatile kasan_ptr_result;5151static volatile int kasan_int_result;52525353/* Probe for console output: obtains test_status lines of interest. */
+1-1
mm/khugepaged.c
···11721172 if (result != SCAN_SUCCEED)11731173 goto out_up_write;11741174 /* check if the pmd is still valid */11751175+ vma_start_write(vma);11751176 result = check_pmd_still_valid(mm, address, pmd);11761177 if (result != SCAN_SUCCEED)11771178 goto out_up_write;1178117911791179- vma_start_write(vma);11801180 anon_vma_lock_write(vma->anon_vma);1181118111821182 mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, mm, address,
+9-1
mm/kmemleak.c
···470470{471471 unsigned long flags;472472 struct kmemleak_object *object;473473+ bool warn = false;473474474475 /* try the slab allocator first */475476 if (object_cache) {···489488 else if (mem_pool_free_count)490489 object = &mem_pool[--mem_pool_free_count];491490 else492492- pr_warn_once("Memory pool empty, consider increasing CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE\n");491491+ warn = true;493492 raw_spin_unlock_irqrestore(&kmemleak_lock, flags);493493+ if (warn)494494+ pr_warn_once("Memory pool empty, consider increasing CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE\n");494495495496 return object;496497}···21842181static void __kmemleak_do_cleanup(void)21852182{21862183 struct kmemleak_object *object, *tmp;21842184+ unsigned int cnt = 0;2187218521882186 /*21892187 * Kmemleak has already been disabled, no need for RCU list traversal···21932189 list_for_each_entry_safe(object, tmp, &object_list, object_list) {21942190 __remove_object(object);21952191 __delete_object(object);21922192+21932193+ /* Call cond_resched() once per 64 iterations to avoid soft lockup */21942194+ if (!(++cnt & 0x3f))21952195+ cond_resched();21962196 }21972197}21982198
+10-13
mm/mprotect.c
···120120121121static bool prot_numa_skip(struct vm_area_struct *vma, unsigned long addr,122122 pte_t oldpte, pte_t *pte, int target_node,123123- struct folio **foliop)123123+ struct folio *folio)124124{125125- struct folio *folio = NULL;126125 bool ret = true;127126 bool toptier;128127 int nid;···130131 if (pte_protnone(oldpte))131132 goto skip;132133133133- folio = vm_normal_folio(vma, addr, oldpte);134134 if (!folio)135135 goto skip;136136···171173 folio_xchg_access_time(folio, jiffies_to_msecs(jiffies));172174173175skip:174174- *foliop = folio;175176 return ret;176177}177178···228231 * retrieve sub-batches.229232 */230233static void commit_anon_folio_batch(struct vm_area_struct *vma,231231- struct folio *folio, unsigned long addr, pte_t *ptep,234234+ struct folio *folio, struct page *first_page, unsigned long addr, pte_t *ptep,232235 pte_t oldpte, pte_t ptent, int nr_ptes, struct mmu_gather *tlb)233236{234234- struct page *first_page = folio_page(folio, 0);235237 bool expected_anon_exclusive;236238 int sub_batch_idx = 0;237239 int len;···247251}248252249253static void set_write_prot_commit_flush_ptes(struct vm_area_struct *vma,250250- struct folio *folio, unsigned long addr, pte_t *ptep,254254+ struct folio *folio, struct page *page, unsigned long addr, pte_t *ptep,251255 pte_t oldpte, pte_t ptent, int nr_ptes, struct mmu_gather *tlb)252256{253257 bool set_write;···266270 /* idx = */ 0, set_write, tlb);267271 return;268272 }269269- commit_anon_folio_batch(vma, folio, addr, ptep, oldpte, ptent, nr_ptes, tlb);273273+ commit_anon_folio_batch(vma, folio, page, addr, ptep, oldpte, ptent, nr_ptes, tlb);270274}271275272276static long change_pte_range(struct mmu_gather *tlb,···301305 const fpb_t flags = FPB_RESPECT_SOFT_DIRTY | FPB_RESPECT_WRITE;302306 int max_nr_ptes = (end - addr) >> PAGE_SHIFT;303307 struct folio *folio = NULL;308308+ struct page *page;304309 pte_t ptent;305310311311+ page = vm_normal_page(vma, addr, oldpte);312312+ if (page)313313+ folio = page_folio(page);306314 /*307315 * Avoid trapping faults against the zero or KSM308316 * pages. See similar comment in change_huge_pmd.309317 */310318 if (prot_numa) {311319 int ret = prot_numa_skip(vma, addr, oldpte, pte,312312- target_node, &folio);320320+ target_node, folio);313321 if (ret) {314322315323 /* determine batch to skip */···322322 continue;323323 }324324 }325325-326326- if (!folio)327327- folio = vm_normal_folio(vma, addr, oldpte);328325329326 nr_ptes = mprotect_folio_pte_batch(folio, pte, oldpte, max_nr_ptes, flags);330327···348351 */349352 if ((cp_flags & MM_CP_TRY_CHANGE_WRITABLE) &&350353 !pte_write(ptent))351351- set_write_prot_commit_flush_ptes(vma, folio,354354+ set_write_prot_commit_flush_ptes(vma, folio, page,352355 addr, pte, oldpte, ptent, nr_ptes, tlb);353356 else354357 prot_commit_flush_ptes(vma, addr, pte, oldpte, ptent,
+4
mm/mremap.c
···179179 if (max_nr == 1)180180 return 1;181181182182+ /* Avoid expensive folio lookup if we stand no chance of benefit. */183183+ if (pte_batch_hint(ptep, pte) == 1)184184+ return 1;185185+182186 folio = vm_normal_folio(vma, addr, pte);183187 if (!folio || !folio_test_large(folio))184188 return 1;
+9-6
mm/userfaultfd.c
···18211821 /* Check if we can move the pmd without splitting it. */18221822 if (move_splits_huge_pmd(dst_addr, src_addr, src_start + len) ||18231823 !pmd_none(dst_pmdval)) {18241824- struct folio *folio = pmd_folio(*src_pmd);18241824+ /* Can be a migration entry */18251825+ if (pmd_present(*src_pmd)) {18261826+ struct folio *folio = pmd_folio(*src_pmd);1825182718261826- if (!folio || (!is_huge_zero_folio(folio) &&18271827- !PageAnonExclusive(&folio->page))) {18281828- spin_unlock(ptl);18291829- err = -EBUSY;18301830- break;18281828+ if (!is_huge_zero_folio(folio) &&18291829+ !PageAnonExclusive(&folio->page)) {18301830+ spin_unlock(ptl);18311831+ err = -EBUSY;18321832+ break;18331833+ }18311834 }1832183518331836 spin_unlock(ptl);
···69996999 enum netdev_napi_threaded threaded)70007000{70017001 struct napi_struct *napi;70027002- int err = 0;70027002+ int i, err = 0;7003700370047004 netdev_assert_locked_or_invisible(dev);70057005···70207020 /* The error should not occur as the kthreads are already created. */70217021 list_for_each_entry(napi, &dev->napi_list, dev_list)70227022 WARN_ON_ONCE(napi_set_threaded(napi, threaded));70237023+70247024+ /* Override the config for all NAPIs even if currently not listed */70257025+ for (i = 0; i < dev->num_napi_configs; i++)70267026+ dev->napi_config[i].threaded = threaded;7023702770247028 return err;70257029}···73577353 * Clear dev->threaded if kthread creation failed so that73587354 * threaded mode will not be enabled in napi_enable().73597355 */73607360- if (dev->threaded && napi_kthread_create(napi))73617361- dev->threaded = NETDEV_NAPI_THREADED_DISABLED;73567356+ if (napi_get_threaded_config(dev, napi))73577357+ if (napi_kthread_create(napi))73587358+ dev->threaded = NETDEV_NAPI_THREADED_DISABLED;73627359 netif_napi_set_irq_locked(napi, -1);73637360}73647361EXPORT_SYMBOL(netif_napi_add_weight_locked);···1187811873 goto free_all;1187911874 dev->cfg_pending = dev->cfg;11880118751187611876+ dev->num_napi_configs = maxqs;1188111877 napi_config_sz = array_size(maxqs, sizeof(*dev->napi_config));1188211878 dev->napi_config = kvzalloc(napi_config_sz, GFP_KERNEL_ACCOUNT);1188311879 if (!dev->napi_config)
···12011201 pool->xdp_mem_id = mem->id;12021202}1203120312041204+/**12051205+ * page_pool_enable_direct_recycling() - mark page pool as owned by NAPI12061206+ * @pool: page pool to modify12071207+ * @napi: NAPI instance to associate the page pool with12081208+ *12091209+ * Associate a page pool with a NAPI instance for lockless page recycling.12101210+ * This is useful when a new page pool has to be added to a NAPI instance12111211+ * without disabling that NAPI instance, to mark the point at which control12121212+ * path "hands over" the page pool to the NAPI instance. In most cases driver12131213+ * can simply set the @napi field in struct page_pool_params, and does not12141214+ * have to call this helper.12151215+ *12161216+ * The function is idempotent, but does not implement any refcounting.12171217+ * Single page_pool_disable_direct_recycling() will disable recycling,12181218+ * no matter how many times enable was called.12191219+ */12201220+void page_pool_enable_direct_recycling(struct page_pool *pool,12211221+ struct napi_struct *napi)12221222+{12231223+ if (READ_ONCE(pool->p.napi) == napi)12241224+ return;12251225+ WARN_ON(!napi || pool->p.napi);12261226+12271227+ mutex_lock(&page_pools_lock);12281228+ WRITE_ONCE(pool->p.napi, napi);12291229+ mutex_unlock(&page_pools_lock);12301230+}12311231+EXPORT_SYMBOL(page_pool_enable_direct_recycling);12321232+12041233void page_pool_disable_direct_recycling(struct page_pool *pool)12051234{12061235 /* Disable direct recycling based on pool->cpuid.
+1-1
net/devlink/port.c
···15191519 struct devlink_port_attrs *attrs = &devlink_port->attrs;15201520 int n = 0;1521152115221522- if (!devlink_port->attrs_set)15221522+ if (!devlink_port->attrs_set || devlink_port->attrs.no_phys_port_name)15231523 return -EOPNOTSUPP;1524152415251525 switch (attrs->flavour) {
+3
net/ipv4/netfilter/Kconfig
···1414config IP_NF_IPTABLES_LEGACY1515 tristate "Legacy IP tables support"1616 depends on NETFILTER_XTABLES_LEGACY1717+ depends on NETFILTER_XTABLES1718 default m if NETFILTER_XTABLES_LEGACY1819 help1920 iptables is a legacy packet classifier.···327326config IP_NF_ARPTABLES328327 tristate "Legacy ARPTABLES support"329328 depends on NETFILTER_XTABLES_LEGACY329329+ depends on NETFILTER_XTABLES330330 default n331331 help332332 arptables is a legacy packet classifier.···345343 select IP_NF_ARPTABLES346344 select NETFILTER_FAMILY_ARP347345 depends on NETFILTER_XTABLES_LEGACY346346+ depends on NETFILTER_XTABLES348347 help349348 ARP packet filtering defines a table `filter', which has a series of350349 rules for simple ARP packet filtering at local input and
···1010config IP6_NF_IPTABLES_LEGACY1111 tristate "Legacy IP6 tables support"1212 depends on INET && IPV6 && NETFILTER_XTABLES_LEGACY1313+ depends on NETFILTER_XTABLES1314 default m if NETFILTER_XTABLES_LEGACY1415 help1516 ip6tables is a legacy packet classifier.
+1-1
net/ipv6/xfrm6_tunnel.c
···334334 struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net);335335 unsigned int i;336336337337- xfrm_state_flush(net, IPSEC_PROTO_ANY, false);337337+ xfrm_state_flush(net, 0, false);338338 xfrm_flush_gc();339339340340 for (i = 0; i < XFRM6_TUNNEL_SPI_BYADDR_HSIZE; i++)
+2-8
net/kcm/kcmsock.c
···430430431431 /* Check if the socket is reserved so someone is waiting for sending. */432432 kcm = psock->tx_kcm;433433- if (kcm && !unlikely(kcm->tx_stopped))433433+ if (kcm)434434 queue_work(kcm_wq, &kcm->tx_work);435435436436 spin_unlock_bh(&mux->lock);···16931693 */16941694 __skb_queue_purge(&sk->sk_write_queue);1695169516961696- /* Set tx_stopped. This is checked when psock is bound to a kcm and we16971697- * get a writespace callback. This prevents further work being queued16981698- * from the callback (unbinding the psock occurs after canceling work.16991699- */17001700- kcm->tx_stopped = 1;17011701-17021696 release_sock(sk);1703169717041698 spin_lock_bh(&mux->lock);···17081714 /* Cancel work. After this point there should be no outside references17091715 * to the kcm socket.17101716 */17111711- cancel_work_sync(&kcm->tx_work);17171717+ disable_work_sync(&kcm->tx_work);1712171817131719 lock_sock(sk);17141720 psock = kcm->tx_psock;
···884884885885static int ctnetlink_done(struct netlink_callback *cb)886886{887887- if (cb->args[1])888888- nf_ct_put((struct nf_conn *)cb->args[1]);889887 kfree(cb->data);890888 return 0;891889}···12061208 return 0;12071209}1208121012111211+static unsigned long ctnetlink_get_id(const struct nf_conn *ct)12121212+{12131213+ unsigned long id = nf_ct_get_id(ct);12141214+12151215+ return id ? id : 1;12161216+}12171217+12091218static int12101219ctnetlink_dump_table(struct sk_buff *skb, struct netlink_callback *cb)12111220{12121221 unsigned int flags = cb->data ? NLM_F_DUMP_FILTERED : 0;12131222 struct net *net = sock_net(skb->sk);12141214- struct nf_conn *ct, *last;12231223+ unsigned long last_id = cb->args[1];12151224 struct nf_conntrack_tuple_hash *h;12161225 struct hlist_nulls_node *n;12171226 struct nf_conn *nf_ct_evict[8];12271227+ struct nf_conn *ct;12181228 int res, i;12191229 spinlock_t *lockp;1220123012211221- last = (struct nf_conn *)cb->args[1];12221231 i = 0;1223123212241233 local_bh_disable();···12621257 continue;1263125812641259 if (cb->args[1]) {12651265- if (ct != last)12601260+ if (ctnetlink_get_id(ct) != last_id)12661261 continue;12671262 cb->args[1] = 0;12681263 }···12751270 NFNL_MSG_TYPE(cb->nlh->nlmsg_type),12761271 ct, true, flags);12771272 if (res < 0) {12781278- nf_conntrack_get(&ct->ct_general);12791279- cb->args[1] = (unsigned long)ct;12731273+ cb->args[1] = ctnetlink_get_id(ct);12801274 spin_unlock(lockp);12811275 goto out;12821276 }···12881284 }12891285out:12901286 local_bh_enable();12911291- if (last) {12871287+ if (last_id) {12921288 /* nf ct hash resize happened, now clear the leftover. */12931293- if ((struct nf_conn *)cb->args[1] == last)12891289+ if (cb->args[1] == last_id)12941290 cb->args[1] = 0;12951295-12961296- nf_ct_put(last);12971291 }1298129212991293 while (i) {···31703168 return 0;31713169}31723170#endif31733173-static int ctnetlink_exp_done(struct netlink_callback *cb)31713171+31723172+static unsigned long ctnetlink_exp_id(const struct nf_conntrack_expect *exp)31743173{31753175- if (cb->args[1])31763176- nf_ct_expect_put((struct nf_conntrack_expect *)cb->args[1]);31773177- return 0;31743174+ unsigned long id = (unsigned long)exp;31753175+31763176+ id += nf_ct_get_id(exp->master);31773177+ id += exp->class;31783178+31793179+ return id ? id : 1;31783180}3179318131803182static int31813183ctnetlink_exp_dump_table(struct sk_buff *skb, struct netlink_callback *cb)31823184{31833185 struct net *net = sock_net(skb->sk);31843184- struct nf_conntrack_expect *exp, *last;31853186 struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh);31863187 u_int8_t l3proto = nfmsg->nfgen_family;31883188+ unsigned long last_id = cb->args[1];31893189+ struct nf_conntrack_expect *exp;3187319031883191 rcu_read_lock();31893189- last = (struct nf_conntrack_expect *)cb->args[1];31903192 for (; cb->args[0] < nf_ct_expect_hsize; cb->args[0]++) {31913193restart:31923194 hlist_for_each_entry_rcu(exp, &nf_ct_expect_hash[cb->args[0]],···32023196 continue;3203319732043198 if (cb->args[1]) {32053205- if (exp != last)31993199+ if (ctnetlink_exp_id(exp) != last_id)32063200 continue;32073201 cb->args[1] = 0;32083202 }···32113205 cb->nlh->nlmsg_seq,32123206 IPCTNL_MSG_EXP_NEW,32133207 exp) < 0) {32143214- if (!refcount_inc_not_zero(&exp->use))32153215- continue;32163216- cb->args[1] = (unsigned long)exp;32083208+ cb->args[1] = ctnetlink_exp_id(exp);32173209 goto out;32183210 }32193211 }···32223218 }32233219out:32243220 rcu_read_unlock();32253225- if (last)32263226- nf_ct_expect_put(last);32273227-32283221 return skb->len;32293222}3230322332313224static int32323225ctnetlink_exp_ct_dump_table(struct sk_buff *skb, struct netlink_callback *cb)32333226{32343234- struct nf_conntrack_expect *exp, *last;32353227 struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh);32363228 struct nf_conn *ct = cb->data;32373229 struct nf_conn_help *help = nfct_help(ct);32383230 u_int8_t l3proto = nfmsg->nfgen_family;32313231+ unsigned long last_id = cb->args[1];32323232+ struct nf_conntrack_expect *exp;3239323332403234 if (cb->args[0])32413235 return 0;3242323632433237 rcu_read_lock();32443244- last = (struct nf_conntrack_expect *)cb->args[1];32383238+32453239restart:32463240 hlist_for_each_entry_rcu(exp, &help->expectations, lnode) {32473241 if (l3proto && exp->tuple.src.l3num != l3proto)32483242 continue;32493243 if (cb->args[1]) {32503250- if (exp != last)32443244+ if (ctnetlink_exp_id(exp) != last_id)32513245 continue;32523246 cb->args[1] = 0;32533247 }···32533251 cb->nlh->nlmsg_seq,32543252 IPCTNL_MSG_EXP_NEW,32553253 exp) < 0) {32563256- if (!refcount_inc_not_zero(&exp->use))32573257- continue;32583258- cb->args[1] = (unsigned long)exp;32543254+ cb->args[1] = ctnetlink_exp_id(exp);32593255 goto out;32603256 }32613257 }···32643264 cb->args[0] = 1;32653265out:32663266 rcu_read_unlock();32673267- if (last)32683268- nf_ct_expect_put(last);32693269-32703267 return skb->len;32713268}32723269···32823285 struct nf_conntrack_zone zone;32833286 struct netlink_dump_control c = {32843287 .dump = ctnetlink_exp_ct_dump_table,32853285- .done = ctnetlink_exp_done,32863288 };3287328932883290 err = ctnetlink_parse_tuple(cda, &tuple, CTA_EXPECT_MASTER,···33313335 else {33323336 struct netlink_dump_control c = {33333337 .dump = ctnetlink_exp_dump_table,33343334- .done = ctnetlink_exp_done,33353338 };33363339 return netlink_dump_start(info->sk, skb, info->nlh, &c);33373340 }
+3-3
net/netfilter/nf_conntrack_standalone.c
···567567 return ret;568568569569 if (*(u8 *)table->data == 0)570570- return ret;570570+ return 0;571571572572 /* Load nf_log_syslog only if no logger is currently registered */573573 for (i = 0; i < NFPROTO_NUMPROTO; i++) {574574 if (nf_log_is_registered(i))575575- return ret;575575+ return 0;576576 }577577 request_module("%s", "nf_log_syslog");578578579579- return ret;579579+ return 0;580580}581581582582static struct ctl_table_header *nf_ct_netfilter_header;
···217217218218 level += err;219219 /* Implies a giant cgroup tree */220220- if (WARN_ON_ONCE(level > 255))220220+ if (level > 255)221221 return -EOPNOTSUPP;222222223223 priv->level = level;
+6-5
net/sched/sch_ets.c
···651651652652 sch_tree_lock(sch);653653654654+ for (i = nbands; i < oldbands; i++) {655655+ if (i >= q->nstrict && q->classes[i].qdisc->q.qlen)656656+ list_del_init(&q->classes[i].alist);657657+ qdisc_purge_queue(q->classes[i].qdisc);658658+ }659659+654660 WRITE_ONCE(q->nbands, nbands);655661 for (i = nstrict; i < q->nstrict; i++) {656662 if (q->classes[i].qdisc->q.qlen) {657663 list_add_tail(&q->classes[i].alist, &q->active);658664 q->classes[i].deficit = quanta[i];659665 }660660- }661661- for (i = q->nbands; i < oldbands; i++) {662662- if (i >= q->nstrict && q->classes[i].qdisc->q.qlen)663663- list_del_init(&q->classes[i].alist);664664- qdisc_purge_queue(q->classes[i].qdisc);665666 }666667 WRITE_ONCE(q->nstrict, nstrict);667668 memcpy(q->prio2band, priomap, sizeof(priomap));
+1-1
net/sctp/input.c
···117117 * it's better to just linearize it otherwise crc computing118118 * takes longer.119119 */120120- if ((!is_gso && skb_linearize(skb)) ||120120+ if (((!is_gso || skb_cloned(skb)) && skb_linearize(skb)) ||121121 !pskb_may_pull(skb, sizeof(struct sctphdr)))122122 goto discard_it;123123
+35-8
net/sunrpc/svcsock.c
···257257}258258259259static int260260-svc_tcp_sock_recv_cmsg(struct svc_sock *svsk, struct msghdr *msg)260260+svc_tcp_sock_recv_cmsg(struct socket *sock, unsigned int *msg_flags)261261{262262 union {263263 struct cmsghdr cmsg;264264 u8 buf[CMSG_SPACE(sizeof(u8))];265265 } u;266266- struct socket *sock = svsk->sk_sock;266266+ u8 alert[2];267267+ struct kvec alert_kvec = {268268+ .iov_base = alert,269269+ .iov_len = sizeof(alert),270270+ };271271+ struct msghdr msg = {272272+ .msg_flags = *msg_flags,273273+ .msg_control = &u,274274+ .msg_controllen = sizeof(u),275275+ };267276 int ret;268277269269- msg->msg_control = &u;270270- msg->msg_controllen = sizeof(u);278278+ iov_iter_kvec(&msg.msg_iter, ITER_DEST, &alert_kvec, 1,279279+ alert_kvec.iov_len);280280+ ret = sock_recvmsg(sock, &msg, MSG_DONTWAIT);281281+ if (ret > 0 &&282282+ tls_get_record_type(sock->sk, &u.cmsg) == TLS_RECORD_TYPE_ALERT) {283283+ iov_iter_revert(&msg.msg_iter, ret);284284+ ret = svc_tcp_sock_process_cmsg(sock, &msg, &u.cmsg, -EAGAIN);285285+ }286286+ return ret;287287+}288288+289289+static int290290+svc_tcp_sock_recvmsg(struct svc_sock *svsk, struct msghdr *msg)291291+{292292+ int ret;293293+ struct socket *sock = svsk->sk_sock;294294+271295 ret = sock_recvmsg(sock, msg, MSG_DONTWAIT);272272- if (unlikely(msg->msg_controllen != sizeof(u)))273273- ret = svc_tcp_sock_process_cmsg(sock, msg, &u.cmsg, ret);296296+ if (msg->msg_flags & MSG_CTRUNC) {297297+ msg->msg_flags &= ~(MSG_CTRUNC | MSG_EOR);298298+ if (ret == 0 || ret == -EIO)299299+ ret = svc_tcp_sock_recv_cmsg(sock, &msg->msg_flags);300300+ }274301 return ret;275302}276303···348321 iov_iter_advance(&msg.msg_iter, seek);349322 buflen -= seek;350323 }351351- len = svc_tcp_sock_recv_cmsg(svsk, &msg);324324+ len = svc_tcp_sock_recvmsg(svsk, &msg);352325 if (len > 0)353326 svc_flush_bvec(bvec, len, seek);354327···10451018 iov.iov_base = ((char *)&svsk->sk_marker) + svsk->sk_tcplen;10461019 iov.iov_len = want;10471020 iov_iter_kvec(&msg.msg_iter, ITER_DEST, &iov, 1, want);10481048- len = svc_tcp_sock_recv_cmsg(svsk, &msg);10211021+ len = svc_tcp_sock_recvmsg(svsk, &msg);10491022 if (len < 0)10501023 return len;10511024 svsk->sk_tcplen += len;
···689689 unsigned int i;690690691691 for (i = 0; i < MAX_PORT_RETRIES; i++) {692692- if (port <= LAST_RESERVED_PORT)692692+ if (port == VMADDR_PORT_ANY ||693693+ port <= LAST_RESERVED_PORT)693694 port = LAST_RESERVED_PORT + 1;694695695696 new_addr.svm_port = port++;
+9-3
net/xfrm/xfrm_device.c
···155155 return skb;156156 }157157158158- if (skb_is_gso(skb) && unlikely(xmit_xfrm_check_overflow(skb))) {158158+ if (skb_is_gso(skb) && (unlikely(x->xso.dev != dev) ||159159+ unlikely(xmit_xfrm_check_overflow(skb)))) {159160 struct sk_buff *segs;160161161162 /* Packet got rerouted, fixup features and segment it. */···416415 struct net_device *dev = x->xso.dev;417416 bool check_tunnel_size;418417419419- if (x->xso.type == XFRM_DEV_OFFLOAD_UNSPECIFIED)418418+ if (!x->type_offload ||419419+ (x->xso.type == XFRM_DEV_OFFLOAD_UNSPECIFIED && x->encap))420420 return false;421421422422- if ((dev == xfrm_dst_path(dst)->dev) && !xdst->child->xfrm) {422422+ if ((!dev || dev == xfrm_dst_path(dst)->dev) &&423423+ !xdst->child->xfrm) {423424 mtu = xfrm_state_mtu(x, xdst->child_mtu_cached);424425 if (skb->len <= mtu)425426 goto ok;···433430 return false;434431435432ok:433433+ if (!dev)434434+ return true;435435+436436 check_tunnel_size = x->xso.type == XFRM_DEV_OFFLOAD_PACKET &&437437 x->props.mode == XFRM_MODE_TUNNEL;438438 switch (x->props.family) {
···393393 return 0;394394}395395396396-static int cs35l63_sdw_kick_divider(struct cs35l56_private *cs35l56,397397- struct sdw_slave *peripheral)398398-{399399- unsigned int curr_scale_reg, next_scale_reg;400400- int curr_scale, next_scale, ret;401401-402402- if (!cs35l56->base.init_done)403403- return 0;404404-405405- if (peripheral->bus->params.curr_bank) {406406- curr_scale_reg = SDW_SCP_BUSCLOCK_SCALE_B1;407407- next_scale_reg = SDW_SCP_BUSCLOCK_SCALE_B0;408408- } else {409409- curr_scale_reg = SDW_SCP_BUSCLOCK_SCALE_B0;410410- next_scale_reg = SDW_SCP_BUSCLOCK_SCALE_B1;411411- }412412-413413- /*414414- * Current clock scale value must be different to new value.415415- * Modify current to guarantee this. If next still has the dummy416416- * value we wrote when it was current, the core code has not set417417- * a new scale so restore its original good value418418- */419419- curr_scale = sdw_read_no_pm(peripheral, curr_scale_reg);420420- if (curr_scale < 0) {421421- dev_err(cs35l56->base.dev, "Failed to read current clock scale: %d\n", curr_scale);422422- return curr_scale;423423- }424424-425425- next_scale = sdw_read_no_pm(peripheral, next_scale_reg);426426- if (next_scale < 0) {427427- dev_err(cs35l56->base.dev, "Failed to read next clock scale: %d\n", next_scale);428428- return next_scale;429429- }430430-431431- if (next_scale == CS35L56_SDW_INVALID_BUS_SCALE) {432432- next_scale = cs35l56->old_sdw_clock_scale;433433- ret = sdw_write_no_pm(peripheral, next_scale_reg, next_scale);434434- if (ret < 0) {435435- dev_err(cs35l56->base.dev, "Failed to modify current clock scale: %d\n",436436- ret);437437- return ret;438438- }439439- }440440-441441- cs35l56->old_sdw_clock_scale = curr_scale;442442- ret = sdw_write_no_pm(peripheral, curr_scale_reg, CS35L56_SDW_INVALID_BUS_SCALE);443443- if (ret < 0) {444444- dev_err(cs35l56->base.dev, "Failed to modify current clock scale: %d\n", ret);445445- return ret;446446- }447447-448448- dev_dbg(cs35l56->base.dev, "Next bus scale: %#x\n", next_scale);449449-450450- return 0;451451-}452452-453453-static int cs35l56_sdw_bus_config(struct sdw_slave *peripheral,454454- struct sdw_bus_params *params)455455-{456456- struct cs35l56_private *cs35l56 = dev_get_drvdata(&peripheral->dev);457457-458458- if ((cs35l56->base.type == 0x63) && (cs35l56->base.rev < 0xa1))459459- return cs35l63_sdw_kick_divider(cs35l56, peripheral);460460-461461- return 0;462462-}463463-464396static int __maybe_unused cs35l56_sdw_clk_stop(struct sdw_slave *peripheral,465397 enum sdw_clk_stop_mode mode,466398 enum sdw_clk_stop_type type)···408476 .read_prop = cs35l56_sdw_read_prop,409477 .interrupt_callback = cs35l56_sdw_interrupt,410478 .update_status = cs35l56_sdw_update_status,411411- .bus_config = cs35l56_sdw_bus_config,412479#ifdef DEBUG413480 .clk_stop = cs35l56_sdw_clk_stop,414481#endif
+26-3
sound/soc/codecs/cs35l56-shared.c
···838838};839839EXPORT_SYMBOL_NS_GPL(cs35l56_calibration_controls, "SND_SOC_CS35L56_SHARED");840840841841+static const struct cirrus_amp_cal_controls cs35l63_calibration_controls = {842842+ .alg_id = 0xbf210,843843+ .mem_region = WMFW_ADSP2_YM,844844+ .ambient = "CAL_AMBIENT",845845+ .calr = "CAL_R",846846+ .status = "CAL_STATUS",847847+ .checksum = "CAL_CHECKSUM",848848+};849849+841850int cs35l56_get_calibration(struct cs35l56_base *cs35l56_base)842851{843852 u64 silicon_uid = 0;···921912void cs35l56_log_tuning(struct cs35l56_base *cs35l56_base, struct cs_dsp *cs_dsp)922913{923914 __be32 pid, sid, tid;915915+ unsigned int alg_id;924916 int ret;917917+918918+ switch (cs35l56_base->type) {919919+ case 0x54:920920+ case 0x56:921921+ case 0x57:922922+ alg_id = 0x9f212;923923+ break;924924+ default:925925+ alg_id = 0xbf212;926926+ break;927927+ }925928926929 scoped_guard(mutex, &cs_dsp->pwr_lock) {927930 ret = cs_dsp_coeff_read_ctrl(cs_dsp_get_ctl(cs_dsp, "AS_PRJCT_ID",928928- WMFW_ADSP2_XM, 0x9f212),931931+ WMFW_ADSP2_XM, alg_id),929932 0, &pid, sizeof(pid));930933 if (!ret)931934 ret = cs_dsp_coeff_read_ctrl(cs_dsp_get_ctl(cs_dsp, "AS_CHNNL_ID",932932- WMFW_ADSP2_XM, 0x9f212),935935+ WMFW_ADSP2_XM, alg_id),933936 0, &sid, sizeof(sid));934937 if (!ret)935938 ret = cs_dsp_coeff_read_ctrl(cs_dsp_get_ctl(cs_dsp, "AS_SNPSHT_ID",936936- WMFW_ADSP2_XM, 0x9f212),939939+ WMFW_ADSP2_XM, alg_id),937940 0, &tid, sizeof(tid));938941 }939942···995974 case 0x35A54:996975 case 0x35A56:997976 case 0x35A57:977977+ cs35l56_base->calibration_controls = &cs35l56_calibration_controls;998978 break;999979 case 0x35A630:980980+ cs35l56_base->calibration_controls = &cs35l63_calibration_controls;1000981 devid = devid >> 4;1001982 break;1002983 default:
+1-1
sound/soc/codecs/cs35l56.c
···695695 return ret;696696697697 ret = cs_amp_write_cal_coeffs(&cs35l56->dsp.cs_dsp,698698- &cs35l56_calibration_controls,698698+ cs35l56->base.calibration_controls,699699 &cs35l56->base.cal_data);700700701701 wm_adsp_stop(&cs35l56->dsp);