stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, Peter Rosin <peda@axentia.se>,
	Tudor Ambarus <tudor.ambarus@microchip.com>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Vinod Koul <vkoul@kernel.org>
Subject: [PATCH 4.19 036/114] dmaengine: at_hdmac: Dont start transactions at tx_submit level
Date: Wed, 23 Nov 2022 09:50:23 +0100	[thread overview]
Message-ID: <20221123084553.281712132@linuxfoundation.org> (raw)
In-Reply-To: <20221123084551.864610302@linuxfoundation.org>

From: Tudor Ambarus <tudor.ambarus@microchip.com>

commit 7176a6a8982d311e50a7c1168868d26e65bbba19 upstream.

tx_submit is supposed to push the current transaction descriptor to a
pending queue, waiting for issue_pending() to be called. issue_pending()
must start the transfer, not tx_submit(), thus remove atc_dostart() from
atc_tx_submit(). Clients of at_xdmac that assume that tx_submit() starts
the transfer must be updated and call dma_async_issue_pending() if they
miss to call it.
The vdbg print was moved to after the lock is released. It is desirable to
do the prints without the lock held if possible, and because the if
statement disappears there's no reason why to do the print while holding
the lock.

Fixes: dc78baa2b90b ("dmaengine: at_hdmac: new driver for the Atmel AHB DMA Controller")
Reported-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/lkml/13c6c9a2-6db5-c3bf-349b-4c127ad3496a@axentia.se/
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com
Link: https://lore.kernel.org/r/20221025090306.297886-3-tudor.ambarus@microchip.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma/at_hdmac.c |   14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -680,19 +680,11 @@ static dma_cookie_t atc_tx_submit(struct
 	spin_lock_irqsave(&atchan->lock, flags);
 	cookie = dma_cookie_assign(tx);
 
-	if (list_empty(&atchan->active_list)) {
-		dev_vdbg(chan2dev(tx->chan), "tx_submit: started %u\n",
-				desc->txd.cookie);
-		atc_dostart(atchan, desc);
-		list_add_tail(&desc->desc_node, &atchan->active_list);
-	} else {
-		dev_vdbg(chan2dev(tx->chan), "tx_submit: queued %u\n",
-				desc->txd.cookie);
-		list_add_tail(&desc->desc_node, &atchan->queue);
-	}
-
+	list_add_tail(&desc->desc_node, &atchan->queue);
 	spin_unlock_irqrestore(&atchan->lock, flags);
 
+	dev_vdbg(chan2dev(tx->chan), "tx_submit: queued %u\n",
+		 desc->txd.cookie);
 	return cookie;
 }
 



  parent reply	other threads:[~2022-11-23  9:05 UTC|newest]

