···3939 qcom,protection-domain:4040 $ref: /schemas/types.yaml#/definitions/string-array4141 description: |4242- Protection domain service name and path for APR service4343- possible values are::4242+ Protection domain service name and path for APR service (if supported).4343+ Possible values are::4444 "avs/audio", "msm/adsp/audio_pd".4545 "kernel/elf_loader", "msm/modem/wlan_pd".4646 "tms/servreg", "msm/adsp/audio_pd".···49495050required:5151 - reg5252- - qcom,protection-domain53525453additionalProperties: true
+1-1
Documentation/kbuild/makefiles.rst
···1042104210431043When executing "make clean", the file "crc32table.h" will be deleted.10441044Kbuild will assume files to be in the same relative directory as the10451045-Makefile, except if prefixed with $(objtree).10451045+Makefile.1046104610471047To exclude certain files or directories from make clean, use the10481048$(no-clean-files) variable.
+22-3
MAINTAINERS
···383383M: Robert Moore <robert.moore@intel.com>384384M: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>385385L: linux-acpi@vger.kernel.org386386-L: devel@acpica.org386386+L: acpica-devel@lists.linuxfoundation.org387387S: Supported388388W: https://acpica.org/389389W: https://github.com/acpica/acpica/···11041104F: arch/arm64/boot/dts/amd/1105110511061106AMD XGBE DRIVER11071107-M: Tom Lendacky <thomas.lendacky@amd.com>11081107M: "Shyam Sundar S K" <Shyam-sundar.S-k@amd.com>11091108L: netdev@vger.kernel.org11101109S: Supported···9298929992999300HISILICON DMA DRIVER93009301M: Zhou Wang <wangzhou1@hisilicon.com>93019301-M: Jie Hai <haijie1@hisilicon.com>93029302+M: Jie Hai <haijie1@huawei.com>93029303L: dmaengine@vger.kernel.org93039304S: Maintained93049305F: drivers/dma/hisi_dma.c···1574915750W: https://wireless.wiki.kernel.org/en/users/Drivers/p541575015751F: drivers/net/wireless/intersil/p54/15751157521575315753+PACKET SOCKETS1575415754+M: Willem de Bruijn <willemdebruijn.kernel@gmail.com>1575515755+S: Maintained1575615756+F: include/uapi/linux/if_packet.h1575715757+F: net/packet/af_packet.c1575815758+1575215759PACKING1575315760M: Vladimir Oltean <olteanv@gmail.com>1575415761L: netdev@vger.kernel.org···1933119326S: Orphan1933219327F: sound/soc/uniphier/19333193281932919329+SOCKET TIMESTAMPING1933019330+M: Willem de Bruijn <willemdebruijn.kernel@gmail.com>1933119331+S: Maintained1933219332+F: Documentation/networking/timestamping.rst1933319333+F: include/uapi/linux/net_tstamp.h1933419334+F: tools/testing/selftests/net/so_txtime.c1933519335+1933419336SOEKRIS NET48XX LED SUPPORT1933519337M: Chris Boot <bootc@bootc.net>1933619338S: Maintained···2175721745T: git git://linuxtv.org/media_tree.git2175821746F: Documentation/admin-guide/media/zr364xx*2175921747F: drivers/staging/media/deprecated/zr364xx/2174821748+2174921749+USER DATAGRAM PROTOCOL (UDP)2175021750+M: Willem de Bruijn <willemdebruijn.kernel@gmail.com>2175121751+S: Maintained2175221752+F: include/linux/udp.h2175321753+F: net/ipv4/udp.c2175421754+F: net/ipv6/udp.c21760217552176121756USER-MODE LINUX (UML)2176221757M: Richard Weinberger <richard@nod.at>
+15-2
Makefile
···22VERSION = 633PATCHLEVEL = 244SUBLEVEL = 055-EXTRAVERSION = -rc455+EXTRAVERSION = -rc566NAME = Hurr durr I'ma ninja sloth7788# *DOCUMENTATION*···549549CFLAGS_KERNEL =550550RUSTFLAGS_KERNEL =551551AFLAGS_KERNEL =552552-export LDFLAGS_vmlinux =552552+LDFLAGS_vmlinux =553553554554# Use USERINCLUDE when you must reference the UAPI directories only.555555USERINCLUDE := \···12481248 @:1249124912501250PHONY += vmlinux12511251+# LDFLAGS_vmlinux in the top Makefile defines linker flags for the top vmlinux,12521252+# not for decompressors. LDFLAGS_vmlinux in arch/*/boot/compressed/Makefile is12531253+# unrelated; the decompressors just happen to have the same base name,12541254+# arch/*/boot/compressed/vmlinux.12551255+# Export LDFLAGS_vmlinux only to scripts/Makefile.vmlinux.12561256+#12571257+# _LDFLAGS_vmlinux is a workaround for the 'private export' bug:12581258+# https://savannah.gnu.org/bugs/?6146312591259+# For Make > 4.4, the following simple code will work:12601260+# vmlinux: private export LDFLAGS_vmlinux := $(LDFLAGS_vmlinux)12611261+vmlinux: private _LDFLAGS_vmlinux := $(LDFLAGS_vmlinux)12621262+vmlinux: export LDFLAGS_vmlinux = $(_LDFLAGS_vmlinux)12511263vmlinux: vmlinux.o $(KBUILD_LDS) modpost12521264 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.vmlinux12531265···15451533# *.ko are usually independent of vmlinux, but CONFIG_DEBUG_INFOBTF_MODULES15461534# is an exception.15471535ifdef CONFIG_DEBUG_INFO_BTF_MODULES15361536+KBUILD_BUILTIN := 115481537modules: vmlinux15491538endif15501539
···28282929 np = of_find_compatible_node(NULL, NULL, "fsl,imx27-ccm");3030 ccm_base = of_iomap(np, 0);3131+ of_node_put(np);3132 BUG_ON(!ccm_base);3233 /*3334 * now we have access to the IO registers. As we need
···330330331331static void disable_freq_invariance_workfn(struct work_struct *work)332332{333333+ int cpu;334334+333335 static_branch_disable(&arch_scale_freq_key);336336+337337+ /*338338+ * Set arch_freq_scale to a default value on all cpus339339+ * This negates the effect of scaling340340+ */341341+ for_each_possible_cpu(cpu)342342+ per_cpu(arch_freq_scale, cpu) = SCHED_CAPACITY_SCALE;334343}335344336345static DECLARE_WORK(disable_freq_invariance_work,
+3-5
block/bfq-cgroup.c
···316316317317static void bfqg_get(struct bfq_group *bfqg)318318{319319- bfqg->ref++;319319+ refcount_inc(&bfqg->ref);320320}321321322322static void bfqg_put(struct bfq_group *bfqg)323323{324324- bfqg->ref--;325325-326326- if (bfqg->ref == 0)324324+ if (refcount_dec_and_test(&bfqg->ref))327325 kfree(bfqg);328326}329327···528530 }529531530532 /* see comments in bfq_bic_update_cgroup for why refcounting */531531- bfqg_get(bfqg);533533+ refcount_set(&bfqg->ref, 1);532534 return &bfqg->pd;533535}534536
+1-1
block/bfq-iosched.h
···928928 char blkg_path[128];929929930930 /* reference counter (see comments in bfq_bic_update_cgroup) */931931- int ref;931931+ refcount_t ref;932932 /* Is bfq_group still online? */933933 bool online;934934
+4
block/blk-cgroup.c
···14551455 list_for_each_entry_reverse(blkg, &q->blkg_list, q_node)14561456 pol->pd_init_fn(blkg->pd[pol->plid]);1457145714581458+ if (pol->pd_online_fn)14591459+ list_for_each_entry_reverse(blkg, &q->blkg_list, q_node)14601460+ pol->pd_online_fn(blkg->pd[pol->plid]);14611461+14581462 __set_bit(pol->plid, q->blkcg_pols);14591463 ret = 0;14601464
+5-1
block/blk-mq.c
···28902890 struct blk_plug *plug, struct bio **bio, unsigned int nsegs)28912891{28922892 struct request *rq;28932893+ enum hctx_type type, hctx_type;2893289428942895 if (!plug)28952896 return NULL;···29032902 return NULL;29042903 }2905290429062906- if (blk_mq_get_hctx_type((*bio)->bi_opf) != rq->mq_hctx->type)29052905+ type = blk_mq_get_hctx_type((*bio)->bi_opf);29062906+ hctx_type = rq->mq_hctx->type;29072907+ if (type != hctx_type &&29082908+ !(type == HCTX_TYPE_READ && hctx_type == HCTX_TYPE_DEFAULT))29072909 return NULL;29082910 if (op_is_flush(rq->cmd_flags) != op_is_flush((*bio)->bi_opf))29092911 return NULL;
···236236 efi_status_t status;237237 struct prm_context_buffer context;238238239239+ if (!efi_enabled(EFI_RUNTIME_SERVICES)) {240240+ pr_err_ratelimited("PRM: EFI runtime services no longer available\n");241241+ return AE_NO_HANDLER;242242+ }243243+239244 /*240245 * The returned acpi_status will always be AE_OK. Error values will be241246 * saved in the first byte of the PRM message buffer to be used by ASL.···329324 return;330325331326 pr_info("PRM: found %u modules\n", mc);327327+328328+ if (!efi_enabled(EFI_RUNTIME_SERVICES)) {329329+ pr_err("PRM: EFI runtime services unavailable\n");330330+ return;331331+ }332332333333 status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT,334334 ACPI_ADR_SPACE_PLATFORM_RT,
···997997fwnode_graph_get_next_endpoint(const struct fwnode_handle *fwnode,998998 struct fwnode_handle *prev)999999{10001000+ struct fwnode_handle *ep, *port_parent = NULL;10001001 const struct fwnode_handle *parent;10011001- struct fwnode_handle *ep;1002100210031003 /*10041004 * If this function is in a loop and the previous iteration returned10051005 * an endpoint from fwnode->secondary, then we need to use the secondary10061006 * as parent rather than @fwnode.10071007 */10081008- if (prev)10091009- parent = fwnode_graph_get_port_parent(prev);10101010- else10081008+ if (prev) {10091009+ port_parent = fwnode_graph_get_port_parent(prev);10101010+ parent = port_parent;10111011+ } else {10111012 parent = fwnode;10131013+ }10121014 if (IS_ERR_OR_NULL(parent))10131015 return NULL;1014101610151017 ep = fwnode_call_ptr_op(parent, graph_get_next_endpoint, prev);10161018 if (ep)10171017- return ep;10191019+ goto out_put_port_parent;1018102010191019- return fwnode_graph_get_next_endpoint(parent->secondary, NULL);10211021+ ep = fwnode_graph_get_next_endpoint(parent->secondary, NULL);10221022+10231023+out_put_port_parent:10241024+ fwnode_handle_put(port_parent);10251025+ return ep;10201026}10211027EXPORT_SYMBOL_GPL(fwnode_graph_get_next_endpoint);10221028
···5858#define PCI1760_CMD_CLR_IMB2 0x00 /* Clears IMB2 */5959#define PCI1760_CMD_SET_DO 0x01 /* Set output state */6060#define PCI1760_CMD_GET_DO 0x02 /* Read output status */6161-#define PCI1760_CMD_GET_STATUS 0x03 /* Read current status */6161+#define PCI1760_CMD_GET_STATUS 0x07 /* Read current status */6262#define PCI1760_CMD_GET_FW_VER 0x0e /* Read firmware version */6363#define PCI1760_CMD_GET_HW_VER 0x0f /* Read hardware version */6464#define PCI1760_CMD_SET_PWM_HI(x) (0x10 + (x) * 2) /* Set "hi" period */
+4-3
drivers/dma/dmaengine.c
···451451 /* The channel is already in use, update client count */452452 if (chan->client_count) {453453 __module_get(owner);454454- goto out;454454+ chan->client_count++;455455+ return 0;455456 }456457457458 if (!try_module_get(owner))···471470 goto err_out;472471 }473472473473+ chan->client_count++;474474+474475 if (!dma_has_cap(DMA_PRIVATE, chan->device->cap_mask))475476 balance_ref_count(chan);476477477477-out:478478- chan->client_count++;479478 return 0;480479481480err_out:
+6
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
···1018101810191019 /* The bad descriptor currently is in the head of vc list */10201020 vd = vchan_next_desc(&chan->vc);10211021+ if (!vd) {10221022+ dev_err(chan2dev(chan), "BUG: %s, IRQ with no descriptors\n",10231023+ axi_chan_name(chan));10241024+ goto out;10251025+ }10211026 /* Remove the completed descriptor from issued list */10221027 list_del(&vd->node);10231028···10371032 /* Try to restart the controller */10381033 axi_chan_start_first_queued(chan);1039103410351035+out:10401036 spin_unlock_irqrestore(&chan->vc.lock, flags);10411037}10421038
+13-3
drivers/dma/idxd/device.c
···11721172 spin_unlock(&ie->list_lock);1173117311741174 list_for_each_entry_safe(desc, itr, &flist, list) {11751175+ struct dma_async_tx_descriptor *tx;11761176+11751177 list_del(&desc->list);11761178 ctype = desc->completion->status ? IDXD_COMPLETE_NORMAL : IDXD_COMPLETE_ABORT;11791179+ /*11801180+ * wq is being disabled. Any remaining descriptors are11811181+ * likely to be stuck and can be dropped. callback could11821182+ * point to code that is no longer accessible, for example11831183+ * if dmatest module has been unloaded.11841184+ */11851185+ tx = &desc->txd;11861186+ tx->callback = NULL;11871187+ tx->callback_result = NULL;11771188 idxd_dma_complete_txd(desc, ctype, true);11781189 }11791190}···14011390err_irq:14021391 idxd_wq_unmap_portal(wq);14031392err_map_portal:14041404- rc = idxd_wq_disable(wq, false);14051405- if (rc < 0)13931393+ if (idxd_wq_disable(wq, false))14061394 dev_dbg(dev, "wq %s disable failed\n", dev_name(wq_confdev(wq)));14071395err:14081396 return rc;···14181408 dev_warn(dev, "Clients has claim on wq %d: %d\n",14191409 wq->id, idxd_wq_refcount(wq));1420141014211421- idxd_wq_free_resources(wq);14221411 idxd_wq_unmap_portal(wq);14231412 idxd_wq_drain(wq);14241413 idxd_wq_free_irq(wq);14251414 idxd_wq_reset(wq);14151415+ idxd_wq_free_resources(wq);14261416 percpu_ref_exit(&wq->wq_active);14271417 wq->type = IDXD_WQT_NONE;14281418 wq->client_count = 0;
···31433143 /* Initialize the channels */31443144 for_each_child_of_node(node, child) {31453145 err = xilinx_dma_child_probe(xdev, child);31463146- if (err < 0)31463146+ if (err < 0) {31473147+ of_node_put(child);31473148 goto error;31493149+ }31483150 }3149315131503152 if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {
+7-8
drivers/edac/edac_device.c
···3434static DEFINE_MUTEX(device_ctls_mutex);3535static LIST_HEAD(edac_device_list);36363737+/* Default workqueue processing interval on this instance, in msecs */3838+#define DEFAULT_POLL_INTERVAL 10003939+3740#ifdef CONFIG_EDAC_DEBUG3841static void edac_device_dump_device(struct edac_device_ctl_info *edac_dev)3942{···339336 * whole one second to save timers firing all over the period340337 * between integral seconds341338 */342342- if (edac_dev->poll_msec == 1000)339339+ if (edac_dev->poll_msec == DEFAULT_POLL_INTERVAL)343340 edac_queue_work(&edac_dev->work, round_jiffies_relative(edac_dev->delay));344341 else345342 edac_queue_work(&edac_dev->work, edac_dev->delay);···369366 * timers firing on sub-second basis, while they are happy370367 * to fire together on the 1 second exactly371368 */372372- if (edac_dev->poll_msec == 1000)369369+ if (edac_dev->poll_msec == DEFAULT_POLL_INTERVAL)373370 edac_queue_work(&edac_dev->work, round_jiffies_relative(edac_dev->delay));374371 else375372 edac_queue_work(&edac_dev->work, edac_dev->delay);···403400 edac_dev->delay = msecs_to_jiffies(msec);404401405402 /* See comment in edac_device_workq_setup() above */406406- if (edac_dev->poll_msec == 1000)403403+ if (edac_dev->poll_msec == DEFAULT_POLL_INTERVAL)407404 edac_mod_work(&edac_dev->work, round_jiffies_relative(edac_dev->delay));408405 else409406 edac_mod_work(&edac_dev->work, edac_dev->delay);···445442 /* This instance is NOW RUNNING */446443 edac_dev->op_state = OP_RUNNING_POLL;447444448448- /*449449- * enable workq processing on this instance,450450- * default = 1000 msec451451- */452452- edac_device_workq_setup(edac_dev, 1000);445445+ edac_device_workq_setup(edac_dev, edac_dev->poll_msec ?: DEFAULT_POLL_INTERVAL);453446 } else {454447 edac_dev->op_state = OP_RUNNING_INTERRUPT;455448 }
···910910 xfer->hdr.protocol_id, xfer->hdr.seq,911911 xfer->hdr.poll_completion);912912913913+ /* Clear any stale status */914914+ xfer->hdr.status = SCMI_SUCCESS;913915 xfer->state = SCMI_XFER_SENT_OK;914916 /*915917 * Even though spinlocking is not needed here since no race is possible
+6-3
drivers/firmware/arm_scmi/shmem.c
···8181void shmem_fetch_response(struct scmi_shared_mem __iomem *shmem,8282 struct scmi_xfer *xfer)8383{8484+ size_t len = ioread32(&shmem->length);8585+8486 xfer->hdr.status = ioread32(shmem->msg_payload);8587 /* Skip the length of header and status in shmem area i.e 8 bytes */8686- xfer->rx.len = min_t(size_t, xfer->rx.len,8787- ioread32(&shmem->length) - 8);8888+ xfer->rx.len = min_t(size_t, xfer->rx.len, len > 8 ? len - 8 : 0);88898990 /* Take a copy to the rx buffer.. */9091 memcpy_fromio(xfer->rx.buf, shmem->msg_payload + 4, xfer->rx.len);···9493void shmem_fetch_notification(struct scmi_shared_mem __iomem *shmem,9594 size_t max_len, struct scmi_xfer *xfer)9695{9696+ size_t len = ioread32(&shmem->length);9797+9798 /* Skip only the length of header in shmem area i.e 4 bytes */9898- xfer->rx.len = min_t(size_t, max_len, ioread32(&shmem->length) - 4);9999+ xfer->rx.len = min_t(size_t, max_len, len > 4 ? len - 4 : 0);99100100101 /* Take a copy to the rx buffer.. */101102 memcpy_fromio(xfer->rx.buf, shmem->msg_payload, xfer->rx.len);
+6-1
drivers/firmware/arm_scmi/virtio.c
···160160 }161161162162 vioch->shutdown_done = &vioch_shutdown_done;163163- virtio_break_device(vioch->vqueue->vdev);164163 if (!vioch->is_rx && vioch->deferred_tx_wq)165164 /* Cannot be kicked anymore after this...*/166165 vioch->deferred_tx_wq = NULL;···481482 struct scmi_chan_info *cinfo = p;482483 struct scmi_vio_channel *vioch = cinfo->transport_info;483484485485+ /*486486+ * Break device to inhibit further traffic flowing while shutting down487487+ * the channels: doing it later holding vioch->lock creates unsafe488488+ * locking dependency chains as reported by LOCKDEP.489489+ */490490+ virtio_break_device(vioch->vqueue->vdev);484491 scmi_vio_channel_cleanup_sync(vioch);485492486493 scmi_free_channel(cinfo, data, id);
+4-3
drivers/firmware/google/gsmi.c
···361361 memcpy(data, gsmi_dev.data_buf->start, *data_size);362362363363 /* All variables are have the following attributes */364364- *attr = EFI_VARIABLE_NON_VOLATILE |365365- EFI_VARIABLE_BOOTSERVICE_ACCESS |366366- EFI_VARIABLE_RUNTIME_ACCESS;364364+ if (attr)365365+ *attr = EFI_VARIABLE_NON_VOLATILE |366366+ EFI_VARIABLE_BOOTSERVICE_ACCESS |367367+ EFI_VARIABLE_RUNTIME_ACCESS;367368 }368369369370 spin_unlock_irqrestore(&gsmi_dev.lock, flags);
···156156 return amdgpu_compute_multipipe == 1;157157 }158158159159+ if (adev->ip_versions[GC_HWIP][0] > IP_VERSION(9, 0, 0))160160+ return true;161161+159162 /* FIXME: spreading the queues across pipes causes perf regressions160163 * on POLARIS11 compute workloads */161164 if (adev->asic_type == CHIP_POLARIS11)
+1
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
···497497 !--id_mgr->reserved_use_count) {498498 /* give the reserved ID back to normal round robin */499499 list_add(&id_mgr->reserved->list, &id_mgr->ids_lru);500500+ id_mgr->reserved = NULL;500501 }501502 vm->reserved_vmid[vmhub] = false;502503 mutex_unlock(&id_mgr->lock);
+8-2
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
···161161 struct dma_fence *f;162162 unsigned i;163163164164- /* use sched fence if available */165165- f = job->base.s_fence ? &job->base.s_fence->finished : &job->hw_fence;164164+ /* Check if any fences where initialized */165165+ if (job->base.s_fence && job->base.s_fence->finished.ops)166166+ f = &job->base.s_fence->finished;167167+ else if (job->hw_fence.ops)168168+ f = &job->hw_fence;169169+ else170170+ f = NULL;171171+166172 for (i = 0; i < job->num_ibs; ++i)167173 amdgpu_ib_free(ring->adev, &job->ibs[i], f);168174}
+9-2
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
···1287128712881288 switch (adev->ip_versions[GC_HWIP][0]) {12891289 case IP_VERSION(11, 0, 0):12901290- case IP_VERSION(11, 0, 1):12911290 case IP_VERSION(11, 0, 2):12921291 case IP_VERSION(11, 0, 3):12931293- case IP_VERSION(11, 0, 4):12941292 adev->gfx.me.num_me = 1;12951293 adev->gfx.me.num_pipe_per_me = 1;12961294 adev->gfx.me.num_queue_per_pipe = 1;12971295 adev->gfx.mec.num_mec = 2;12961296+ adev->gfx.mec.num_pipe_per_mec = 4;12971297+ adev->gfx.mec.num_queue_per_pipe = 4;12981298+ break;12991299+ case IP_VERSION(11, 0, 1):13001300+ case IP_VERSION(11, 0, 4):13011301+ adev->gfx.me.num_me = 1;13021302+ adev->gfx.me.num_pipe_per_me = 1;13031303+ adev->gfx.me.num_queue_per_pipe = 1;13041304+ adev->gfx.mec.num_mec = 1;12981305 adev->gfx.mec.num_pipe_per_mec = 4;12991306 adev->gfx.mec.num_queue_per_pipe = 4;13001307 break;
+4-10
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
···15031503 case IP_VERSION(3, 0, 1):15041504 case IP_VERSION(3, 1, 2):15051505 case IP_VERSION(3, 1, 3):15061506- case IP_VERSION(3, 1, 4):15071507- case IP_VERSION(3, 1, 5):15081506 case IP_VERSION(3, 1, 6):15091507 init_data.flags.gpu_vm_support = true;15101508 break;···17261728 if (adev->dm.vblank_control_workqueue) {17271729 destroy_workqueue(adev->dm.vblank_control_workqueue);17281730 adev->dm.vblank_control_workqueue = NULL;17291729- }17301730-17311731- for (i = 0; i < adev->dm.display_indexes_num; i++) {17321732- drm_encoder_cleanup(&adev->dm.mst_encoders[i].base);17331731 }1734173217351733 amdgpu_dm_destroy_drm_device(&adev->dm);···5305531153065312 timing_out->aspect_ratio = get_aspect_ratio(mode_in);5307531353085308- stream->output_color_space = get_output_color_space(timing_out);53095309-53105314 stream->out_transfer_func->type = TF_TYPE_PREDEFINED;53115315 stream->out_transfer_func->tf = TRANSFER_FUNCTION_SRGB;53125316 if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) {···53155323 adjust_colour_depth_from_display_info(timing_out, info);53165324 }53175325 }53265326+53275327+ stream->output_color_space = get_output_color_space(timing_out);53185328}5319532953205330static void fill_audio_info(struct audio_info *audio_info,···95249530 goto fail;95259531 }9526953295279527- if (dm_old_con_state->abm_level !=95289528- dm_new_con_state->abm_level)95339533+ if (dm_old_con_state->abm_level != dm_new_con_state->abm_level ||95349534+ dm_old_con_state->scaling != dm_new_con_state->scaling)95299535 new_crtc_state->connectors_changed = true;95309536 }95319537
···335335 struct msm_file_private *ctx = submit->queue->ctx;336336 struct task_struct *task;337337338338+ WARN_ON(!mutex_is_locked(&submit->gpu->lock));339339+338340 /* Note that kstrdup will return NULL if argument is NULL: */339341 *comm = kstrdup(ctx->comm, GFP_KERNEL);340342 *cmd = kstrdup(ctx->cmdline, GFP_KERNEL);
+10-2
drivers/gpu/drm/msm/msm_gpu.h
···376376 */377377 int sysprof;378378379379- /** comm: Overridden task comm, see MSM_PARAM_COMM */379379+ /**380380+ * comm: Overridden task comm, see MSM_PARAM_COMM381381+ *382382+ * Accessed under msm_gpu::lock383383+ */380384 char *comm;381385382382- /** cmdline: Overridden task cmdline, see MSM_PARAM_CMDLINE */386386+ /**387387+ * cmdline: Overridden task cmdline, see MSM_PARAM_CMDLINE388388+ *389389+ * Accessed under msm_gpu::lock390390+ */383391 char *cmdline;384392385393 /**
+2-1
drivers/gpu/drm/panfrost/Kconfig
···33config DRM_PANFROST44 tristate "Panfrost (DRM support for ARM Mali Midgard/Bifrost GPUs)"55 depends on DRM66- depends on ARM || ARM64 || (COMPILE_TEST && !GENERIC_ATOMIC64)66+ depends on ARM || ARM64 || COMPILE_TEST77+ depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE78 depends on MMU89 select DRM_SCHED910 select IOMMU_SUPPORT
+2-4
drivers/gpu/drm/vc4/vc4_bo.c
···179179 bo->validated_shader = NULL;180180 }181181182182+ mutex_destroy(&bo->madv_lock);182183 drm_gem_dma_free(&bo->base);183184}184185···395394{396395 struct vc4_dev *vc4 = to_vc4_dev(dev);397396 struct vc4_bo *bo;398398- int ret;399397400398 if (WARN_ON_ONCE(vc4->is_vc5))401399 return ERR_PTR(-ENODEV);···406406 bo->madv = VC4_MADV_WILLNEED;407407 refcount_set(&bo->usecnt, 0);408408409409- ret = drmm_mutex_init(dev, &bo->madv_lock);410410- if (ret)411411- return ERR_PTR(ret);409409+ mutex_init(&bo->madv_lock);412410413411 mutex_lock(&vc4->bo_lock);414412 bo->label = VC4_BO_TYPE_KERNEL;
···321321 perm.vmid = QCOM_SCM_VMID_HLOS;322322 perm.perm = QCOM_SCM_PERM_RWX;323323 err = qcom_scm_assign_mem(map->phys, map->size,324324- &(map->fl->cctx->vmperms[0].vmid), &perm, 1);324324+ &map->fl->cctx->perms, &perm, 1);325325 if (err) {326326 dev_err(map->fl->sctx->dev, "Failed to assign memory phys 0x%llx size 0x%llx err %d",327327 map->phys, map->size, err);···334334 dma_buf_put(map->buf);335335 }336336337337+ if (map->fl) {338338+ spin_lock(&map->fl->lock);339339+ list_del(&map->node);340340+ spin_unlock(&map->fl->lock);341341+ map->fl = NULL;342342+ }343343+337344 kfree(map);338345}339346···350343 kref_put(&map->refcount, fastrpc_free_map);351344}352345353353-static void fastrpc_map_get(struct fastrpc_map *map)346346+static int fastrpc_map_get(struct fastrpc_map *map)354347{355355- if (map)356356- kref_get(&map->refcount);348348+ if (!map)349349+ return -ENOENT;350350+351351+ return kref_get_unless_zero(&map->refcount) ? 0 : -ENOENT;357352}358353359354360355static int fastrpc_map_lookup(struct fastrpc_user *fl, int fd,361361- struct fastrpc_map **ppmap)356356+ struct fastrpc_map **ppmap, bool take_ref)362357{358358+ struct fastrpc_session_ctx *sess = fl->sctx;363359 struct fastrpc_map *map = NULL;360360+ int ret = -ENOENT;364361365365- mutex_lock(&fl->mutex);362362+ spin_lock(&fl->lock);366363 list_for_each_entry(map, &fl->maps, node) {367367- if (map->fd == fd) {368368- *ppmap = map;369369- mutex_unlock(&fl->mutex);370370- return 0;364364+ if (map->fd != fd)365365+ continue;366366+367367+ if (take_ref) {368368+ ret = fastrpc_map_get(map);369369+ if (ret) {370370+ dev_dbg(sess->dev, "%s: Failed to get map fd=%d ret=%d\n",371371+ __func__, fd, ret);372372+ break;373373+ }371374 }375375+376376+ *ppmap = map;377377+ ret = 0;378378+ break;372379 }373373- mutex_unlock(&fl->mutex);374374-375375- return -ENOENT;376376-}377377-378378-static int fastrpc_map_find(struct fastrpc_user *fl, int fd,379379- struct fastrpc_map **ppmap)380380-{381381- int ret = fastrpc_map_lookup(fl, fd, ppmap);382382-383383- if (!ret)384384- fastrpc_map_get(*ppmap);380380+ spin_unlock(&fl->lock);385381386382 return ret;387383}···756746 struct fastrpc_map *map = NULL;757747 int err = 0;758748759759- if (!fastrpc_map_find(fl, fd, ppmap))749749+ if (!fastrpc_map_lookup(fl, fd, ppmap, true))760750 return 0;761751762752 map = kzalloc(sizeof(*map), GFP_KERNEL);···798788 * If subsystem VMIDs are defined in DTSI, then do799789 * hyp_assign from HLOS to those VM(s)800790 */801801- unsigned int perms = BIT(QCOM_SCM_VMID_HLOS);802802-803791 map->attr = attr;804804- err = qcom_scm_assign_mem(map->phys, (u64)map->size, &perms,792792+ err = qcom_scm_assign_mem(map->phys, (u64)map->size, &fl->cctx->perms,805793 fl->cctx->vmperms, fl->cctx->vmcount);806794 if (err) {807795 dev_err(sess->dev, "Failed to assign memory with phys 0x%llx size 0x%llx err %d",···10781070 for (i = 0; i < FASTRPC_MAX_FDLIST; i++) {10791071 if (!fdlist[i])10801072 break;10811081- if (!fastrpc_map_lookup(fl, (int)fdlist[i], &mmap))10731073+ if (!fastrpc_map_lookup(fl, (int)fdlist[i], &mmap, false))10821074 fastrpc_map_put(mmap);10831075 }10841076···1266125812671259 /* Map if we have any heap VMIDs associated with this ADSP Static Process. */12681260 if (fl->cctx->vmcount) {12691269- unsigned int perms = BIT(QCOM_SCM_VMID_HLOS);12701270-12711261 err = qcom_scm_assign_mem(fl->cctx->remote_heap->phys,12721272- (u64)fl->cctx->remote_heap->size, &perms,12621262+ (u64)fl->cctx->remote_heap->size,12631263+ &fl->cctx->perms,12731264 fl->cctx->vmperms, fl->cctx->vmcount);12741265 if (err) {12751266 dev_err(fl->sctx->dev, "Failed to assign memory with phys 0x%llx size 0x%llx err %d",···13161309 perm.perm = QCOM_SCM_PERM_RWX;13171310 err = qcom_scm_assign_mem(fl->cctx->remote_heap->phys,13181311 (u64)fl->cctx->remote_heap->size,13191319- &(fl->cctx->vmperms[0].vmid), &perm, 1);13121312+ &fl->cctx->perms, &perm, 1);13201313 if (err)13211314 dev_err(fl->sctx->dev, "Failed to assign memory phys 0x%llx size 0x%llx err %d",13221315 fl->cctx->remote_heap->phys, fl->cctx->remote_heap->size, err);···14401433 fl->init_mem = NULL;14411434 fastrpc_buf_free(imem);14421435err_alloc:14431443- if (map) {14441444- spin_lock(&fl->lock);14451445- list_del(&map->node);14461446- spin_unlock(&fl->lock);14471447- fastrpc_map_put(map);14481448- }14361436+ fastrpc_map_put(map);14491437err:14501438 kfree(args);14511439···15161514 fastrpc_context_put(ctx);15171515 }1518151615191519- list_for_each_entry_safe(map, m, &fl->maps, node) {15201520- list_del(&map->node);15171517+ list_for_each_entry_safe(map, m, &fl->maps, node)15211518 fastrpc_map_put(map);15221522- }1523151915241520 list_for_each_entry_safe(buf, b, &fl->mmaps, node) {15251521 list_del(&buf->node);···18941894 /* Add memory to static PD pool, protection thru hypervisor */18951895 if (req.flags != ADSP_MMAP_REMOTE_HEAP_ADDR && fl->cctx->vmcount) {18961896 struct qcom_scm_vmperm perm;18971897- int err = 0;1898189718991898 perm.vmid = QCOM_SCM_VMID_HLOS;19001899 perm.perm = QCOM_SCM_PERM_RWX;19011900 err = qcom_scm_assign_mem(buf->phys, buf->size,19021902- &(fl->cctx->vmperms[0].vmid), &perm, 1);19011901+ &fl->cctx->perms, &perm, 1);19031902 if (err) {19041903 dev_err(fl->sctx->dev, "Failed to assign memory phys 0x%llx size 0x%llx err %d",19051904 buf->phys, buf->size, err);
+8-4
drivers/misc/mei/bus.c
···702702 if (cl->state == MEI_FILE_UNINITIALIZED) {703703 ret = mei_cl_link(cl);704704 if (ret)705705- goto out;705705+ goto notlinked;706706 /* update pointers */707707 cl->cldev = cldev;708708 }709709710710 ret = mei_cl_dma_alloc_and_map(cl, NULL, buffer_id, size);711711-out:711711+ if (ret)712712+ mei_cl_unlink(cl);713713+notlinked:712714 mutex_unlock(&bus->device_lock);713715 if (ret)714716 return ERR_PTR(ret);···760758 if (cl->state == MEI_FILE_UNINITIALIZED) {761759 ret = mei_cl_link(cl);762760 if (ret)763763- goto out;761761+ goto notlinked;764762 /* update pointers */765763 cl->cldev = cldev;766764 }···787785 }788786789787out:788788+ if (ret)789789+ mei_cl_unlink(cl);790790+notlinked:790791 mutex_unlock(&bus->device_lock);791792792793 return ret;···12821277 mei_cl_flush_queues(cldev->cl, NULL);12831278 mei_me_cl_put(cldev->me_cl);12841279 mei_dev_bus_put(cldev->bus);12851285- mei_cl_unlink(cldev->cl);12861280 kfree(cldev->cl);12871281 kfree(cldev);12881282}
+2
drivers/misc/mei/hw-me-regs.h
···111111112112#define MEI_DEV_ID_RPL_S 0x7A68 /* Raptor Lake Point S */113113114114+#define MEI_DEV_ID_MTL_M 0x7E70 /* Meteor Lake Point M */115115+114116/*115117 * MEI HW Section116118 */
···56565757 bool exclusive_vectors;58585959- struct tasklet_struct datagram_tasklet;6060- struct tasklet_struct bm_tasklet;6159 struct wait_queue_head inout_wq;62606361 void *data_buffer;···302304 * This function assumes that it has exclusive access to the data303305 * in register(s) for the duration of the call.304306 */305305-static void vmci_dispatch_dgs(unsigned long data)307307+static void vmci_dispatch_dgs(struct vmci_guest_device *vmci_dev)306308{307307- struct vmci_guest_device *vmci_dev = (struct vmci_guest_device *)data;308309 u8 *dg_in_buffer = vmci_dev->data_buffer;309310 struct vmci_datagram *dg;310311 size_t dg_in_buffer_size = VMCI_MAX_DG_SIZE;···462465 * Scans the notification bitmap for raised flags, clears them463466 * and handles the notifications.464467 */465465-static void vmci_process_bitmap(unsigned long data)468468+static void vmci_process_bitmap(struct vmci_guest_device *dev)466469{467467- struct vmci_guest_device *dev = (struct vmci_guest_device *)data;468468-469470 if (!dev->notification_bitmap) {470471 dev_dbg(dev->dev, "No bitmap present in %s\n", __func__);471472 return;···481486 struct vmci_guest_device *dev = _dev;482487483488 /*484484- * If we are using MSI-X with exclusive vectors then we simply schedule485485- * the datagram tasklet, since we know the interrupt was meant for us.489489+ * If we are using MSI-X with exclusive vectors then we simply call490490+ * vmci_dispatch_dgs(), since we know the interrupt was meant for us.486491 * Otherwise we must read the ICR to determine what to do.487492 */488493489494 if (dev->exclusive_vectors) {490490- tasklet_schedule(&dev->datagram_tasklet);495495+ vmci_dispatch_dgs(dev);491496 } else {492497 unsigned int icr;493498···497502 return IRQ_NONE;498503499504 if (icr & VMCI_ICR_DATAGRAM) {500500- tasklet_schedule(&dev->datagram_tasklet);505505+ vmci_dispatch_dgs(dev);501506 icr &= ~VMCI_ICR_DATAGRAM;502507 }503508504509 if (icr & VMCI_ICR_NOTIFICATION) {505505- tasklet_schedule(&dev->bm_tasklet);510510+ vmci_process_bitmap(dev);506511 icr &= ~VMCI_ICR_NOTIFICATION;507512 }508513···531536 struct vmci_guest_device *dev = _dev;532537533538 /* For MSI-X we can just assume it was meant for us. */534534- tasklet_schedule(&dev->bm_tasklet);539539+ vmci_process_bitmap(dev);535540536541 return IRQ_HANDLED;537542}···633638 vmci_dev->iobase = iobase;634639 vmci_dev->mmio_base = mmio_base;635640636636- tasklet_init(&vmci_dev->datagram_tasklet,637637- vmci_dispatch_dgs, (unsigned long)vmci_dev);638638- tasklet_init(&vmci_dev->bm_tasklet,639639- vmci_process_bitmap, (unsigned long)vmci_dev);640641 init_waitqueue_head(&vmci_dev->inout_wq);641642642643 if (mmio_base != NULL) {···799808 * Request IRQ for legacy or MSI interrupts, or for first800809 * MSI-X vector.801810 */802802- error = request_irq(pci_irq_vector(pdev, 0), vmci_interrupt,803803- IRQF_SHARED, KBUILD_MODNAME, vmci_dev);811811+ error = request_threaded_irq(pci_irq_vector(pdev, 0), NULL,812812+ vmci_interrupt, IRQF_SHARED,813813+ KBUILD_MODNAME, vmci_dev);804814 if (error) {805815 dev_err(&pdev->dev, "Irq %u in use: %d\n",806816 pci_irq_vector(pdev, 0), error);···815823 * between the vectors.816824 */817825 if (vmci_dev->exclusive_vectors) {818818- error = request_irq(pci_irq_vector(pdev, 1),819819- vmci_interrupt_bm, 0, KBUILD_MODNAME,820820- vmci_dev);826826+ error = request_threaded_irq(pci_irq_vector(pdev, 1), NULL,827827+ vmci_interrupt_bm, 0,828828+ KBUILD_MODNAME, vmci_dev);821829 if (error) {822830 dev_err(&pdev->dev,823831 "Failed to allocate irq %u: %d\n",···825833 goto err_free_irq;826834 }827835 if (caps_in_use & VMCI_CAPS_DMA_DATAGRAM) {828828- error = request_irq(pci_irq_vector(pdev, 2),829829- vmci_interrupt_dma_datagram,830830- 0, KBUILD_MODNAME, vmci_dev);836836+ error = request_threaded_irq(pci_irq_vector(pdev, 2),837837+ NULL,838838+ vmci_interrupt_dma_datagram,839839+ 0, KBUILD_MODNAME,840840+ vmci_dev);831841 if (error) {832842 dev_err(&pdev->dev,833843 "Failed to allocate irq %u: %d\n",···865871866872err_free_irq:867873 free_irq(pci_irq_vector(pdev, 0), vmci_dev);868868- tasklet_kill(&vmci_dev->datagram_tasklet);869869- tasklet_kill(&vmci_dev->bm_tasklet);870874871875err_disable_msi:872876 pci_free_irq_vectors(pdev);···934942 }935943 free_irq(pci_irq_vector(pdev, 0), vmci_dev);936944 pci_free_irq_vectors(pdev);937937-938938- tasklet_kill(&vmci_dev->datagram_tasklet);939939- tasklet_kill(&vmci_dev->bm_tasklet);940945941946 if (vmci_dev->notification_bitmap) {942947 /*
+15-7
drivers/mmc/host/sdhci-esdhc-imx.c
···107107#define ESDHC_TUNING_START_TAP_DEFAULT 0x1108108#define ESDHC_TUNING_START_TAP_MASK 0x7f109109#define ESDHC_TUNING_CMD_CRC_CHECK_DISABLE (1 << 7)110110+#define ESDHC_TUNING_STEP_DEFAULT 0x1110111#define ESDHC_TUNING_STEP_MASK 0x00070000111112#define ESDHC_TUNING_STEP_SHIFT 16112113···13691368 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);13701369 struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host);13711370 struct cqhci_host *cq_host = host->mmc->cqe_private;13721372- int tmp;13711371+ u32 tmp;1373137213741373 if (esdhc_is_usdhc(imx_data)) {13751374 /*···1424142314251424 if (imx_data->socdata->flags & ESDHC_FLAG_STD_TUNING) {14261425 tmp = readl(host->ioaddr + ESDHC_TUNING_CTRL);14271427- tmp |= ESDHC_STD_TUNING_EN |14281428- ESDHC_TUNING_START_TAP_DEFAULT;14291429- if (imx_data->boarddata.tuning_start_tap) {14301430- tmp &= ~ESDHC_TUNING_START_TAP_MASK;14261426+ tmp |= ESDHC_STD_TUNING_EN;14271427+14281428+ /*14291429+ * ROM code or bootloader may config the start tap14301430+ * and step, unmask them first.14311431+ */14321432+ tmp &= ~(ESDHC_TUNING_START_TAP_MASK | ESDHC_TUNING_STEP_MASK);14331433+ if (imx_data->boarddata.tuning_start_tap)14311434 tmp |= imx_data->boarddata.tuning_start_tap;14321432- }14351435+ else14361436+ tmp |= ESDHC_TUNING_START_TAP_DEFAULT;1433143714341438 if (imx_data->boarddata.tuning_step) {14351435- tmp &= ~ESDHC_TUNING_STEP_MASK;14361439 tmp |= imx_data->boarddata.tuning_step14401440+ << ESDHC_TUNING_STEP_SHIFT;14411441+ } else {14421442+ tmp |= ESDHC_TUNING_STEP_DEFAULT14371443 << ESDHC_TUNING_STEP_SHIFT;14381444 }14391445
···540540 ksz_read32(dev, REG_SW_ALU_VAL_D, &alu_table[3]);541541542542 /* clear forwarding port */543543- alu_table[2] &= ~BIT(port);543543+ alu_table[1] &= ~BIT(port);544544545545 /* if there is no port to forward, clear table */546546- if ((alu_table[2] & ALU_V_PORT_MAP) == 0) {546546+ if ((alu_table[1] & ALU_V_PORT_MAP) == 0) {547547 alu_table[0] = 0;548548 alu_table[1] = 0;549549 alu_table[2] = 0;
+15-8
drivers/net/ethernet/amd/xgbe/xgbe-dev.c
···524524 netif_dbg(pdata, drv, pdata->netdev, "VXLAN acceleration disabled\n");525525}526526527527+static unsigned int xgbe_get_fc_queue_count(struct xgbe_prv_data *pdata)528528+{529529+ unsigned int max_q_count = XGMAC_MAX_FLOW_CONTROL_QUEUES;530530+531531+ /* From MAC ver 30H the TFCR is per priority, instead of per queue */532532+ if (XGMAC_GET_BITS(pdata->hw_feat.version, MAC_VR, SNPSVER) >= 0x30)533533+ return max_q_count;534534+ else535535+ return min_t(unsigned int, pdata->tx_q_count, max_q_count);536536+}537537+527538static int xgbe_disable_tx_flow_control(struct xgbe_prv_data *pdata)528539{529529- unsigned int max_q_count, q_count;530540 unsigned int reg, reg_val;531531- unsigned int i;541541+ unsigned int i, q_count;532542533543 /* Clear MTL flow control */534544 for (i = 0; i < pdata->rx_q_count; i++)535545 XGMAC_MTL_IOWRITE_BITS(pdata, i, MTL_Q_RQOMR, EHFC, 0);536546537547 /* Clear MAC flow control */538538- max_q_count = XGMAC_MAX_FLOW_CONTROL_QUEUES;539539- q_count = min_t(unsigned int, pdata->tx_q_count, max_q_count);548548+ q_count = xgbe_get_fc_queue_count(pdata);540549 reg = MAC_Q0TFCR;541550 for (i = 0; i < q_count; i++) {542551 reg_val = XGMAC_IOREAD(pdata, reg);···562553{563554 struct ieee_pfc *pfc = pdata->pfc;564555 struct ieee_ets *ets = pdata->ets;565565- unsigned int max_q_count, q_count;566556 unsigned int reg, reg_val;567567- unsigned int i;557557+ unsigned int i, q_count;568558569559 /* Set MTL flow control */570560 for (i = 0; i < pdata->rx_q_count; i++) {···587579 }588580589581 /* Set MAC flow control */590590- max_q_count = XGMAC_MAX_FLOW_CONTROL_QUEUES;591591- q_count = min_t(unsigned int, pdata->tx_q_count, max_q_count);582582+ q_count = xgbe_get_fc_queue_count(pdata);592583 reg = MAC_Q0TFCR;593584 for (i = 0; i < q_count; i++) {594585 reg_val = XGMAC_IOREAD(pdata, reg);
+24
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
···496496 reg |= XGBE_KR_TRAINING_ENABLE;497497 reg |= XGBE_KR_TRAINING_START;498498 XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, reg);499499+ pdata->kr_start_time = jiffies;499500500501 netif_dbg(pdata, link, pdata->netdev,501502 "KR training initiated\n");···632631 xgbe_an_disable(pdata);633632634633 xgbe_switch_mode(pdata);634634+635635+ pdata->an_result = XGBE_AN_READY;635636636637 xgbe_an_restart(pdata);637638···12781275static void xgbe_check_link_timeout(struct xgbe_prv_data *pdata)12791276{12801277 unsigned long link_timeout;12781278+ unsigned long kr_time;12791279+ int wait;1281128012821281 link_timeout = pdata->link_check + (XGBE_LINK_TIMEOUT * HZ);12831282 if (time_after(jiffies, link_timeout)) {12831283+ if ((xgbe_cur_mode(pdata) == XGBE_MODE_KR) &&12841284+ pdata->phy.autoneg == AUTONEG_ENABLE) {12851285+ /* AN restart should not happen while KR training is in progress.12861286+ * The while loop ensures no AN restart during KR training,12871287+ * waits up to 500ms and AN restart is triggered only if KR12881288+ * training is failed.12891289+ */12901290+ wait = XGBE_KR_TRAINING_WAIT_ITER;12911291+ while (wait--) {12921292+ kr_time = pdata->kr_start_time +12931293+ msecs_to_jiffies(XGBE_AN_MS_TIMEOUT);12941294+ if (time_after(jiffies, kr_time))12951295+ break;12961296+ /* AN restart is not required, if AN result is COMPLETE */12971297+ if (pdata->an_result == XGBE_AN_COMPLETE)12981298+ return;12991299+ usleep_range(10000, 11000);13001300+ }13011301+ }12841302 netif_dbg(pdata, link, pdata->netdev, "AN link timeout\n");12851303 xgbe_phy_config_aneg(pdata);12861304 }
+2
drivers/net/ethernet/amd/xgbe/xgbe.h
···290290/* Auto-negotiation */291291#define XGBE_AN_MS_TIMEOUT 500292292#define XGBE_LINK_TIMEOUT 5293293+#define XGBE_KR_TRAINING_WAIT_ITER 50293294294295#define XGBE_SGMII_AN_LINK_STATUS BIT(1)295296#define XGBE_SGMII_AN_LINK_SPEED (BIT(2) | BIT(3))···12811280 unsigned int parallel_detect;12821281 unsigned int fec_ability;12831282 unsigned long an_start;12831283+ unsigned long kr_start_time;12841284 enum xgbe_an_mode an_mode;1285128512861286 /* I2C support */
+4-9
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
···39693969 test_info->timeout = HWRM_CMD_TIMEOUT;39703970 for (i = 0; i < bp->num_tests; i++) {39713971 char *str = test_info->string[i];39723972- char *fw_str = resp->test0_name + i * 32;39723972+ char *fw_str = resp->test_name[i];3973397339743974 if (i == BNXT_MACLPBK_TEST_IDX) {39753975 strcpy(str, "Mac loopback test (offline)");···39803980 } else if (i == BNXT_IRQ_TEST_IDX) {39813981 strcpy(str, "Interrupt_test (offline)");39823982 } else {39833983- strscpy(str, fw_str, ETH_GSTRING_LEN);39843984- strncat(str, " test", ETH_GSTRING_LEN - strlen(str));39853985- if (test_info->offline_mask & (1 << i))39863986- strncat(str, " (offline)",39873987- ETH_GSTRING_LEN - strlen(str));39883988- else39893989- strncat(str, " (online)",39903990- ETH_GSTRING_LEN - strlen(str));39833983+ snprintf(str, ETH_GSTRING_LEN, "%s test (%s)",39843984+ fw_str, test_info->offline_mask & (1 << i) ?39853985+ "offline" : "online");39913986 }39923987 }39933988
···736736 u64 ptrs[2];737737738738 ptrs[1] = buf;739739+ get_cpu();739740 /* Free only one buffer at time during init and teardown */740741 __cn10k_aura_freeptr(pfvf, aura, ptrs, 2);742742+ put_cpu();741743}742744743745/* Alloc pointer from pool/aura */
···122122 u8 ctx[MLX5_ST_SZ_BYTES(ipsec_aso)];123123 dma_addr_t dma_addr;124124 struct mlx5_aso *aso;125125- /* IPsec ASO caches data on every query call,126126- * so in nested calls, we can use this boolean to save127127- * recursive calls to mlx5e_ipsec_aso_query()128128- */129129- u8 use_cache : 1;125125+ /* Protect ASO WQ access, as it is global to whole IPsec */126126+ spinlock_t lock;130127};131128132129struct mlx5e_ipsec {
···677677 mutex_lock(&dev->intf_state_mutex);678678 if (test_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags)) {679679 mlx5_core_err(dev, "health works are not permitted at this stage\n");680680+ mutex_unlock(&dev->intf_state_mutex);680681 return;681682 }682683 mutex_unlock(&dev->intf_state_mutex);
···551551 p = (char *)priv + offsetof(struct stmmac_priv,552552 xstats.txq_stats[q].tx_pkt_n);553553 for (stat = 0; stat < STMMAC_TXQ_STATS; stat++) {554554- *data++ = (*(u64 *)p);555555- p += sizeof(u64 *);554554+ *data++ = (*(unsigned long *)p);555555+ p += sizeof(unsigned long);556556 }557557 }558558 for (q = 0; q < rx_cnt; q++) {559559 p = (char *)priv + offsetof(struct stmmac_priv,560560 xstats.rxq_stats[q].rx_pkt_n);561561 for (stat = 0; stat < STMMAC_RXQ_STATS; stat++) {562562- *data++ = (*(u64 *)p);563563- p += sizeof(u64 *);562562+ *data++ = (*(unsigned long *)p);563563+ p += sizeof(unsigned long);564564 }565565 }566566}
+5
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
···11501150 int addr = priv->plat->phy_addr;11511151 struct phy_device *phydev;1152115211531153+ if (addr < 0) {11541154+ netdev_err(priv->dev, "no phy found\n");11551155+ return -ENODEV;11561156+ }11571157+11531158 phydev = mdiobus_get_phy(priv->mii, addr);11541159 if (!phydev) {11551160 netdev_err(priv->dev, "no phy at addr %d\n", addr);
+10
drivers/net/ipa/ipa_interrupt.c
···127127 return IRQ_HANDLED;128128}129129130130+void ipa_interrupt_irq_disable(struct ipa *ipa)131131+{132132+ disable_irq(ipa->interrupt->irq);133133+}134134+135135+void ipa_interrupt_irq_enable(struct ipa *ipa)136136+{137137+ enable_irq(ipa->interrupt->irq);138138+}139139+130140/* Common function used to enable/disable TX_SUSPEND for an endpoint */131141static void ipa_interrupt_suspend_control(struct ipa_interrupt *interrupt,132142 u32 endpoint_id, bool enable)
···181181182182 __set_bit(IPA_POWER_FLAG_SYSTEM, ipa->power->flags);183183184184+ /* Increment the disable depth to ensure that the IRQ won't185185+ * be re-enabled until the matching _enable call in186186+ * ipa_resume(). We do this to ensure that the interrupt187187+ * handler won't run whilst PM runtime is disabled.188188+ *189189+ * Note that disabling the IRQ is NOT the same as disabling190190+ * irq wake. If wakeup is enabled for the IPA then the IRQ191191+ * will still cause the system to wake up, see irq_set_irq_wake().192192+ */193193+ ipa_interrupt_irq_disable(ipa);194194+184195 return pm_runtime_force_suspend(dev);185196}186197···203192 ret = pm_runtime_force_resume(dev);204193205194 __clear_bit(IPA_POWER_FLAG_SYSTEM, ipa->power->flags);195195+196196+ /* Now that PM runtime is enabled again it's safe197197+ * to turn the IRQ back on and process any data198198+ * that was received during suspend.199199+ */200200+ ipa_interrupt_irq_enable(ipa);206201207202 return ret;208203}
···413413 /* ignore the CRC length */414414 len = (skb->data[1] | (skb->data[2] << 8)) - 4;415415416416- if (len > ETH_FRAME_LEN || len > skb->len)416416+ if (len > ETH_FRAME_LEN || len > skb->len || len < 0)417417 return 0;418418419419 /* the last packet of current skb */
+4-2
drivers/net/virtio_net.c
···18771877 */18781878 if (sq->vq->num_free < 2+MAX_SKB_FRAGS) {18791879 netif_stop_subqueue(dev, qnum);18801880- if (!use_napi &&18811881- unlikely(!virtqueue_enable_cb_delayed(sq->vq))) {18801880+ if (use_napi) {18811881+ if (unlikely(!virtqueue_enable_cb_delayed(sq->vq)))18821882+ virtqueue_napi_schedule(&sq->napi, sq->vq);18831883+ } else if (unlikely(!virtqueue_enable_cb_delayed(sq->vq))) {18821884 /* More just got used, free them then recheck. */18831885 free_old_xmit_skbs(sq, false);18841886 if (sq->vq->num_free >= 2+MAX_SKB_FRAGS) {
+4-2
drivers/net/wan/fsl_ucc_hdlc.c
···12431243free_dev:12441244 free_netdev(dev);12451245undo_uhdlc_init:12461246- iounmap(utdm->siram);12461246+ if (utdm)12471247+ iounmap(utdm->siram);12471248unmap_si_regs:12481248- iounmap(utdm->si_regs);12491249+ if (utdm)12501250+ iounmap(utdm->si_regs);12491251free_utdm:12501252 if (uhdlc_priv->tsa)12511253 kfree(utdm);
···696696 struct rndis_query *get;697697 struct rndis_query_c *get_c;698698 } u;699699- int ret, buflen;700700- int resplen, respoffs, copylen;699699+ int ret;700700+ size_t buflen, resplen, respoffs, copylen;701701702702 buflen = *len + sizeof(*u.get);703703 if (buflen < CONTROL_BUFFER_SIZE)···732732733733 if (respoffs > buflen) {734734 /* Device returned data offset outside buffer, error. */735735- netdev_dbg(dev->net, "%s(%s): received invalid "736736- "data offset: %d > %d\n", __func__,737737- oid_to_string(oid), respoffs, buflen);735735+ netdev_dbg(dev->net,736736+ "%s(%s): received invalid data offset: %zu > %zu\n",737737+ __func__, oid_to_string(oid), respoffs, buflen);738738739739 ret = -EINVAL;740740 goto exit_unlock;741741 }742742743743- if ((resplen + respoffs) > buflen) {744744- /* Device would have returned more data if buffer would745745- * have been big enough. Copy just the bits that we got.746746- */747747- copylen = buflen - respoffs;748748- } else {749749- copylen = resplen;750750- }743743+ copylen = min(resplen, buflen - respoffs);751744752745 if (copylen > *len)753746 copylen = *len;
+20-4
drivers/nvme/host/apple.c
···829829 apple_nvme_remove_cq(anv);830830 }831831832832- nvme_disable_ctrl(&anv->ctrl, shutdown);832832+ /*833833+ * Always disable the NVMe controller after shutdown.834834+ * We need to do this to bring it back up later anyway, and we835835+ * can't do it while the firmware is not running (e.g. in the836836+ * resume reset path before RTKit is initialized), so for Apple837837+ * controllers it makes sense to unconditionally do it here.838838+ * Additionally, this sequence of events is reliable, while839839+ * others (like disabling after bringing back the firmware on840840+ * resume) seem to run into trouble under some circumstances.841841+ *842842+ * Both U-Boot and m1n1 also use this convention (i.e. an ANS843843+ * NVMe controller is handed off with firmware shut down, in an844844+ * NVMe disabled state, after a clean shutdown).845845+ */846846+ if (shutdown)847847+ nvme_disable_ctrl(&anv->ctrl, shutdown);848848+ nvme_disable_ctrl(&anv->ctrl, false);833849 }834850835851 WRITE_ONCE(anv->ioq.enabled, false);···1001985 goto out;1002986 }100398710041004- if (anv->ctrl.ctrl_config & NVME_CC_ENABLE)10051005- apple_nvme_disable(anv, false);10061006-1007988 /* RTKit must be shut down cleanly for the (soft)-reset to work */1008989 if (apple_rtkit_is_running(anv->rtk)) {990990+ /* reset the controller if it is enabled */991991+ if (anv->ctrl.ctrl_config & NVME_CC_ENABLE)992992+ apple_nvme_disable(anv, false);1009993 dev_dbg(anv->dev, "Trying to shut down RTKit before reset.");1010994 ret = apple_rtkit_shutdown(anv->rtk);1011995 if (ret)
···485485 return ret;486486487487 ret = property_enable(base, &rport->port_cfg->phy_sus, false);488488- if (ret)488488+ if (ret) {489489+ clk_disable_unprepare(rphy->clk480m);489490 return ret;491491+ }490492491493 /* waiting for the utmi_clk to become stable */492494 usleep_range(1500, 2000);
+3
drivers/phy/sunplus/phy-sunplus-usb2.c
···254254 return PTR_ERR(usbphy->phy_regs);255255256256 usbphy->moon4_res_mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "moon4");257257+ if (!usbphy->moon4_res_mem)258258+ return -EINVAL;259259+257260 usbphy->moon4_regs = devm_ioremap(&pdev->dev, usbphy->moon4_res_mem->start,258261 resource_size(usbphy->moon4_res_mem));259262 if (!usbphy->moon4_regs)
+2-2
drivers/phy/ti/Kconfig
···23232424config PHY_AM654_SERDES2525 tristate "TI AM654 SERDES support"2626- depends on OF && ARCH_K3 || COMPILE_TEST2626+ depends on OF && (ARCH_K3 || COMPILE_TEST)2727 depends on COMMON_CLK2828 select GENERIC_PHY2929 select MULTIPLEXER···35353636config PHY_J721E_WIZ3737 tristate "TI J721E WIZ (SERDES Wrapper) support"3838- depends on OF && ARCH_K3 || COMPILE_TEST3838+ depends on OF && (ARCH_K3 || COMPILE_TEST)3939 depends on HAS_IOMEM && OF_ADDRESS4040 depends on COMMON_CLK4141 select GENERIC_PHY
+2-1
drivers/pinctrl/nomadik/pinctrl-ab8500.c
···66 */7788#include <linux/kernel.h>99-#include <linux/gpio/driver.h>109#include <linux/pinctrl/pinctrl.h>1010+1111#include <linux/mfd/abx500/ab8500.h>1212+1213#include "pinctrl-abx500.h"13141415/* All the pins that can be used for GPIO and some other functions */
+2-1
drivers/pinctrl/nomadik/pinctrl-ab8505.c
···66 */7788#include <linux/kernel.h>99-#include <linux/gpio/driver.h>109#include <linux/pinctrl/pinctrl.h>1010+1111#include <linux/mfd/abx500/ab8500.h>1212+1213#include "pinctrl-abx500.h"13141415/* All the pins that can be used for GPIO and some other functions */
···11// SPDX-License-Identifier: GPL-2.022#include <linux/kernel.h>33+#include <linux/types.h>44+35#include <linux/pinctrl/pinctrl.h>66+47#include "pinctrl-nomadik.h"5869/* All the pins that can be used for GPIO and some other functions */
+3
drivers/pinctrl/nomadik/pinctrl-nomadik-stn8815.c
···11// SPDX-License-Identifier: GPL-2.022#include <linux/kernel.h>33+#include <linux/types.h>44+35#include <linux/pinctrl/pinctrl.h>66+47#include "pinctrl-nomadik.h"5869/* All the pins that can be used for GPIO and some other functions */
+18-16
drivers/pinctrl/nomadik/pinctrl-nomadik.c
···77 * Rewritten based on work by Prafulla WADASKAR <prafulla.wadaskar@st.com>88 * Copyright (C) 2011-2013 Linus Walleij <linus.walleij@linaro.org>99 */1010-#include <linux/kernel.h>1111-#include <linux/init.h>1212-#include <linux/device.h>1313-#include <linux/platform_device.h>1414-#include <linux/io.h>1010+#include <linux/bitops.h>1511#include <linux/clk.h>1212+#include <linux/device.h>1613#include <linux/err.h>1714#include <linux/gpio/driver.h>1818-#include <linux/spinlock.h>1515+#include <linux/init.h>1916#include <linux/interrupt.h>2020-#include <linux/slab.h>2121-#include <linux/of_device.h>1717+#include <linux/io.h>1818+#include <linux/kernel.h>2219#include <linux/of_address.h>2323-#include <linux/bitops.h>2424-#include <linux/pinctrl/machine.h>2525-#include <linux/pinctrl/pinctrl.h>2626-#include <linux/pinctrl/pinmux.h>2727-#include <linux/pinctrl/pinconf.h>2020+#include <linux/of_device.h>2121+#include <linux/platform_device.h>2222+#include <linux/seq_file.h>2323+#include <linux/slab.h>2424+#include <linux/spinlock.h>2525+2826/* Since we request GPIOs from ourself */2927#include <linux/pinctrl/consumer.h>3030-#include "pinctrl-nomadik.h"2828+#include <linux/pinctrl/machine.h>2929+#include <linux/pinctrl/pinconf.h>3030+#include <linux/pinctrl/pinctrl.h>3131+#include <linux/pinctrl/pinmux.h>3232+3133#include "../core.h"3234#include "../pinctrl-utils.h"3535+3636+#include "pinctrl-nomadik.h"33373438/*3539 * The GPIO module in the Nomadik family of Systems-on-Chip is an···910906911907 return (afunc ? NMK_GPIO_ALT_A : 0) | (bfunc ? NMK_GPIO_ALT_B : 0);912908}913913-914914-#include <linux/seq_file.h>915909916910static void nmk_gpio_dbg_show_one(struct seq_file *s,917911 struct pinctrl_dev *pctldev, struct gpio_chip *chip,
···257257258258config RESET_TI_SCI259259 tristate "TI System Control Interface (TI-SCI) reset driver"260260- depends on TI_SCI_PROTOCOL || COMPILE_TEST260260+ depends on TI_SCI_PROTOCOL || (COMPILE_TEST && TI_SCI_PROTOCOL=n)261261 help262262 This enables the reset driver support over TI System Control Interface263263 available on some new TI's SoCs. If you wish to use reset resources
···461461 goto out;462462 }463463464464+ /* Protection domain is optional, it does not exist on older platforms */464465 ret = of_property_read_string_index(np, "qcom,protection-domain",465466 1, &adev->service_path);466466- if (ret < 0) {467467+ if (ret < 0 && ret != -EINVAL) {467468 dev_err(dev, "Failed to read second value of qcom,protection-domain\n");468469 goto out;469470 }
···909909 cdev->devdata = devdata;910910911911 ret = cdev->ops->get_max_state(cdev, &cdev->max_state);912912- if (ret)913913- goto out_kfree_type;912912+ if (ret) {913913+ kfree(cdev->type);914914+ goto out_ida_remove;915915+ }914916915917 thermal_cooling_device_setup_sysfs(cdev);918918+916919 ret = dev_set_name(&cdev->device, "cooling_device%d", cdev->id);917920 if (ret) {921921+ kfree(cdev->type);918922 thermal_cooling_device_destroy_sysfs(cdev);919919- goto out_kfree_type;923923+ goto out_ida_remove;920924 }925925+921926 ret = device_register(&cdev->device);922927 if (ret)923928 goto out_kfree_type;···948943 thermal_cooling_device_destroy_sysfs(cdev);949944 kfree(cdev->type);950945 put_device(&cdev->device);946946+947947+ /* thermal_release() takes care of the rest */951948 cdev = NULL;952949out_ida_remove:953950 ida_free(&thermal_cdev_ida, id);
+4-16
drivers/thunderbolt/retimer.c
···427427{428428 u32 status[TB_MAX_RETIMER_INDEX + 1] = {};429429 int ret, i, last_idx = 0;430430- struct usb4_port *usb4;431431-432432- usb4 = port->usb4;433433- if (!usb4)434434- return 0;435435-436436- pm_runtime_get_sync(&usb4->dev);437430438431 /*439432 * Send broadcast RT to make sure retimer indices facing this···434441 */435442 ret = usb4_port_enumerate_retimers(port);436443 if (ret)437437- goto out;444444+ return ret;438445439446 /*440447 * Enable sideband channel for each retimer. We can do this···464471 break;465472 }466473467467- if (!last_idx) {468468- ret = 0;469469- goto out;470470- }474474+ if (!last_idx)475475+ return 0;471476472477 /* Add on-board retimers if they do not exist already */478478+ ret = 0;473479 for (i = 1; i <= last_idx; i++) {474480 struct tb_retimer *rt;475481···481489 break;482490 }483491 }484484-485485-out:486486- pm_runtime_mark_last_busy(&usb4->dev);487487- pm_runtime_put_autosuspend(&usb4->dev);488492489493 return ret;490494}
+15-5
drivers/thunderbolt/tb.c
···628628 * Downstream switch is reachable through two ports.629629 * Only scan on the primary port (link_nr == 0).630630 */631631+632632+ if (port->usb4)633633+ pm_runtime_get_sync(&port->usb4->dev);634634+631635 if (tb_wait_for_port(port, false) <= 0)632632- return;636636+ goto out_rpm_put;633637 if (port->remote) {634638 tb_port_dbg(port, "port already has a remote\n");635635- return;639639+ goto out_rpm_put;636640 }637641638642 tb_retimer_scan(port, true);···651647 */652648 if (PTR_ERR(sw) == -EIO || PTR_ERR(sw) == -EADDRNOTAVAIL)653649 tb_scan_xdomain(port);654654- return;650650+ goto out_rpm_put;655651 }656652657653 if (tb_switch_configure(sw)) {658654 tb_switch_put(sw);659659- return;655655+ goto out_rpm_put;660656 }661657662658 /*···685681686682 if (tb_switch_add(sw)) {687683 tb_switch_put(sw);688688- return;684684+ goto out_rpm_put;689685 }690686691687 /* Link the switches using both links if available */···737733738734 tb_add_dp_resources(sw);739735 tb_scan_switch(sw);736736+737737+out_rpm_put:738738+ if (port->usb4) {739739+ pm_runtime_mark_last_busy(&port->usb4->dev);740740+ pm_runtime_put_autosuspend(&port->usb4->dev);741741+ }740742}741743742744static void tb_deactivate_and_free_tunnel(struct tb_tunnel *tunnel)
+1-1
drivers/thunderbolt/tunnel.c
···12751275 return;12761276 } else if (!ret) {12771277 /* Use maximum link rate if the link valid is not set */12781278- ret = usb4_usb3_port_max_link_rate(tunnel->src_port);12781278+ ret = tb_usb3_max_link_rate(tunnel->dst_port, tunnel->src_port);12791279 if (ret < 0) {12801280 tb_tunnel_warn(tunnel, "failed to read maximum link rate\n");12811281 return;
+12-5
drivers/thunderbolt/xdomain.c
···14191419 * registered, we notify the userspace that it has changed.14201420 */14211421 if (!update) {14221422- struct tb_port *port;14221422+ /*14231423+ * Now disable lane 1 if bonding was not enabled. Do14241424+ * this only if bonding was possible at the beginning14251425+ * (that is we are the connection manager and there are14261426+ * two lanes).14271427+ */14281428+ if (xd->bonding_possible) {14291429+ struct tb_port *port;1423143014241424- /* Now disable lane 1 if bonding was not enabled */14251425- port = tb_port_at(xd->route, tb_xdomain_parent(xd));14261426- if (!port->bonded)14271427- tb_port_disable(port->dual_link_port);14311431+ port = tb_port_at(xd->route, tb_xdomain_parent(xd));14321432+ if (!port->bonded)14331433+ tb_port_disable(port->dual_link_port);14341434+ }1428143514291436 if (device_add(&xd->dev)) {14301437 dev_err(&xd->dev, "failed to add XDomain device\n");
···14661466 struct circ_buf *xmit = &uap->port.state->xmit;14671467 int count = uap->fifosize >> 1;1468146814691469+ if ((uap->port.rs485.flags & SER_RS485_ENABLED) &&14701470+ !uap->rs485_tx_started)14711471+ pl011_rs485_tx_start(uap);14721472+14691473 if (uap->port.x_char) {14701474 if (!pl011_tx_char(uap, uap->port.x_char, from_irq))14711475 return true;···14801476 pl011_stop_tx(&uap->port);14811477 return false;14821478 }14831483-14841484- if ((uap->port.rs485.flags & SER_RS485_ENABLED) &&14851485- !uap->rs485_tx_started)14861486- pl011_rs485_tx_start(uap);1487147914881480 /* If we are using DMA mode, try to send some characters. */14891481 if (pl011_dma_tx_irq(uap))
+1-7
drivers/tty/serial/atmel_serial.c
···26572657 else if (mr == ATMEL_US_PAR_ODD)26582658 *parity = 'o';2659265926602660- /*26612661- * The serial core only rounds down when matching this to a26622662- * supported baud rate. Make sure we don't end up slightly26632663- * lower than one of those, as it would make us fall through26642664- * to a much lower baud rate than we really want.26652665- */26662666- *baud = port->uartclk / (16 * (quot - 1));26602660+ *baud = port->uartclk / (16 * quot);26672661}2668266226692663static int __init atmel_console_setup(struct console *co, char *options)
+5-15
drivers/tty/serial/kgdboc.c
···171171 int err = -ENODEV;172172 char *cptr = config;173173 struct console *cons;174174+ int cookie;174175175176 if (!strlen(config) || isspace(config[0])) {176177 err = 0;···190189 if (kgdboc_register_kbd(&cptr))191190 goto do_register;192191193193- /*194194- * tty_find_polling_driver() can call uart_set_options()195195- * (via poll_init) to configure the uart. Take the console_list_lock196196- * in order to synchronize against register_console(), which can also197197- * configure the uart via uart_set_options(). This also allows safe198198- * traversal of the console list.199199- */200200- console_list_lock();201201-202192 p = tty_find_polling_driver(cptr, &tty_line);203203- if (!p) {204204- console_list_unlock();193193+ if (!p)205194 goto noconfig;206206- }207195208196 /*209197 * Take console_lock to serialize device() callback with···201211 */202212 console_lock();203213204204- for_each_console(cons) {214214+ cookie = console_srcu_read_lock();215215+ for_each_console_srcu(cons) {205216 int idx;206217 if (cons->device && cons->device(cons, &idx) == p &&207218 idx == tty_line) {···210219 break;211220 }212221 }222222+ console_srcu_read_unlock(cookie);213223214224 console_unlock();215215-216216- console_list_unlock();217225218226 kgdb_tty_driver = p;219227 kgdb_tty_line = tty_line;
···22122212 * @parity: parity character - 'n' (none), 'o' (odd), 'e' (even)22132213 * @bits: number of data bits22142214 * @flow: flow control character - 'r' (rts)22152215+ *22162216+ * Locking: Caller must hold console_list_lock in order to serialize22172217+ * early initialization of the serial-console lock.22152218 */22162219int22172220uart_set_options(struct uart_port *port, struct console *co,···2622261926232620 if (!ret && options) {26242621 uart_parse_options(options, &baud, &parity, &bits, &flow);26222622+ console_list_lock();26252623 ret = uart_set_options(port, NULL, baud, parity, bits, flow);26242624+ console_list_unlock();26262625 }26272626out:26282627 mutex_unlock(&tport->mutex);
+12
drivers/usb/cdns3/cdns3-gadget.c
···26142614 u8 req_on_hw_ring = 0;26152615 unsigned long flags;26162616 int ret = 0;26172617+ int val;2617261826182619 if (!ep || !request || !ep->desc)26192620 return -EINVAL;···2650264926512650 /* Update ring only if removed request is on pending_req_list list */26522651 if (req_on_hw_ring && link_trb) {26522652+ /* Stop DMA */26532653+ writel(EP_CMD_DFLUSH, &priv_dev->regs->ep_cmd);26542654+26552655+ /* wait for DFLUSH cleared */26562656+ readl_poll_timeout_atomic(&priv_dev->regs->ep_cmd, val,26572657+ !(val & EP_CMD_DFLUSH), 1, 1000);26582658+26532659 link_trb->buffer = cpu_to_le32(TRB_BUFFER(priv_ep->trb_pool_dma +26542660 ((priv_req->end_trb + 1) * TRB_SIZE)));26552661 link_trb->control = cpu_to_le32((le32_to_cpu(link_trb->control) & TRB_CYCLE) |···26672659 }2668266026692661 cdns3_gadget_giveback(priv_ep, priv_req, -ECONNRESET);26622662+26632663+ req = cdns3_next_request(&priv_ep->pending_req_list);26642664+ if (req)26652665+ cdns3_rearm_transfer(priv_ep, 1);2670266626712667not_found:26722668 spin_unlock_irqrestore(&priv_dev->lock, flags);
···3737}3838EXPORT_SYMBOL_GPL(usb_acpi_power_manageable);39394040+#define UUID_USB_CONTROLLER_DSM "ce2ee385-00e6-48cb-9f05-2edb927c4899"4141+#define USB_DSM_DISABLE_U1_U2_FOR_PORT 54242+4343+/**4444+ * usb_acpi_port_lpm_incapable - check if lpm should be disabled for a port.4545+ * @hdev: USB device belonging to the usb hub4646+ * @index: zero based port index4747+ *4848+ * Some USB3 ports may not support USB3 link power management U1/U2 states4949+ * due to different retimer setup. ACPI provides _DSM method which returns 0x015050+ * if U1 and U2 states should be disabled. Evaluate _DSM with:5151+ * Arg0: UUID = ce2ee385-00e6-48cb-9f05-2edb927c48995252+ * Arg1: Revision ID = 05353+ * Arg2: Function Index = 55454+ * Arg3: (empty)5555+ *5656+ * Return 1 if USB3 port is LPM incapable, negative on error, otherwise 05757+ */5858+5959+int usb_acpi_port_lpm_incapable(struct usb_device *hdev, int index)6060+{6161+ union acpi_object *obj;6262+ acpi_handle port_handle;6363+ int port1 = index + 1;6464+ guid_t guid;6565+ int ret;6666+6767+ ret = guid_parse(UUID_USB_CONTROLLER_DSM, &guid);6868+ if (ret)6969+ return ret;7070+7171+ port_handle = usb_get_hub_port_acpi_handle(hdev, port1);7272+ if (!port_handle) {7373+ dev_dbg(&hdev->dev, "port-%d no acpi handle\n", port1);7474+ return -ENODEV;7575+ }7676+7777+ if (!acpi_check_dsm(port_handle, &guid, 0,7878+ BIT(USB_DSM_DISABLE_U1_U2_FOR_PORT))) {7979+ dev_dbg(&hdev->dev, "port-%d no _DSM function %d\n",8080+ port1, USB_DSM_DISABLE_U1_U2_FOR_PORT);8181+ return -ENODEV;8282+ }8383+8484+ obj = acpi_evaluate_dsm(port_handle, &guid, 0,8585+ USB_DSM_DISABLE_U1_U2_FOR_PORT, NULL);8686+8787+ if (!obj)8888+ return -ENODEV;8989+9090+ if (obj->type != ACPI_TYPE_INTEGER) {9191+ dev_dbg(&hdev->dev, "evaluate port-%d _DSM failed\n", port1);9292+ ACPI_FREE(obj);9393+ return -EINVAL;9494+ }9595+9696+ if (obj->integer.value == 0x01)9797+ ret = 1;9898+9999+ ACPI_FREE(obj);100100+101101+ return ret;102102+}103103+EXPORT_SYMBOL_GPL(usb_acpi_port_lpm_incapable);104104+40105/**41106 * usb_acpi_set_power_state - control usb port's power via acpi power42107 * resource
+1-1
drivers/usb/dwc3/Kconfig
···33config USB_DWC344 tristate "DesignWare USB3 DRD Core Support"55 depends on (USB || USB_GADGET) && HAS_DMA66+ depends on (EXTCON || EXTCON=n)67 select USB_XHCI_PLATFORM if USB_XHCI_HCD78 select USB_ROLE_SWITCH if USB_DWC3_DUAL_ROLE89 help···4544config USB_DWC3_DUAL_ROLE4645 bool "Dual Role mode"4746 depends on ((USB=y || USB=USB_DWC3) && (USB_GADGET=y || USB_GADGET=USB_DWC3))4848- depends on (EXTCON=y || EXTCON=USB_DWC3)4947 help5048 This is the default mode of working of DWC3 controller where5149 both host and gadget features are enabled.
···5151 dev->search_count = w1_search_count;5252 dev->enable_pullup = w1_enable_pullup;53535454- /* 1 for w1_process to decrement5555- * 1 for __w1_remove_master_device to decrement5454+ /* For __w1_remove_master_device to decrement5655 */5757- atomic_set(&dev->refcnt, 2);5656+ atomic_set(&dev->refcnt, 1);58575958 INIT_LIST_HEAD(&dev->slist);6059 INIT_LIST_HEAD(&dev->async_list);
+10-3
fs/btrfs/file.c
···35413541 struct extent_buffer *leaf = path->nodes[0];35423542 struct btrfs_file_extent_item *extent;35433543 u64 extent_end;35443544+ u8 type;3544354535453546 if (path->slots[0] >= btrfs_header_nritems(leaf)) {35463547 ret = btrfs_next_leaf(root, path);···3597359635983597 extent = btrfs_item_ptr(leaf, path->slots[0],35993598 struct btrfs_file_extent_item);35993599+ type = btrfs_file_extent_type(leaf, extent);3600360036013601- if (btrfs_file_extent_disk_bytenr(leaf, extent) == 0 ||36023602- btrfs_file_extent_type(leaf, extent) ==36033603- BTRFS_FILE_EXTENT_PREALLOC) {36013601+ /*36023602+ * Can't access the extent's disk_bytenr field if this is an36033603+ * inline extent, since at that offset, it's where the extent36043604+ * data starts.36053605+ */36063606+ if (type == BTRFS_FILE_EXTENT_PREALLOC ||36073607+ (type == BTRFS_FILE_EXTENT_REG &&36083608+ btrfs_file_extent_disk_bytenr(leaf, extent) == 0)) {36043609 /*36053610 * Explicit hole or prealloc extent, search for delalloc.36063611 * A prealloc extent is treated like a hole.
+17-8
fs/btrfs/qgroup.c
···33673367 int err = -ENOMEM;33683368 int ret = 0;33693369 bool stopped = false;33703370+ bool did_leaf_rescans = false;3370337133713372 path = btrfs_alloc_path();33723373 if (!path)···33883387 }3389338833903389 err = qgroup_rescan_leaf(trans, path);33903390+ did_leaf_rescans = true;3391339133923392 if (err > 0)33933393 btrfs_commit_transaction(trans);···34093407 mutex_unlock(&fs_info->qgroup_rescan_lock);3410340834113409 /*34123412- * only update status, since the previous part has already updated the34133413- * qgroup info.34103410+ * Only update status, since the previous part has already updated the34113411+ * qgroup info, and only if we did any actual work. This also prevents34123412+ * race with a concurrent quota disable, which has already set34133413+ * fs_info->quota_root to NULL and cleared BTRFS_FS_QUOTA_ENABLED at34143414+ * btrfs_quota_disable().34143415 */34153415- trans = btrfs_start_transaction(fs_info->quota_root, 1);34163416- if (IS_ERR(trans)) {34173417- err = PTR_ERR(trans);34163416+ if (did_leaf_rescans) {34173417+ trans = btrfs_start_transaction(fs_info->quota_root, 1);34183418+ if (IS_ERR(trans)) {34193419+ err = PTR_ERR(trans);34203420+ trans = NULL;34213421+ btrfs_err(fs_info,34223422+ "fail to start transaction for status update: %d",34233423+ err);34243424+ }34253425+ } else {34183426 trans = NULL;34193419- btrfs_err(fs_info,34203420- "fail to start transaction for status update: %d",34213421- err);34223427 }3423342834243429 mutex_lock(&fs_info->qgroup_rescan_lock);
+25-25
fs/btrfs/volumes.c
···20142014 return num_devices;20152015}2016201620172017+static void btrfs_scratch_superblock(struct btrfs_fs_info *fs_info,20182018+ struct block_device *bdev, int copy_num)20192019+{20202020+ struct btrfs_super_block *disk_super;20212021+ const size_t len = sizeof(disk_super->magic);20222022+ const u64 bytenr = btrfs_sb_offset(copy_num);20232023+ int ret;20242024+20252025+ disk_super = btrfs_read_disk_super(bdev, bytenr, bytenr);20262026+ if (IS_ERR(disk_super))20272027+ return;20282028+20292029+ memset(&disk_super->magic, 0, len);20302030+ folio_mark_dirty(virt_to_folio(disk_super));20312031+ btrfs_release_disk_super(disk_super);20322032+20332033+ ret = sync_blockdev_range(bdev, bytenr, bytenr + len - 1);20342034+ if (ret)20352035+ btrfs_warn(fs_info, "error clearing superblock number %d (%d)",20362036+ copy_num, ret);20372037+}20382038+20172039void btrfs_scratch_superblocks(struct btrfs_fs_info *fs_info,20182040 struct block_device *bdev,20192041 const char *device_path)20202042{20212021- struct btrfs_super_block *disk_super;20222043 int copy_num;2023204420242045 if (!bdev)20252046 return;2026204720272048 for (copy_num = 0; copy_num < BTRFS_SUPER_MIRROR_MAX; copy_num++) {20282028- struct page *page;20292029- int ret;20302030-20312031- disk_super = btrfs_read_dev_one_super(bdev, copy_num, false);20322032- if (IS_ERR(disk_super))20332033- continue;20342034-20352035- if (bdev_is_zoned(bdev)) {20492049+ if (bdev_is_zoned(bdev))20362050 btrfs_reset_sb_log_zones(bdev, copy_num);20372037- continue;20382038- }20392039-20402040- memset(&disk_super->magic, 0, sizeof(disk_super->magic));20412041-20422042- page = virt_to_page(disk_super);20432043- set_page_dirty(page);20442044- lock_page(page);20452045- /* write_on_page() unlocks the page */20462046- ret = write_one_page(page);20472047- if (ret)20482048- btrfs_warn(fs_info,20492049- "error clearing superblock number %d (%d)",20502050- copy_num, ret);20512051- btrfs_release_disk_super(disk_super);20522052-20512051+ else20522052+ btrfs_scratch_superblock(fs_info, bdev, copy_num);20532053 }2054205420552055 /* Notify udev that device has changed */
+95-146
fs/cifs/dfs_cache.c
···269269 list_for_each_entry(t, &ce->tlist, list) {270270 seq_printf(m, " %s%s\n",271271 t->name,272272- ce->tgthint == t ? " (target hint)" : "");272272+ READ_ONCE(ce->tgthint) == t ? " (target hint)" : "");273273 }274274 }275275 }···321321 cifs_dbg(FYI, "target list:\n");322322 list_for_each_entry(t, &ce->tlist, list) {323323 cifs_dbg(FYI, " %s%s\n", t->name,324324- ce->tgthint == t ? " (target hint)" : "");324324+ READ_ONCE(ce->tgthint) == t ? " (target hint)" : "");325325 }326326}327327···427427/* Return target hint of a DFS cache entry */428428static inline char *get_tgt_name(const struct cache_entry *ce)429429{430430- struct cache_dfs_tgt *t = ce->tgthint;430430+ struct cache_dfs_tgt *t = READ_ONCE(ce->tgthint);431431432432 return t ? t->name : ERR_PTR(-ENOENT);433433}···470470static int copy_ref_data(const struct dfs_info3_param *refs, int numrefs,471471 struct cache_entry *ce, const char *tgthint)472472{473473+ struct cache_dfs_tgt *target;473474 int i;474475475476 ce->ttl = max_t(int, refs[0].ttl, CACHE_MIN_TTL);···497496 ce->numtgts++;498497 }499498500500- ce->tgthint = list_first_entry_or_null(&ce->tlist,501501- struct cache_dfs_tgt, list);499499+ target = list_first_entry_or_null(&ce->tlist, struct cache_dfs_tgt,500500+ list);501501+ WRITE_ONCE(ce->tgthint, target);502502503503 return 0;504504}···560558}561559562560/* Add a new DFS cache entry */563563-static int add_cache_entry_locked(struct dfs_info3_param *refs, int numrefs)561561+static struct cache_entry *add_cache_entry_locked(struct dfs_info3_param *refs,562562+ int numrefs)564563{565564 int rc;566565 struct cache_entry *ce;···576573577574 rc = cache_entry_hash(refs[0].path_name, strlen(refs[0].path_name), &hash);578575 if (rc)579579- return rc;576576+ return ERR_PTR(rc);580577581578 ce = alloc_cache_entry(refs, numrefs);582579 if (IS_ERR(ce))583583- return PTR_ERR(ce);580580+ return ce;584581585582 spin_lock(&cache_ttl_lock);586583 if (!cache_ttl) {···597594598595 atomic_inc(&cache_count);599596600600- return 0;597597+ return ce;601598}602599603600/* Check if two DFS paths are equal. @s1 and @s2 are expected to be in @cache_cp's charset */···644641 *645642 * Use whole path components in the match. Must be called with htable_rw_lock held.646643 *644644+ * Return cached entry if successful.647645 * Return ERR_PTR(-ENOENT) if the entry is not found.646646+ * Return error ptr otherwise.648647 */649648static struct cache_entry *lookup_cache_entry(const char *path)650649{···716711static int update_cache_entry_locked(struct cache_entry *ce, const struct dfs_info3_param *refs,717712 int numrefs)718713{714714+ struct cache_dfs_tgt *target;715715+ char *th = NULL;719716 int rc;720720- char *s, *th = NULL;721717722718 WARN_ON(!rwsem_is_locked(&htable_rw_lock));723719724724- if (ce->tgthint) {725725- s = ce->tgthint->name;726726- th = kstrdup(s, GFP_ATOMIC);720720+ target = READ_ONCE(ce->tgthint);721721+ if (target) {722722+ th = kstrdup(target->name, GFP_ATOMIC);727723 if (!th)728724 return -ENOMEM;729725 }···773767 *774768 * For interlinks, cifs_mount() and expand_dfs_referral() are supposed to775769 * handle them properly.770770+ *771771+ * On success, return entry with acquired lock for reading, otherwise error ptr.776772 */777777-static int cache_refresh_path(const unsigned int xid, struct cifs_ses *ses, const char *path)773773+static struct cache_entry *cache_refresh_path(const unsigned int xid,774774+ struct cifs_ses *ses,775775+ const char *path,776776+ bool force_refresh)778777{779779- int rc;780780- struct cache_entry *ce;781778 struct dfs_info3_param *refs = NULL;779779+ struct cache_entry *ce;782780 int numrefs = 0;783783- bool newent = false;781781+ int rc;784782785783 cifs_dbg(FYI, "%s: search path: %s\n", __func__, path);786784787787- down_write(&htable_rw_lock);785785+ down_read(&htable_rw_lock);788786789787 ce = lookup_cache_entry(path);790788 if (!IS_ERR(ce)) {791791- if (!cache_entry_expired(ce)) {792792- dump_ce(ce);793793- up_write(&htable_rw_lock);794794- return 0;795795- }796796- } else {797797- newent = true;789789+ if (!force_refresh && !cache_entry_expired(ce))790790+ return ce;791791+ } else if (PTR_ERR(ce) != -ENOENT) {792792+ up_read(&htable_rw_lock);793793+ return ce;798794 }799795800796 /*801801- * Either the entry was not found, or it is expired.797797+ * Unlock shared access as we don't want to hold any locks while getting798798+ * a new referral. The @ses used for performing the I/O could be799799+ * reconnecting and it acquires @htable_rw_lock to look up the dfs cache800800+ * in order to failover -- if necessary.801801+ */802802+ up_read(&htable_rw_lock);803803+804804+ /*805805+ * Either the entry was not found, or it is expired, or it is a forced806806+ * refresh.802807 * Request a new DFS referral in order to create or update a cache entry.803808 */804809 rc = get_dfs_referral(xid, ses, path, &refs, &numrefs);805805- if (rc)806806- goto out_unlock;810810+ if (rc) {811811+ ce = ERR_PTR(rc);812812+ goto out;813813+ }807814808815 dump_refs(refs, numrefs);809816810810- if (!newent) {811811- rc = update_cache_entry_locked(ce, refs, numrefs);812812- goto out_unlock;817817+ down_write(&htable_rw_lock);818818+ /* Re-check as another task might have it added or refreshed already */819819+ ce = lookup_cache_entry(path);820820+ if (!IS_ERR(ce)) {821821+ if (force_refresh || cache_entry_expired(ce)) {822822+ rc = update_cache_entry_locked(ce, refs, numrefs);823823+ if (rc)824824+ ce = ERR_PTR(rc);825825+ }826826+ } else if (PTR_ERR(ce) == -ENOENT) {827827+ ce = add_cache_entry_locked(refs, numrefs);813828 }814829815815- rc = add_cache_entry_locked(refs, numrefs);830830+ if (IS_ERR(ce)) {831831+ up_write(&htable_rw_lock);832832+ goto out;833833+ }816834817817-out_unlock:818818- up_write(&htable_rw_lock);835835+ downgrade_write(&htable_rw_lock);836836+out:819837 free_dfs_info_array(refs, numrefs);820820- return rc;838838+ return ce;821839}822840823841/*···908878 }909879 it->it_path_consumed = t->path_consumed;910880911911- if (ce->tgthint == t)881881+ if (READ_ONCE(ce->tgthint) == t)912882 list_add(&it->it_list, head);913883 else914884 list_add_tail(&it->it_list, head);···961931 if (IS_ERR(npath))962932 return PTR_ERR(npath);963933964964- rc = cache_refresh_path(xid, ses, npath);965965- if (rc)966966- goto out_free_path;967967-968968- down_read(&htable_rw_lock);969969-970970- ce = lookup_cache_entry(npath);934934+ ce = cache_refresh_path(xid, ses, npath, false);971935 if (IS_ERR(ce)) {972972- up_read(&htable_rw_lock);973936 rc = PTR_ERR(ce);974937 goto out_free_path;975938 }···10261003}1027100410281005/**10291029- * dfs_cache_update_tgthint - update target hint of a DFS cache entry10301030- *10311031- * If it doesn't find the cache entry, then it will get a DFS referral for @path10321032- * and create a new entry.10331033- *10341034- * In case the cache entry exists but expired, it will get a DFS referral10351035- * for @path and then update the respective cache entry.10361036- *10371037- * @xid: syscall id10381038- * @ses: smb session10391039- * @cp: codepage10401040- * @remap: type of character remapping for paths10411041- * @path: path to lookup in DFS referral cache10421042- * @it: DFS target iterator10431043- *10441044- * Return zero if the target hint was updated successfully, otherwise non-zero.10451045- */10461046-int dfs_cache_update_tgthint(const unsigned int xid, struct cifs_ses *ses,10471047- const struct nls_table *cp, int remap, const char *path,10481048- const struct dfs_cache_tgt_iterator *it)10491049-{10501050- int rc;10511051- const char *npath;10521052- struct cache_entry *ce;10531053- struct cache_dfs_tgt *t;10541054-10551055- npath = dfs_cache_canonical_path(path, cp, remap);10561056- if (IS_ERR(npath))10571057- return PTR_ERR(npath);10581058-10591059- cifs_dbg(FYI, "%s: update target hint - path: %s\n", __func__, npath);10601060-10611061- rc = cache_refresh_path(xid, ses, npath);10621062- if (rc)10631063- goto out_free_path;10641064-10651065- down_write(&htable_rw_lock);10661066-10671067- ce = lookup_cache_entry(npath);10681068- if (IS_ERR(ce)) {10691069- rc = PTR_ERR(ce);10701070- goto out_unlock;10711071- }10721072-10731073- t = ce->tgthint;10741074-10751075- if (likely(!strcasecmp(it->it_name, t->name)))10761076- goto out_unlock;10771077-10781078- list_for_each_entry(t, &ce->tlist, list) {10791079- if (!strcasecmp(t->name, it->it_name)) {10801080- ce->tgthint = t;10811081- cifs_dbg(FYI, "%s: new target hint: %s\n", __func__,10821082- it->it_name);10831083- break;10841084- }10851085- }10861086-10871087-out_unlock:10881088- up_write(&htable_rw_lock);10891089-out_free_path:10901090- kfree(npath);10911091- return rc;10921092-}10931093-10941094-/**10951006 * dfs_cache_noreq_update_tgthint - update target hint of a DFS cache entry10961007 * without sending any requests to the currently connected server.10971008 *···1049109210501093 cifs_dbg(FYI, "%s: path: %s\n", __func__, path);1051109410521052- if (!down_write_trylock(&htable_rw_lock))10531053- return;10951095+ down_read(&htable_rw_lock);1054109610551097 ce = lookup_cache_entry(path);10561098 if (IS_ERR(ce))10571099 goto out_unlock;1058110010591059- t = ce->tgthint;11011101+ t = READ_ONCE(ce->tgthint);1060110210611103 if (unlikely(!strcasecmp(it->it_name, t->name)))10621104 goto out_unlock;1063110510641106 list_for_each_entry(t, &ce->tlist, list) {10651107 if (!strcasecmp(t->name, it->it_name)) {10661066- ce->tgthint = t;11081108+ WRITE_ONCE(ce->tgthint, t);10671109 cifs_dbg(FYI, "%s: new target hint: %s\n", __func__,10681110 it->it_name);10691111 break;···10701114 }1071111510721116out_unlock:10731073- up_write(&htable_rw_lock);11171117+ up_read(&htable_rw_lock);10741118}1075111910761120/**···12761320 * Mark dfs tcon for reconnecting when the currently connected tcon does not match any of the new12771321 * target shares in @refs.12781322 */12791279-static void mark_for_reconnect_if_needed(struct cifs_tcon *tcon, struct dfs_cache_tgt_list *tl,12801280- const struct dfs_info3_param *refs, int numrefs)13231323+static void mark_for_reconnect_if_needed(struct TCP_Server_Info *server,13241324+ struct dfs_cache_tgt_list *old_tl,13251325+ struct dfs_cache_tgt_list *new_tl)12811326{12821282- struct dfs_cache_tgt_iterator *it;12831283- int i;13271327+ struct dfs_cache_tgt_iterator *oit, *nit;1284132812851285- for (it = dfs_cache_get_tgt_iterator(tl); it; it = dfs_cache_get_next_tgt(tl, it)) {12861286- for (i = 0; i < numrefs; i++) {12871287- if (target_share_equal(tcon->ses->server, dfs_cache_get_tgt_name(it),12881288- refs[i].node_name))13291329+ for (oit = dfs_cache_get_tgt_iterator(old_tl); oit;13301330+ oit = dfs_cache_get_next_tgt(old_tl, oit)) {13311331+ for (nit = dfs_cache_get_tgt_iterator(new_tl); nit;13321332+ nit = dfs_cache_get_next_tgt(new_tl, nit)) {13331333+ if (target_share_equal(server,13341334+ dfs_cache_get_tgt_name(oit),13351335+ dfs_cache_get_tgt_name(nit)))12891336 return;12901337 }12911338 }1292133912931340 cifs_dbg(FYI, "%s: no cached or matched targets. mark dfs share for reconnect.\n", __func__);12941294- cifs_signal_cifsd_for_reconnect(tcon->ses->server, true);13411341+ cifs_signal_cifsd_for_reconnect(server, true);12951342}1296134312971344/* Refresh dfs referral of tcon and mark it for reconnect if needed */12981345static int __refresh_tcon(const char *path, struct cifs_tcon *tcon, bool force_refresh)12991346{13001300- struct dfs_cache_tgt_list tl = DFS_CACHE_TGT_LIST_INIT(tl);13471347+ struct dfs_cache_tgt_list old_tl = DFS_CACHE_TGT_LIST_INIT(old_tl);13481348+ struct dfs_cache_tgt_list new_tl = DFS_CACHE_TGT_LIST_INIT(new_tl);13011349 struct cifs_ses *ses = CIFS_DFS_ROOT_SES(tcon->ses);13021350 struct cifs_tcon *ipc = ses->tcon_ipc;13031303- struct dfs_info3_param *refs = NULL;13041351 bool needs_refresh = false;13051352 struct cache_entry *ce;13061353 unsigned int xid;13071307- int numrefs = 0;13081354 int rc = 0;1309135513101356 xid = get_xid();···13151357 ce = lookup_cache_entry(path);13161358 needs_refresh = force_refresh || IS_ERR(ce) || cache_entry_expired(ce);13171359 if (!IS_ERR(ce)) {13181318- rc = get_targets(ce, &tl);13191319- if (rc)13201320- cifs_dbg(FYI, "%s: could not get dfs targets: %d\n", __func__, rc);13601360+ rc = get_targets(ce, &old_tl);13611361+ cifs_dbg(FYI, "%s: get_targets: %d\n", __func__, rc);13211362 }13221363 up_read(&htable_rw_lock);13231364···13331376 }13341377 spin_unlock(&ipc->tc_lock);1335137813361336- rc = get_dfs_referral(xid, ses, path, &refs, &numrefs);13371337- if (!rc) {13381338- /* Create or update a cache entry with the new referral */13391339- dump_refs(refs, numrefs);13401340-13411341- down_write(&htable_rw_lock);13421342- ce = lookup_cache_entry(path);13431343- if (IS_ERR(ce))13441344- add_cache_entry_locked(refs, numrefs);13451345- else if (force_refresh || cache_entry_expired(ce))13461346- update_cache_entry_locked(ce, refs, numrefs);13471347- up_write(&htable_rw_lock);13481348-13491349- mark_for_reconnect_if_needed(tcon, &tl, refs, numrefs);13791379+ ce = cache_refresh_path(xid, ses, path, true);13801380+ if (!IS_ERR(ce)) {13811381+ rc = get_targets(ce, &new_tl);13821382+ up_read(&htable_rw_lock);13831383+ cifs_dbg(FYI, "%s: get_targets: %d\n", __func__, rc);13841384+ mark_for_reconnect_if_needed(tcon->ses->server, &old_tl, &new_tl);13501385 }1351138613521387out:13531388 free_xid(xid);13541354- dfs_cache_free_tgts(&tl);13551355- free_dfs_info_array(refs, numrefs);13891389+ dfs_cache_free_tgts(&old_tl);13901390+ dfs_cache_free_tgts(&new_tl);13561391 return rc;13571392}13581393
···8181 struct mb_cache_entry **);8282static __le32 ext4_xattr_hash_entry(char *name, size_t name_len, __le32 *value,8383 size_t value_count);8484+static __le32 ext4_xattr_hash_entry_signed(char *name, size_t name_len, __le32 *value,8585+ size_t value_count);8486static void ext4_xattr_rehash(struct ext4_xattr_header *);85878688static const struct xattr_handler * const ext4_xattr_handler_map[] = {···472470 tmp_data = cpu_to_le32(hash);473471 e_hash = ext4_xattr_hash_entry(entry->e_name, entry->e_name_len,474472 &tmp_data, 1);475475- if (e_hash != entry->e_hash)476476- return -EFSCORRUPTED;473473+ /* All good? */474474+ if (e_hash == entry->e_hash)475475+ return 0;476476+477477+ /*478478+ * Not good. Maybe the entry hash was calculated479479+ * using the buggy signed char version?480480+ */481481+ e_hash = ext4_xattr_hash_entry_signed(entry->e_name, entry->e_name_len,482482+ &tmp_data, 1);483483+ if (e_hash == entry->e_hash)484484+ return 0;485485+486486+ /* Still no match - bad */487487+ return -EFSCORRUPTED;477488 }478489 return 0;479490}···30973082 hash = (hash << NAME_HASH_SHIFT) ^30983083 (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^30993084 *name++;30853085+ }30863086+ while (value_count--) {30873087+ hash = (hash << VALUE_HASH_SHIFT) ^30883088+ (hash >> (8*sizeof(hash) - VALUE_HASH_SHIFT)) ^30893089+ le32_to_cpu(*value++);30903090+ }30913091+ return cpu_to_le32(hash);30923092+}30933093+30943094+/*30953095+ * ext4_xattr_hash_entry_signed()30963096+ *30973097+ * Compute the hash of an extended attribute incorrectly.30983098+ */30993099+static __le32 ext4_xattr_hash_entry_signed(char *name, size_t name_len, __le32 *value, size_t value_count)31003100+{31013101+ __u32 hash = 0;31023102+31033103+ while (name_len--) {31043104+ hash = (hash << NAME_HASH_SHIFT) ^31053105+ (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^31063106+ (signed char)*name++;31003107 }31013108 while (value_count--) {31023109 hash = (hash << VALUE_HASH_SHIFT) ^
+10-1
fs/gfs2/log.c
···8080 brelse(bd->bd_bh);8181}82828383+static int __gfs2_writepage(struct page *page, struct writeback_control *wbc,8484+ void *data)8585+{8686+ struct address_space *mapping = data;8787+ int ret = mapping->a_ops->writepage(page, wbc);8888+ mapping_set_error(mapping, ret);8989+ return ret;9090+}9191+8392/**8493 * gfs2_ail1_start_one - Start I/O on a transaction8594 * @sdp: The superblock···140131 if (!mapping)141132 continue;142133 spin_unlock(&sdp->sd_ail_lock);143143- ret = filemap_fdatawrite_wbc(mapping, wbc);134134+ ret = write_cache_pages(mapping, wbc, __gfs2_writepage, mapping);144135 if (need_resched()) {145136 blk_finish_plug(plug);146137 cond_resched();
+22
fs/zonefs/super.c
···442442 data_size = zonefs_check_zone_condition(inode, zone,443443 false, false);444444 }445445+ } else if (sbi->s_mount_opts & ZONEFS_MNTOPT_ERRORS_RO &&446446+ data_size > isize) {447447+ /* Do not expose garbage data */448448+ data_size = isize;445449 }446450447451 /*···808804 bio_set_polled(bio, iocb);809805810806 ret = submit_bio_wait(bio);807807+808808+ /*809809+ * If the file zone was written underneath the file system, the zone810810+ * write pointer may not be where we expect it to be, but the zone811811+ * append write can still succeed. So check manually that we wrote where812812+ * we intended to, that is, at zi->i_wpoffset.813813+ */814814+ if (!ret) {815815+ sector_t wpsector =816816+ zi->i_zsector + (zi->i_wpoffset >> SECTOR_SHIFT);817817+818818+ if (bio->bi_iter.bi_sector != wpsector) {819819+ zonefs_warn(inode->i_sb,820820+ "Corrupted write pointer %llu for zone at %llu\n",821821+ wpsector, zi->i_zsector);822822+ ret = -EIO;823823+ }824824+ }811825812826 zonefs_file_write_dio_end_io(iocb, size, ret, 0);813827 trace_zonefs_file_dio_append(inode, size, ret);
···267267}268268269269/**270270- * usb_set_intfdata() - associate driver-specific data with the interface271271- * @intf: the usb interface272272- * @data: pointer to the device priv structure or %NULL270270+ * usb_set_intfdata() - associate driver-specific data with an interface271271+ * @intf: USB interface272272+ * @data: driver data273273 *274274- * Drivers should use this function in their probe() to associate their275275- * driver-specific data with the usb interface.274274+ * Drivers can use this function in their probe() callbacks to associate275275+ * driver-specific data with an interface.276276 *277277- * When disconnecting, the core will take care of setting @intf back to %NULL,278278- * so no actions are needed on the driver side. The interface should not be set279279- * to %NULL before all actions completed (e.g. no outsanding URB remaining).277277+ * Note that there is generally no need to clear the driver-data pointer even278278+ * if some drivers do so for historical or implementation-specific reasons.280279 */281280static inline void usb_set_intfdata(struct usb_interface *intf, void *data)282281{···773774extern int usb_acpi_set_power_state(struct usb_device *hdev, int index,774775 bool enable);775776extern bool usb_acpi_power_manageable(struct usb_device *hdev, int index);777777+extern int usb_acpi_port_lpm_incapable(struct usb_device *hdev, int index);776778#else777779static inline int usb_acpi_set_power_state(struct usb_device *hdev, int index,778780 bool enable) { return 0; }779781static inline bool usb_acpi_power_manageable(struct usb_device *hdev, int index)780782 { return true; }783783+static inline int usb_acpi_port_lpm_incapable(struct usb_device *hdev, int index)784784+ { return 0; }781785#endif782786783787/* USB autosuspend and autoresume */
-4
include/net/mac80211.h
···18321832 * @drv_priv: data area for driver use, will always be aligned to18331833 * sizeof(void \*).18341834 * @txq: the multicast data TX queue18351835- * @txqs_stopped: per AC flag to indicate that intermediate TXQs are stopped,18361836- * protected by fq->lock.18371835 * @offload_flags: 802.3 -> 802.11 enapsulation offload flags, see18381836 * &enum ieee80211_offload_flags.18391837 * @mbssid_tx_vif: Pointer to the transmitting interface if MBSSID is enabled.···1860186218611863 bool probe_req_reg;18621864 bool rx_mcast_action_reg;18631863-18641864- bool txqs_stopped[IEEE80211_NUM_ACS];1865186518661866 struct ieee80211_vif *mbssid_tx_vif;18671867
+7
include/net/sch_generic.h
···1288128812891289int sch_frag_xmit_hook(struct sk_buff *skb, int (*xmit)(struct sk_buff *skb));1290129012911291+/* Make sure qdisc is no longer in SCHED state. */12921292+static inline void qdisc_synchronize(const struct Qdisc *q)12931293+{12941294+ while (test_bit(__QDISC_STATE_SCHED, &q->state))12951295+ msleep(1);12961296+}12971297+12911298#endif
···204204 appended after any matching localversion* files, and after the value205205 set in CONFIG_LOCALVERSION.206206207207- (The actual string used here is the first eight characters produced207207+ (The actual string used here is the first 12 characters produced208208 by running the command:209209210210 $ git rev-parse --verify HEAD
···3674367436753675 if (ctx->flags & IORING_SETUP_SINGLE_ISSUER36763676 && !(ctx->flags & IORING_SETUP_R_DISABLED))36773677- ctx->submitter_task = get_task_struct(current);36773677+ WRITE_ONCE(ctx->submitter_task, get_task_struct(current));3678367836793679 file = io_uring_get_file(ctx);36803680 if (IS_ERR(file)) {···38683868 return -EBADFD;3869386938703870 if (ctx->flags & IORING_SETUP_SINGLE_ISSUER && !ctx->submitter_task)38713871- ctx->submitter_task = get_task_struct(current);38713871+ WRITE_ONCE(ctx->submitter_task, get_task_struct(current));3872387238733873 if (ctx->restrictions.registered)38743874 ctx->restricted = 1;
+98-64
io_uring/msg_ring.c
···2525 u32 flags;2626};27272828-void io_msg_ring_cleanup(struct io_kiocb *req)2929-{3030- struct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);3131-3232- if (WARN_ON_ONCE(!msg->src_file))3333- return;3434-3535- fput(msg->src_file);3636- msg->src_file = NULL;3737-}3838-3939-static void io_msg_tw_complete(struct callback_head *head)4040-{4141- struct io_msg *msg = container_of(head, struct io_msg, tw);4242- struct io_kiocb *req = cmd_to_io_kiocb(msg);4343- struct io_ring_ctx *target_ctx = req->file->private_data;4444- int ret = 0;4545-4646- if (current->flags & PF_EXITING)4747- ret = -EOWNERDEAD;4848- else if (!io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0))4949- ret = -EOVERFLOW;5050-5151- if (ret < 0)5252- req_set_fail(req);5353- io_req_queue_tw_complete(req, ret);5454-}5555-5656-static int io_msg_ring_data(struct io_kiocb *req)5757-{5858- struct io_ring_ctx *target_ctx = req->file->private_data;5959- struct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);6060-6161- if (msg->src_fd || msg->dst_fd || msg->flags)6262- return -EINVAL;6363-6464- if (target_ctx->task_complete && current != target_ctx->submitter_task) {6565- init_task_work(&msg->tw, io_msg_tw_complete);6666- if (task_work_add(target_ctx->submitter_task, &msg->tw,6767- TWA_SIGNAL_NO_IPI))6868- return -EOWNERDEAD;6969-7070- atomic_or(IORING_SQ_TASKRUN, &target_ctx->rings->sq_flags);7171- return IOU_ISSUE_SKIP_COMPLETE;7272- }7373-7474- if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0))7575- return 0;7676-7777- return -EOVERFLOW;7878-}7979-8080-static void io_double_unlock_ctx(struct io_ring_ctx *octx,8181- unsigned int issue_flags)2828+static void io_double_unlock_ctx(struct io_ring_ctx *octx)8229{8330 mutex_unlock(&octx->uring_lock);8431}···4598 }4699 mutex_lock(&octx->uring_lock);47100 return 0;101101+}102102+103103+void io_msg_ring_cleanup(struct io_kiocb *req)104104+{105105+ struct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);106106+107107+ if (WARN_ON_ONCE(!msg->src_file))108108+ return;109109+110110+ fput(msg->src_file);111111+ msg->src_file = NULL;112112+}113113+114114+static inline bool io_msg_need_remote(struct io_ring_ctx *target_ctx)115115+{116116+ if (!target_ctx->task_complete)117117+ return false;118118+ return current != target_ctx->submitter_task;119119+}120120+121121+static int io_msg_exec_remote(struct io_kiocb *req, task_work_func_t func)122122+{123123+ struct io_ring_ctx *ctx = req->file->private_data;124124+ struct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);125125+ struct task_struct *task = READ_ONCE(ctx->submitter_task);126126+127127+ if (unlikely(!task))128128+ return -EOWNERDEAD;129129+130130+ init_task_work(&msg->tw, func);131131+ if (task_work_add(ctx->submitter_task, &msg->tw, TWA_SIGNAL))132132+ return -EOWNERDEAD;133133+134134+ return IOU_ISSUE_SKIP_COMPLETE;135135+}136136+137137+static void io_msg_tw_complete(struct callback_head *head)138138+{139139+ struct io_msg *msg = container_of(head, struct io_msg, tw);140140+ struct io_kiocb *req = cmd_to_io_kiocb(msg);141141+ struct io_ring_ctx *target_ctx = req->file->private_data;142142+ int ret = 0;143143+144144+ if (current->flags & PF_EXITING) {145145+ ret = -EOWNERDEAD;146146+ } else {147147+ /*148148+ * If the target ring is using IOPOLL mode, then we need to be149149+ * holding the uring_lock for posting completions. Other ring150150+ * types rely on the regular completion locking, which is151151+ * handled while posting.152152+ */153153+ if (target_ctx->flags & IORING_SETUP_IOPOLL)154154+ mutex_lock(&target_ctx->uring_lock);155155+ if (!io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0))156156+ ret = -EOVERFLOW;157157+ if (target_ctx->flags & IORING_SETUP_IOPOLL)158158+ mutex_unlock(&target_ctx->uring_lock);159159+ }160160+161161+ if (ret < 0)162162+ req_set_fail(req);163163+ io_req_queue_tw_complete(req, ret);164164+}165165+166166+static int io_msg_ring_data(struct io_kiocb *req, unsigned int issue_flags)167167+{168168+ struct io_ring_ctx *target_ctx = req->file->private_data;169169+ struct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);170170+ int ret;171171+172172+ if (msg->src_fd || msg->dst_fd || msg->flags)173173+ return -EINVAL;174174+ if (target_ctx->flags & IORING_SETUP_R_DISABLED)175175+ return -EBADFD;176176+177177+ if (io_msg_need_remote(target_ctx))178178+ return io_msg_exec_remote(req, io_msg_tw_complete);179179+180180+ ret = -EOVERFLOW;181181+ if (target_ctx->flags & IORING_SETUP_IOPOLL) {182182+ if (unlikely(io_double_lock_ctx(target_ctx, issue_flags)))183183+ return -EAGAIN;184184+ if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0))185185+ ret = 0;186186+ io_double_unlock_ctx(target_ctx);187187+ } else {188188+ if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0))189189+ ret = 0;190190+ }191191+ return ret;48192}4919350194static struct file *io_msg_grab_file(struct io_kiocb *req, unsigned int issue_flags)···186148 if (!io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0))187149 ret = -EOVERFLOW;188150out_unlock:189189- io_double_unlock_ctx(target_ctx, issue_flags);151151+ io_double_unlock_ctx(target_ctx);190152 return ret;191153}192154···212174213175 if (target_ctx == ctx)214176 return -EINVAL;177177+ if (target_ctx->flags & IORING_SETUP_R_DISABLED)178178+ return -EBADFD;215179 if (!src_file) {216180 src_file = io_msg_grab_file(req, issue_flags);217181 if (!src_file)···222182 req->flags |= REQ_F_NEED_CLEANUP;223183 }224184225225- if (target_ctx->task_complete && current != target_ctx->submitter_task) {226226- init_task_work(&msg->tw, io_msg_tw_fd_complete);227227- if (task_work_add(target_ctx->submitter_task, &msg->tw,228228- TWA_SIGNAL))229229- return -EOWNERDEAD;230230-231231- return IOU_ISSUE_SKIP_COMPLETE;232232- }185185+ if (io_msg_need_remote(target_ctx))186186+ return io_msg_exec_remote(req, io_msg_tw_fd_complete);233187 return io_msg_install_complete(req, issue_flags);234188}235189···258224259225 switch (msg->cmd) {260226 case IORING_MSG_DATA:261261- ret = io_msg_ring_data(req);227227+ ret = io_msg_ring_data(req, issue_flags);262228 break;263229 case IORING_MSG_SEND_FD:264230 ret = io_msg_send_fd(req, issue_flags);
+5-1
io_uring/poll.c
···283283 * to the waitqueue, so if we get nothing back, we284284 * should be safe and attempt a reissue.285285 */286286- if (unlikely(!req->cqe.res))286286+ if (unlikely(!req->cqe.res)) {287287+ /* Multishot armed need not reissue */288288+ if (!(req->apoll_events & EPOLLONESHOT))289289+ continue;287290 return IOU_POLL_REISSUE;291291+ }288292 }289293 if (req->apoll_events & EPOLLONESHOT)290294 return IOU_POLL_DONE;
···216216 if (offload->dev_state)217217 offload->offdev->ops->destroy(prog);218218219219- /* Make sure BPF_PROG_GET_NEXT_ID can't find this dead program */220220- bpf_prog_free_id(prog, true);221221-222219 list_del_init(&offload->offloads);223220 kfree(offload);224221 prog->aux->offload = NULL;
+7-17
kernel/bpf/syscall.c
···19721972 return;19731973 if (audit_enabled == AUDIT_OFF)19741974 return;19751975- if (op == BPF_AUDIT_LOAD)19751975+ if (!in_irq() && !irqs_disabled())19761976 ctx = audit_context();19771977 ab = audit_log_start(ctx, GFP_ATOMIC, AUDIT_BPF);19781978 if (unlikely(!ab))···20012001 return id > 0 ? 0 : id;20022002}2003200320042004-void bpf_prog_free_id(struct bpf_prog *prog, bool do_idr_lock)20042004+void bpf_prog_free_id(struct bpf_prog *prog)20052005{20062006 unsigned long flags;20072007···20132013 if (!prog->aux->id)20142014 return;2015201520162016- if (do_idr_lock)20172017- spin_lock_irqsave(&prog_idr_lock, flags);20182018- else20192019- __acquire(&prog_idr_lock);20202020-20162016+ spin_lock_irqsave(&prog_idr_lock, flags);20212017 idr_remove(&prog_idr, prog->aux->id);20222018 prog->aux->id = 0;20232023-20242024- if (do_idr_lock)20252025- spin_unlock_irqrestore(&prog_idr_lock, flags);20262026- else20272027- __release(&prog_idr_lock);20192019+ spin_unlock_irqrestore(&prog_idr_lock, flags);20282020}2029202120302022static void __bpf_prog_put_rcu(struct rcu_head *rcu)···20592067 prog = aux->prog;20602068 perf_event_bpf_event(prog, PERF_BPF_EVENT_PROG_UNLOAD, 0);20612069 bpf_audit_prog(prog, BPF_AUDIT_UNLOAD);20702070+ bpf_prog_free_id(prog);20622071 __bpf_prog_put_noref(prog, true);20632072}2064207320652065-static void __bpf_prog_put(struct bpf_prog *prog, bool do_idr_lock)20742074+static void __bpf_prog_put(struct bpf_prog *prog)20662075{20672076 struct bpf_prog_aux *aux = prog->aux;2068207720692078 if (atomic64_dec_and_test(&aux->refcnt)) {20702070- /* bpf_prog_free_id() must be called first */20712071- bpf_prog_free_id(prog, do_idr_lock);20722072-20732079 if (in_irq() || irqs_disabled()) {20742080 INIT_WORK(&aux->work, bpf_prog_put_deferred);20752081 schedule_work(&aux->work);···2079208920802090void bpf_prog_put(struct bpf_prog *prog)20812091{20822082- __bpf_prog_put(prog, true);20922092+ __bpf_prog_put(prog);20832093}20842094EXPORT_SYMBOL_GPL(bpf_prog_put);20852095
+9-1
kernel/bpf/verifier.c
···27482748 */27492749 if (insn->src_reg == 0 && is_callback_calling_function(insn->imm))27502750 return -ENOTSUPP;27512751+ /* kfunc with imm==0 is invalid and fixup_kfunc_call will27522752+ * catch this error later. Make backtracking conservative27532753+ * with ENOTSUPP.27542754+ */27552755+ if (insn->src_reg == BPF_PSEUDO_KFUNC_CALL && insn->imm == 0)27562756+ return -ENOTSUPP;27512757 /* regular helper call sets R0 */27522758 *reg_mask &= ~1;27532759 if (*reg_mask & 0x3f) {···32953289 bool sanitize = reg && is_spillable_regtype(reg->type);3296329032973291 for (i = 0; i < size; i++) {32983298- if (state->stack[spi].slot_type[i] == STACK_INVALID) {32923292+ u8 type = state->stack[spi].slot_type[i];32933293+32943294+ if (type != STACK_MISC && type != STACK_ZERO) {32993295 sanitize = true;33003296 break;33013297 }
+2
kernel/gen_kheaders.sh
···1414arch/$SRCARCH/include/1515"16161717+type cpio > /dev/null1818+1719# Support incremental builds by skipping archive generation1820# if timestamps of files being archived are not changed.1921
+2
kernel/printk/printk.c
···123123{124124 return srcu_read_lock_held(&console_srcu);125125}126126+EXPORT_SYMBOL(console_srcu_read_lock_is_held);126127#endif127128128129enum devkmsg_log_bits {···18921891/**18931892 * console_lock_spinning_disable_and_check - mark end of code where another18941893 * thread was able to busy wait and check if there is a waiter18941894+ * @cookie: cookie returned from console_srcu_read_lock()18951895 *18961896 * This is called at the end of the section where spinning is allowed.18971897 * It has two functions. First, it is a signal that it is no longer
+8-2
kernel/sched/core.c
···82908290 if (retval)82918291 goto out_put_task;8292829282938293+ /*82948294+ * With non-SMP configs, user_cpus_ptr/user_mask isn't used and82958295+ * alloc_user_cpus_ptr() returns NULL.82968296+ */82938297 user_mask = alloc_user_cpus_ptr(NUMA_NO_NODE);82948294- if (IS_ENABLED(CONFIG_SMP) && !user_mask) {82988298+ if (user_mask) {82998299+ cpumask_copy(user_mask, in_mask);83008300+ } else if (IS_ENABLED(CONFIG_SMP)) {82958301 retval = -ENOMEM;82968302 goto out_put_task;82978303 }82988298- cpumask_copy(user_mask, in_mask);83048304+82998305 ac = (struct affinity_context){83008306 .new_mask = in_mask,83018307 .user_mask = user_mask,
+26-20
kernel/sched/fair.c
···72297229 eenv_task_busy_time(&eenv, p, prev_cpu);7230723072317231 for (; pd; pd = pd->next) {72327232+ unsigned long util_min = p_util_min, util_max = p_util_max;72327233 unsigned long cpu_cap, cpu_thermal_cap, util;72337234 unsigned long cur_delta, max_spare_cap = 0;72347235 unsigned long rq_util_min, rq_util_max;72357235- unsigned long util_min, util_max;72367236 unsigned long prev_spare_cap = 0;72377237 int max_spare_cap_cpu = -1;72387238 unsigned long base_energy;···72517251 eenv.pd_cap = 0;7252725272537253 for_each_cpu(cpu, cpus) {72547254+ struct rq *rq = cpu_rq(cpu);72557255+72547256 eenv.pd_cap += cpu_thermal_cap;7255725772567258 if (!cpumask_test_cpu(cpu, sched_domain_span(sd)))···72717269 * much capacity we can get out of the CPU; this is72727270 * aligned with sched_cpu_util().72737271 */72747274- if (uclamp_is_used()) {72757275- if (uclamp_rq_is_idle(cpu_rq(cpu))) {72767276- util_min = p_util_min;72777277- util_max = p_util_max;72787278- } else {72797279- /*72807280- * Open code uclamp_rq_util_with() except for72817281- * the clamp() part. Ie: apply max aggregation72827282- * only. util_fits_cpu() logic requires to72837283- * operate on non clamped util but must use the72847284- * max-aggregated uclamp_{min, max}.72857285- */72867286- rq_util_min = uclamp_rq_get(cpu_rq(cpu), UCLAMP_MIN);72877287- rq_util_max = uclamp_rq_get(cpu_rq(cpu), UCLAMP_MAX);72727272+ if (uclamp_is_used() && !uclamp_rq_is_idle(rq)) {72737273+ /*72747274+ * Open code uclamp_rq_util_with() except for72757275+ * the clamp() part. Ie: apply max aggregation72767276+ * only. util_fits_cpu() logic requires to72777277+ * operate on non clamped util but must use the72787278+ * max-aggregated uclamp_{min, max}.72797279+ */72807280+ rq_util_min = uclamp_rq_get(rq, UCLAMP_MIN);72817281+ rq_util_max = uclamp_rq_get(rq, UCLAMP_MAX);7288728272897289- util_min = max(rq_util_min, p_util_min);72907290- util_max = max(rq_util_max, p_util_max);72917291- }72837283+ util_min = max(rq_util_min, p_util_min);72847284+ util_max = max(rq_util_max, p_util_max);72927285 }72937286 if (!util_fits_cpu(util, util_min, util_max, cpu))72947287 continue;···88688871 * * Thermal pressure will impact all cpus in this perf domain88698872 * equally.88708873 */88718871- if (static_branch_unlikely(&sched_asym_cpucapacity)) {88748874+ if (sched_energy_enabled()) {88728875 unsigned long inv_cap = capacity_orig - thermal_load_avg(rq);88738873- struct perf_domain *pd = rcu_dereference(rq->rd->pd);88768876+ struct perf_domain *pd;8874887788788878+ rcu_read_lock();88798879+88808880+ pd = rcu_dereference(rq->rd->pd);88758881 rq->cpu_capacity_inverted = 0;8876888288778883 for (; pd; pd = pd->next) {88788884 struct cpumask *pd_span = perf_domain_span(pd);88798885 unsigned long pd_cap_orig, pd_cap;88868886+88878887+ /* We can't be inverted against our own pd */88888888+ if (cpumask_test_cpu(cpu_of(rq), pd_span))88898889+ continue;8880889088818891 cpu = cpumask_any(pd_span);88828892 pd_cap_orig = arch_scale_cpu_capacity(cpu);···89098905 break;89108906 }89118907 }89088908+89098909+ rcu_read_unlock();89128910 }8913891189148912 trace_sched_cpu_capacity_tp(rq);
+2
kernel/sys.c
···1442144214431443 if (resource >= RLIM_NLIMITS)14441444 return -EINVAL;14451445+ resource = array_index_nospec(resource, RLIM_NLIMITS);14461446+14451447 if (new_rlim) {14461448 if (new_rlim->rlim_cur > new_rlim->rlim_max)14471449 return -EINVAL;
+3
kernel/trace/bpf_trace.c
···848848 return -EPERM;849849 if (unlikely(!nmi_uaccess_okay()))850850 return -EPERM;851851+ /* Task should not be pid=1 to avoid kernel panic. */852852+ if (unlikely(is_global_init(current)))853853+ return -EPERM;851854852855 if (irqs_disabled()) {853856 /* Do an early check on signal validity. Otherwise,
+15-10
lib/scatterlist.c
···470470 return -EOPNOTSUPP;471471472472 if (sgt_append->prv) {473473+ unsigned long next_pfn = (page_to_phys(sg_page(sgt_append->prv)) +474474+ sgt_append->prv->offset + sgt_append->prv->length) / PAGE_SIZE;475475+473476 if (WARN_ON(offset))474477 return -EINVAL;475478476479 /* Merge contiguous pages into the last SG */477480 prv_len = sgt_append->prv->length;478478- last_pg = sg_page(sgt_append->prv);479479- while (n_pages && pages_are_mergeable(pages[0], last_pg)) {480480- if (sgt_append->prv->length + PAGE_SIZE > max_segment)481481- break;482482- sgt_append->prv->length += PAGE_SIZE;483483- last_pg = pages[0];484484- pages++;485485- n_pages--;481481+ if (page_to_pfn(pages[0]) == next_pfn) {482482+ last_pg = pfn_to_page(next_pfn - 1);483483+ while (n_pages && pages_are_mergeable(pages[0], last_pg)) {484484+ if (sgt_append->prv->length + PAGE_SIZE > max_segment)485485+ break;486486+ sgt_append->prv->length += PAGE_SIZE;487487+ last_pg = pages[0];488488+ pages++;489489+ n_pages--;490490+ }491491+ if (!n_pages)492492+ goto out;486493 }487487- if (!n_pages)488488- goto out;489494 }490495491496 /* compute number of contiguous chunks */
···821821static int hci_le_terminate_big(struct hci_dev *hdev, u8 big, u8 bis)822822{823823 struct iso_list_data *d;824824+ int ret;824825825826 bt_dev_dbg(hdev, "big 0x%2.2x bis 0x%2.2x", big, bis);826827···832831 d->big = big;833832 d->bis = bis;834833835835- return hci_cmd_sync_queue(hdev, terminate_big_sync, d,836836- terminate_big_destroy);834834+ ret = hci_cmd_sync_queue(hdev, terminate_big_sync, d,835835+ terminate_big_destroy);836836+ if (ret)837837+ kfree(d);838838+839839+ return ret;837840}838841839842static int big_terminate_sync(struct hci_dev *hdev, void *data)···862857static int hci_le_big_terminate(struct hci_dev *hdev, u8 big, u16 sync_handle)863858{864859 struct iso_list_data *d;860860+ int ret;865861866862 bt_dev_dbg(hdev, "big 0x%2.2x sync_handle 0x%4.4x", big, sync_handle);867863···873867 d->big = big;874868 d->sync_handle = sync_handle;875869876876- return hci_cmd_sync_queue(hdev, big_terminate_sync, d,877877- terminate_big_destroy);870870+ ret = hci_cmd_sync_queue(hdev, big_terminate_sync, d,871871+ terminate_big_destroy);872872+ if (ret)873873+ kfree(d);874874+875875+ return ret;878876}879877880878/* Cleanup BIS connection
+4-1
net/bluetooth/hci_event.c
···38483848 conn->handle, conn->link);3849384938503850 /* Create CIS if LE is already connected */38513851- if (conn->link && conn->link->state == BT_CONNECTED)38513851+ if (conn->link && conn->link->state == BT_CONNECTED) {38523852+ rcu_read_unlock();38523853 hci_le_create_cis(conn->link);38543854+ rcu_read_lock();38553855+ }3853385638543857 if (i == rp->num_handles)38553858 break;
···650650 spin_lock(lock);651651 if (osk) {652652 WARN_ON_ONCE(sk->sk_hash != osk->sk_hash);653653- ret = sk_nulls_del_node_init_rcu(osk);654654- } else if (found_dup_sk) {653653+ ret = sk_hashed(osk);654654+ if (ret) {655655+ /* Before deleting the node, we insert a new one to make656656+ * sure that the look-up-sk process would not miss either657657+ * of them and that at least one node would exist in ehash658658+ * table all the time. Otherwise there's a tiny chance659659+ * that lookup process could find nothing in ehash table.660660+ */661661+ __sk_nulls_add_node_tail_rcu(sk, list);662662+ sk_nulls_del_node_init_rcu(osk);663663+ }664664+ goto unlock;665665+ }666666+ if (found_dup_sk) {655667 *found_dup_sk = inet_ehash_lookup_by_sk(sk, list);656668 if (*found_dup_sk)657669 ret = false;···672660 if (ret)673661 __sk_nulls_add_node_rcu(sk, list);674662663663+unlock:675664 spin_unlock(lock);676665677666 return ret;
···435435436436 /* There's a bubble in the pipe until at least the first ACK. */437437 tp->app_limited = ~0U;438438+ tp->rate_app_limited = 1;438439439440 /* See draft-stevens-tcpca-spec-01 for discussion of the440441 * initialization of these values.···31793178 tp->plb_rehash = 0;31803179 /* There's a bubble in the pipe until at least the first ACK. */31813180 tp->app_limited = ~0U;31813181+ tp->rate_app_limited = 1;31823182 tp->rack.mstamp = 0;31833183 tp->rack.advanced = 0;31843184 tp->rack.reo_wnd_steps = 1;
+1-1
net/ipv4/tcp_ulp.c
···139139 if (sk->sk_socket)140140 clear_bit(SOCK_SUPPORT_ZC, &sk->sk_socket->flags);141141142142- err = -EINVAL;142142+ err = -ENOTCONN;143143 if (!ulp_ops->clone && sk->sk_state == TCP_LISTEN)144144 goto out_err;145145
+50-52
net/l2tp/l2tp_core.c
···104104/* per-net private data for this module */105105static unsigned int l2tp_net_id;106106struct l2tp_net {107107- struct list_head l2tp_tunnel_list;108108- /* Lock for write access to l2tp_tunnel_list */109109- spinlock_t l2tp_tunnel_list_lock;107107+ /* Lock for write access to l2tp_tunnel_idr */108108+ spinlock_t l2tp_tunnel_idr_lock;109109+ struct idr l2tp_tunnel_idr;110110 struct hlist_head l2tp_session_hlist[L2TP_HASH_SIZE_2];111111 /* Lock for write access to l2tp_session_hlist */112112 spinlock_t l2tp_session_hlist_lock;···208208 struct l2tp_tunnel *tunnel;209209210210 rcu_read_lock_bh();211211- list_for_each_entry_rcu(tunnel, &pn->l2tp_tunnel_list, list) {212212- if (tunnel->tunnel_id == tunnel_id &&213213- refcount_inc_not_zero(&tunnel->ref_count)) {214214- rcu_read_unlock_bh();215215-216216- return tunnel;217217- }211211+ tunnel = idr_find(&pn->l2tp_tunnel_idr, tunnel_id);212212+ if (tunnel && refcount_inc_not_zero(&tunnel->ref_count)) {213213+ rcu_read_unlock_bh();214214+ return tunnel;218215 }219216 rcu_read_unlock_bh();220217···221224222225struct l2tp_tunnel *l2tp_tunnel_get_nth(const struct net *net, int nth)223226{224224- const struct l2tp_net *pn = l2tp_pernet(net);227227+ struct l2tp_net *pn = l2tp_pernet(net);228228+ unsigned long tunnel_id, tmp;225229 struct l2tp_tunnel *tunnel;226230 int count = 0;227231228232 rcu_read_lock_bh();229229- list_for_each_entry_rcu(tunnel, &pn->l2tp_tunnel_list, list) {230230- if (++count > nth &&233233+ idr_for_each_entry_ul(&pn->l2tp_tunnel_idr, tunnel, tmp, tunnel_id) {234234+ if (tunnel && ++count > nth &&231235 refcount_inc_not_zero(&tunnel->ref_count)) {232236 rcu_read_unlock_bh();233237 return tunnel;···10411043 IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED | IPSKB_REROUTED);10421044 nf_reset_ct(skb);1043104510441044- bh_lock_sock(sk);10461046+ bh_lock_sock_nested(sk);10451047 if (sock_owned_by_user(sk)) {10461048 kfree_skb(skb);10471049 ret = NET_XMIT_DROP;···12251227 l2tp_tunnel_delete(tunnel);12261228}1227122912301230+static void l2tp_tunnel_remove(struct net *net, struct l2tp_tunnel *tunnel)12311231+{12321232+ struct l2tp_net *pn = l2tp_pernet(net);12331233+12341234+ spin_lock_bh(&pn->l2tp_tunnel_idr_lock);12351235+ idr_remove(&pn->l2tp_tunnel_idr, tunnel->tunnel_id);12361236+ spin_unlock_bh(&pn->l2tp_tunnel_idr_lock);12371237+}12381238+12281239/* Workqueue tunnel deletion function */12291240static void l2tp_tunnel_del_work(struct work_struct *work)12301241{···12411234 del_work);12421235 struct sock *sk = tunnel->sock;12431236 struct socket *sock = sk->sk_socket;12441244- struct l2tp_net *pn;1245123712461238 l2tp_tunnel_closeall(tunnel);12471239···12541248 }12551249 }1256125012571257- /* Remove the tunnel struct from the tunnel list */12581258- pn = l2tp_pernet(tunnel->l2tp_net);12591259- spin_lock_bh(&pn->l2tp_tunnel_list_lock);12601260- list_del_rcu(&tunnel->list);12611261- spin_unlock_bh(&pn->l2tp_tunnel_list_lock);12621262-12511251+ l2tp_tunnel_remove(tunnel->l2tp_net, tunnel);12631252 /* drop initial ref */12641253 l2tp_tunnel_dec_refcount(tunnel);12651254···13851384 return err;13861385}1387138613881388-static struct lock_class_key l2tp_socket_class;13891389-13901387int l2tp_tunnel_create(int fd, int version, u32 tunnel_id, u32 peer_tunnel_id,13911388 struct l2tp_tunnel_cfg *cfg, struct l2tp_tunnel **tunnelp)13921389{···14541455int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net,14551456 struct l2tp_tunnel_cfg *cfg)14561457{14571457- struct l2tp_tunnel *tunnel_walk;14581458- struct l2tp_net *pn;14581458+ struct l2tp_net *pn = l2tp_pernet(net);14591459+ u32 tunnel_id = tunnel->tunnel_id;14591460 struct socket *sock;14601461 struct sock *sk;14611462 int ret;14631463+14641464+ spin_lock_bh(&pn->l2tp_tunnel_idr_lock);14651465+ ret = idr_alloc_u32(&pn->l2tp_tunnel_idr, NULL, &tunnel_id, tunnel_id,14661466+ GFP_ATOMIC);14671467+ spin_unlock_bh(&pn->l2tp_tunnel_idr_lock);14681468+ if (ret)14691469+ return ret == -ENOSPC ? -EEXIST : ret;1462147014631471 if (tunnel->fd < 0) {14641472 ret = l2tp_tunnel_sock_create(net, tunnel->tunnel_id,···14801474 }1481147514821476 sk = sock->sk;14771477+ lock_sock(sk);14831478 write_lock_bh(&sk->sk_callback_lock);14841479 ret = l2tp_validate_socket(sk, net, tunnel->encap);14851480 if (ret < 0)14861481 goto err_inval_sock;14871482 rcu_assign_sk_user_data(sk, tunnel);14881483 write_unlock_bh(&sk->sk_callback_lock);14891489-14901490- tunnel->l2tp_net = net;14911491- pn = l2tp_pernet(net);14921492-14931493- sock_hold(sk);14941494- tunnel->sock = sk;14951495-14961496- spin_lock_bh(&pn->l2tp_tunnel_list_lock);14971497- list_for_each_entry(tunnel_walk, &pn->l2tp_tunnel_list, list) {14981498- if (tunnel_walk->tunnel_id == tunnel->tunnel_id) {14991499- spin_unlock_bh(&pn->l2tp_tunnel_list_lock);15001500- sock_put(sk);15011501- ret = -EEXIST;15021502- goto err_sock;15031503- }15041504- }15051505- list_add_rcu(&tunnel->list, &pn->l2tp_tunnel_list);15061506- spin_unlock_bh(&pn->l2tp_tunnel_list_lock);1507148415081485 if (tunnel->encap == L2TP_ENCAPTYPE_UDP) {15091486 struct udp_tunnel_sock_cfg udp_cfg = {···1501151215021513 tunnel->old_sk_destruct = sk->sk_destruct;15031514 sk->sk_destruct = &l2tp_tunnel_destruct;15041504- lockdep_set_class_and_name(&sk->sk_lock.slock, &l2tp_socket_class,15051505- "l2tp_sock");15061515 sk->sk_allocation = GFP_ATOMIC;15161516+ release_sock(sk);15171517+15181518+ sock_hold(sk);15191519+ tunnel->sock = sk;15201520+ tunnel->l2tp_net = net;15211521+15221522+ spin_lock_bh(&pn->l2tp_tunnel_idr_lock);15231523+ idr_replace(&pn->l2tp_tunnel_idr, tunnel, tunnel->tunnel_id);15241524+ spin_unlock_bh(&pn->l2tp_tunnel_idr_lock);1507152515081526 trace_register_tunnel(tunnel);15091527···1519152315201524 return 0;1521152515221522-err_sock:15231523- write_lock_bh(&sk->sk_callback_lock);15241524- rcu_assign_sk_user_data(sk, NULL);15251526err_inval_sock:15261527 write_unlock_bh(&sk->sk_callback_lock);15281528+ release_sock(sk);1527152915281530 if (tunnel->fd < 0)15291531 sock_release(sock);15301532 else15311533 sockfd_put(sock);15321534err:15351535+ l2tp_tunnel_remove(net, tunnel);15331536 return ret;15341537}15351538EXPORT_SYMBOL_GPL(l2tp_tunnel_register);···16421647 struct l2tp_net *pn = net_generic(net, l2tp_net_id);16431648 int hash;1644164916451645- INIT_LIST_HEAD(&pn->l2tp_tunnel_list);16461646- spin_lock_init(&pn->l2tp_tunnel_list_lock);16501650+ idr_init(&pn->l2tp_tunnel_idr);16511651+ spin_lock_init(&pn->l2tp_tunnel_idr_lock);1647165216481653 for (hash = 0; hash < L2TP_HASH_SIZE_2; hash++)16491654 INIT_HLIST_HEAD(&pn->l2tp_session_hlist[hash]);···16571662{16581663 struct l2tp_net *pn = l2tp_pernet(net);16591664 struct l2tp_tunnel *tunnel = NULL;16651665+ unsigned long tunnel_id, tmp;16601666 int hash;1661166716621668 rcu_read_lock_bh();16631663- list_for_each_entry_rcu(tunnel, &pn->l2tp_tunnel_list, list) {16641664- l2tp_tunnel_delete(tunnel);16691669+ idr_for_each_entry_ul(&pn->l2tp_tunnel_idr, tunnel, tmp, tunnel_id) {16701670+ if (tunnel)16711671+ l2tp_tunnel_delete(tunnel);16651672 }16661673 rcu_read_unlock_bh();16671674···1673167616741677 for (hash = 0; hash < L2TP_HASH_SIZE_2; hash++)16751678 WARN_ON_ONCE(!hlist_empty(&pn->l2tp_session_hlist[hash]));16791679+ idr_destroy(&pn->l2tp_tunnel_idr);16761680}1677168116781682static struct pernet_operations l2tp_net_ops = {
+5-3
net/mac80211/agg-tx.c
···491491{492492 struct tid_ampdu_tx *tid_tx;493493 struct ieee80211_local *local = sta->local;494494- struct ieee80211_sub_if_data *sdata = sta->sdata;494494+ struct ieee80211_sub_if_data *sdata;495495 struct ieee80211_ampdu_params params = {496496 .sta = &sta->sta,497497 .action = IEEE80211_AMPDU_TX_START,···511511 */512512 clear_bit(HT_AGG_STATE_WANT_START, &tid_tx->state);513513514514- ieee80211_agg_stop_txq(sta, tid);515515-516514 /*517515 * Make sure no packets are being processed. This ensures that518516 * we have a valid starting sequence number and that in-flight···519521 */520522 synchronize_net();521523524524+ sdata = sta->sdata;522525 params.ssn = sta->tid_seq[tid] >> 4;523526 ret = drv_ampdu_action(local, sdata, ¶ms);524527 tid_tx->ssn = params.ssn;···533534 */534535 set_bit(HT_AGG_STATE_DRV_READY, &tid_tx->state);535536 } else if (ret) {537537+ if (!sdata)538538+ return;539539+536540 ht_dbg(sdata,537541 "BA request denied - HW unavailable for %pM tid %d\n",538542 sta->sta.addr, tid);
···1199119912001200 /* In reconfig don't transmit now, but mark for waking later */12011201 if (local->in_reconfig) {12021202- set_bit(IEEE80211_TXQ_STOP_NETIF_TX, &txq->flags);12021202+ set_bit(IEEE80211_TXQ_DIRTY, &txq->flags);12031203 return;12041204 }12051205
+31
net/mac80211/ht.c
···391391392392 tid_tx = sta->ampdu_mlme.tid_start_tx[tid];393393 if (!blocked && tid_tx) {394394+ struct txq_info *txqi = to_txq_info(sta->sta.txq[tid]);395395+ struct ieee80211_sub_if_data *sdata =396396+ vif_to_sdata(txqi->txq.vif);397397+ struct fq *fq = &sdata->local->fq;398398+399399+ spin_lock_bh(&fq->lock);400400+401401+ /* Allow only frags to be dequeued */402402+ set_bit(IEEE80211_TXQ_STOP, &txqi->flags);403403+404404+ if (!skb_queue_empty(&txqi->frags)) {405405+ /* Fragmented Tx is ongoing, wait for it to406406+ * finish. Reschedule worker to retry later.407407+ */408408+409409+ spin_unlock_bh(&fq->lock);410410+ spin_unlock_bh(&sta->lock);411411+412412+ /* Give the task working on the txq a chance413413+ * to send out the queued frags414414+ */415415+ synchronize_net();416416+417417+ mutex_unlock(&sta->ampdu_mlme.mtx);418418+419419+ ieee80211_queue_work(&sdata->local->hw, work);420420+ return;421421+ }422422+423423+ spin_unlock_bh(&fq->lock);424424+394425 /*395426 * Assign it over to the normal tid_tx array396427 * where it "goes live".
···294294static int rxrpc_connect_call(struct rxrpc_call *call, gfp_t gfp)295295{296296 struct rxrpc_local *local = call->local;297297- int ret = 0;297297+ int ret = -ENOMEM;298298299299 _enter("{%d,%lx},", call->debug_id, call->user_call_ID);300300
+2
net/sched/sch_gred.c
···377377 /* Even if driver returns failure adjust the stats - in case offload378378 * ended but driver still wants to adjust the values.379379 */380380+ sch_tree_lock(sch);380381 for (i = 0; i < MAX_DPs; i++) {381382 if (!table->tab[i])382383 continue;···394393 sch->qstats.overlimits += hw_stats->stats.qstats[i].overlimits;395394 }396395 _bstats_update(&sch->bstats, bytes, packets);396396+ sch_tree_unlock(sch);397397398398 kfree(hw_stats);399399 return ret;
+16-11
net/sched/sch_htb.c
···15491549 struct tc_htb_qopt_offload offload_opt;15501550 struct netdev_queue *dev_queue;15511551 struct Qdisc *q = cl->leaf.q;15521552- struct Qdisc *old = NULL;15521552+ struct Qdisc *old;15531553 int err;1554155415551555 if (cl->level)···1557155715581558 WARN_ON(!q);15591559 dev_queue = htb_offload_get_queue(cl);15601560- old = htb_graft_helper(dev_queue, NULL);15611561- if (destroying)15621562- /* Before HTB is destroyed, the kernel grafts noop_qdisc to15631563- * all queues.15601560+ /* When destroying, caller qdisc_graft grafts the new qdisc and invokes15611561+ * qdisc_put for the qdisc being destroyed. htb_destroy_class_offload15621562+ * does not need to graft or qdisc_put the qdisc being destroyed.15631563+ */15641564+ if (!destroying) {15651565+ old = htb_graft_helper(dev_queue, NULL);15661566+ /* Last qdisc grafted should be the same as cl->leaf.q when15671567+ * calling htb_delete.15641568 */15651565- WARN_ON(!(old->flags & TCQ_F_BUILTIN));15661566- else15671569 WARN_ON(old != q);15701570+ }1568157115691572 if (cl->parent) {15701573 _bstats_update(&cl->parent->bstats_bias,···15841581 };15851582 err = htb_offload(qdisc_dev(sch), &offload_opt);1586158315871587- if (!err || destroying)15881588- qdisc_put(old);15891589- else15901590- htb_graft_helper(dev_queue, old);15841584+ if (!destroying) {15851585+ if (!err)15861586+ qdisc_put(old);15871587+ else15881588+ htb_graft_helper(dev_queue, old);15891589+ }1591159015921591 if (last_child)15931592 return err;
+3
net/sched/sch_taprio.c
···17001700 int i;1701170117021702 hrtimer_cancel(&q->advance_timer);17031703+ qdisc_synchronize(sch);17041704+17031705 if (q->qdiscs) {17041706 for (i = 0; i < dev->num_tx_queues; i++)17051707 if (q->qdiscs[i])···17221720 * happens in qdisc_create(), after taprio_init() has been called.17231721 */17241722 hrtimer_cancel(&q->advance_timer);17231723+ qdisc_synchronize(sch);1725172417261725 taprio_disable_offload(dev, q, NULL);17271726
+14-5
scripts/jobserver-exec
···2626 # If the MAKEFLAGS variable contains multiple instances of the2727 # --jobserver-auth= option, the last one is relevant.2828 fds = opts[-1].split("=", 1)[1]2929- reader, writer = [int(x) for x in fds.split(",", 1)]3030- # Open a private copy of reader to avoid setting nonblocking3131- # on an unexpecting process with the same reader fd.3232- reader = os.open("/proc/self/fd/%d" % (reader),3333- os.O_RDONLY | os.O_NONBLOCK)2929+3030+ # Starting with GNU Make 4.4, named pipes are used for reader and writer.3131+ # Example argument: --jobserver-auth=fifo:/tmp/GMfifo81343232+ _, _, path = fds.partition('fifo:')3333+3434+ if path:3535+ reader = os.open(path, os.O_RDONLY | os.O_NONBLOCK)3636+ writer = os.open(path, os.O_WRONLY)3737+ else:3838+ reader, writer = [int(x) for x in fds.split(",", 1)]3939+ # Open a private copy of reader to avoid setting nonblocking4040+ # on an unexpecting process with the same reader fd.4141+ reader = os.open("/proc/self/fd/%d" % (reader),4242+ os.O_RDONLY | os.O_NONBLOCK)34433544 # Read out as many jobserver slots as possible.3645 while True:
···11#!/bin/sh22#33# Output a simple RPM spec file.44-# This version assumes a minimum of RPM 4.0.3.44+# This version assumes a minimum of RPM 4.1355#66# The only gothic bit here is redefining install_post to avoid77# stripping the symbols from files in the kernel which we want