Thread overview: 121+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23  8:49 [PATCH 4.19 000/114] 4.19.267-rc1 review Greg Kroah-Hartman
2022-11-23  8:49 ` [PATCH 4.19 001/114] phy: stm32: fix an error code in probe Greg Kroah-Hartman
2022-11-23  8:49 ` [PATCH 4.19 002/114] wifi: cfg80211: fix memory leak in query_regdb_file() Greg Kroah-Hartman
2022-11-23  8:49 ` [PATCH 4.19 003/114] HID: hyperv: fix possible memory leak in mousevsc_probe() Greg Kroah-Hartman
2022-11-23  8:49 ` [PATCH 4.19 004/114] net: gso: fix panic on frag_list with mixed head alloc types Greg Kroah-Hartman
2022-11-23  8:49 ` [PATCH 4.19 005/114] net: tun: Fix memory leaks of napi_get_frags Greg Kroah-Hartman
2022-11-23  8:49 ` [PATCH 4.19 006/114] bnxt_en: fix potentially incorrect return value for ndo_rx_flow_steer Greg Kroah-Hartman
2022-11-23  8:49 ` [PATCH 4.19 007/114] net: fman: Unregister ethernet device on removal Greg Kroah-Hartman
2022-11-23  8:49 ` [PATCH 4.19 008/114] capabilities: fix undefined behavior in bit shift for CAP_TO_MASK Greg Kroah-Hartman
2022-11-23  8:49 ` [PATCH 4.19 009/114] net: lapbether: fix issue of dev reference count leakage in lapbeth_device_event() Greg Kroah-Hartman
2022-11-23  8:49 ` [PATCH 4.19 010/114] hamradio: fix issue of dev reference count leakage in bpq_device_event() Greg Kroah-Hartman
2022-11-23  8:49 ` [PATCH 4.19 011/114] drm/vc4: Fix missing platform_unregister_drivers() call in vc4_drm_register() Greg Kroah-Hartman
2022-11-23  8:49 ` [PATCH 4.19 012/114] ipv6: addrlabel: fix infoleak when sending struct ifaddrlblmsg to network Greg Kroah-Hartman
2022-11-23  9:05   ` syzbot
2022-11-23  8:50 ` [PATCH 4.19 013/114] tipc: fix the msg->req tlv len check in tipc_nl_compat_name_table_dump_header Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 014/114] dmaengine: mv_xor_v2: Fix a resource leak in mv_xor_v2_remove() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 015/114] drivers: net: xgene: disable napi when register irq failed in xgene_enet_open() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 016/114] net: nixge: disable napi when enable interrupts failed in nixge_open() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 017/114] net: cxgb3_main: disable napi when bind qsets failed in cxgb_up() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 018/114] ethernet: s2io: disable napi when start nic failed in s2io_card_up() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 019/114] net: mv643xx_eth: disable napi when init rxq or txq failed in mv643xx_eth_open() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 020/114] net: macvlan: fix memory leaks of macvlan_common_newlink Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 021/114] riscv: process: fix kernel info leakage Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 022/114] arm64: efi: Fix handling of misaligned runtime regions and drop warning Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 023/114] ALSA: hda/ca0132: add quirk for EVGA Z390 DARK Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 024/114] ALSA: hda: fix potential memleak in add_widget_node Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 025/114] ALSA: usb-audio: Add quirk entry for M-Audio Micro Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 026/114] ALSA: usb-audio: Add DSD support for Accuphase DAC-60 Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 027/114] vmlinux.lds.h: Fix placement of .data..decrypted section Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 028/114] nilfs2: fix deadlock in nilfs_count_free_blocks() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 029/114] nilfs2: fix use-after-free bug of ns_writer on remount Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 030/114] drm/i915/dmabuf: fix sg_table handling in map_dma_buf Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 031/114] platform/x86: hp_wmi: Fix rfkill causing soft blocked wifi Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 032/114] btrfs: selftests: fix wrong error check in btrfs_free_dummy_root() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 033/114] udf: Fix a slab-out-of-bounds write bug in udf_find_entry() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 034/114] cert host tools: Stop complaining about deprecated OpenSSL functions Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 035/114] dmaengine: at_hdmac: Fix at_lli struct definition Greg Kroah-Hartman
2022-11-23  8:50 ` Greg Kroah-Hartman [this message]
2022-11-23  8:50 ` [PATCH 4.19 037/114] dmaengine: at_hdmac: Fix completion of unissued descriptor in case of errors Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 038/114] dmaengine: at_hdmac: Dont allow CPU to reorder channel enable Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 039/114] dmaengine: at_hdmac: Fix impossible condition Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 040/114] dmaengine: at_hdmac: Check return code of dma_async_device_register Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 041/114] net: tun: call napi_schedule_prep() to ensure we own a napi Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 042/114] x86/cpu: Restore AMDs DE_CFG MSR after resume Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 043/114] ASoC: wm5102: Revert "ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe" Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 044/114] ASoC: wm5110: Revert "ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe" Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 045/114] ASoC: wm8997: Revert "ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe" Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 046/114] spi: intel: Fix the offset to get the 64K erase opcode Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 047/114] selftests/futex: fix build for clang Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 048/114] selftests/intel_pstate: fix build for ARCH=x86_64 Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 049/114] rtc: cmos: fix build on non-ACPI platforms Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 050/114] NFSv4: Retry LOCK on OLD_STATEID during delegation return Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 051/114] drm/imx: imx-tve: Fix return type of imx_tve_connector_mode_valid Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 052/114] btrfs: remove pointless and double ulist frees in error paths of qgroup tests Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 053/114] Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 054/114] ASoC: core: Fix use-after-free in snd_soc_exit() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 055/114] serial: 8250_omap: remove wait loop from Errata i202 workaround Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 056/114] serial: 8250: omap: Flush PM QOS work on remove Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 057/114] serial: imx: Add missing .thaw_noirq hook Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 058/114] tty: n_gsm: fix sleep-in-atomic-context bug in gsm_control_send Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 059/114] ASoC: soc-utils: Remove __exit for snd_soc_util_exit() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 060/114] block: sed-opal: kmalloc the cmd/resp buffers Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 061/114] siox: fix possible memory leak in siox_device_add() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 062/114] parport_pc: Avoid FIFO port location truncation Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 063/114] pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 064/114] ata: libata-transport: fix double ata_host_put() in ata_tport_add() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 065/114] net: bgmac: Drop free_netdev() from bgmac_enet_remove() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 066/114] mISDN: fix possible memory leak in mISDN_dsp_element_register() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 067/114] mISDN: fix misuse of put_device() in mISDN_register_device() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 068/114] net: caif: fix double disconnect client in chnl_net_open() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 069/114] bnxt_en: Remove debugfs when pci_register_driver failed Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 070/114] xen/pcpu: fix possible memory leak in register_pcpu() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 071/114] drbd: use after free in drbd_create_device() Greg Kroah-Hartman
2022-11-23  8:50 ` [PATCH 4.19 072/114] net/x25: Fix skb leak in x25_lapb_receive_frame() Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 073/114] cifs: Fix wrong return value checking when GETFLAGS Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 074/114] net: thunderbolt: Fix error handling in tbnet_init() Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 075/114] ftrace: Fix the possible incorrect kernel message Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 076/114] ftrace: Optimize the allocation for mcount entries Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 077/114] ftrace: Fix null pointer dereference in ftrace_add_mod() Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 078/114] ring_buffer: Do not deactivate non-existant pages Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 079/114] ALSA: usb-audio: Drop snd_BUG_ON() from snd_usbmidi_output_open() Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 080/114] slimbus: stream: correct presence rate frequencies Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 081/114] speakup: fix a segfault caused by switching consoles Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 082/114] USB: serial: option: add Sierra Wireless EM9191 Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 083/114] USB: serial: option: remove old LARA-R6 PID Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 084/114] USB: serial: option: add u-blox LARA-R6 00B modem Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 085/114] USB: serial: option: add u-blox LARA-L6 modem Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 086/114] USB: serial: option: add Fibocom FM160 0x0111 composition Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 087/114] usb: add NO_LPM quirk for Realforce 87U Keyboard Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 088/114] usb: chipidea: fix deadlock in ci_otg_del_timer Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 089/114] iio: adc: at91_adc: fix possible memory leak in at91_adc_allocate_trigger() Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 090/114] iio: trigger: sysfs: fix possible memory leak in iio_sysfs_trig_init() Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 091/114] iio: pressure: ms5611: changed hardcoded SPI speed to value limited Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 092/114] dm ioctl: fix misbehavior if list_versions races with module loading Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 093/114] serial: 8250: Fall back to non-DMA Rx if IIR_RDI occurs Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 094/114] serial: 8250_lpss: Configure DMA also w/o DMA filter Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 095/114] mmc: core: properly select voltage range without power cycle Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 096/114] mmc: sdhci-pci: Fix possible memory leak caused by missing pci_dev_put() Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 097/114] docs: update mediator contact information in CoC doc Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 098/114] misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram() Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 099/114] scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus() Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 100/114] Input: i8042 - fix leaking of platform device on module removal Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 101/114] serial: 8250: Flush DMA Rx on RLSI Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 102/114] macvlan: enforce a consistent minimal mtu Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 103/114] tcp: cdg: allow tcp_cdg_release() to be called multiple times Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 104/114] kcm: avoid potential race in kcm_tx_work Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 105/114] bpf, test_run: Fix alignment problem in bpf_prog_test_run_skb() Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 106/114] kcm: close race conditions on sk_receive_queue Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 107/114] 9p: trans_fd/p9_conn_cancel: drop client lock earlier Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 108/114] gfs2: Check sb_bsize_shift after reading superblock Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 109/114] gfs2: Switch from strlcpy to strscpy Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 110/114] 9p/trans_fd: always use O_NONBLOCK read/write Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 111/114] mm: fs: initialize fsdata passed to write_begin/write_end interface Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 112/114] ntfs: fix use-after-free in ntfs_attr_find() Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 113/114] ntfs: fix out-of-bounds read " Greg Kroah-Hartman
2022-11-23  8:51 ` [PATCH 4.19 114/114] ntfs: check overflow when iterating ATTR_RECORDs Greg Kroah-Hartman
2022-11-23 11:15 ` [PATCH 4.19 000/114] 4.19.267-rc1 review Pavel Machek
2022-11-24  2:36 ` Guenter Roeck
2022-11-24 10:44 ` Sudip Mukherjee
2022-11-24 10:58 ` Naresh Kamboju
2022-11-26  2:29 ` zhouzhixiu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221123084553.281712132@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=patches@lists.linux.dev \
    --cc=peda@axentia.se \
    --cc=stable@vger.kernel.org \
    --cc=tudor.ambarus@microchip.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).