All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Pavel Belous <pbelous@marvell.com>,
	Igor Russkikh <irusskikh@marvell.com>,
	Dmitry Bogdanov <dbogdanov@marvell.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: [PATCH 4.14 053/126] net: atlantic: fix potential error handling
Date: Tue, 10 Mar 2020 13:41:14 +0100	[thread overview]
Message-ID: <20200310124207.605511122@linuxfoundation.org> (raw)
In-Reply-To: <20200310124203.704193207@linuxfoundation.org>

From: Pavel Belous <pbelous@marvell.com>

commit 380ec5b9af7f0d57dbf6ac067fd9f33cff2fef71 upstream.

Code inspection found that in case of mapping error we do return current
'ret' value. But beside error, it is used to count number of descriptors
allocated for the packet. In that case map_skb function could return '1'.

Changing it to return zero (number of mapped descriptors for skb)

Fixes: 018423e90bee ("net: ethernet: aquantia: Add ring support code")
Signed-off-by: Pavel Belous <pbelous@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Dmitry Bogdanov <dbogdanov@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/ethernet/aquantia/atlantic/aq_nic.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
@@ -519,8 +519,10 @@ static unsigned int aq_nic_map_skb(struc
 				     dx_buff->len,
 				     DMA_TO_DEVICE);
 
-	if (unlikely(dma_mapping_error(aq_nic_get_dev(self), dx_buff->pa)))
+	if (unlikely(dma_mapping_error(aq_nic_get_dev(self), dx_buff->pa))) {
+		ret = 0;
 		goto exit;
+	}
 
 	first = dx_buff;
 	dx_buff->len_pkt = skb->len;



  parent reply	other threads:[~2020-03-10 13:08 UTC|newest]

Thread overview: 142+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 12:40 [PATCH 4.14 000/126] 4.14.173-stable review Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 001/126] iwlwifi: pcie: fix rb_allocator workqueue allocation Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 002/126] netfilter: nf_conntrack: resolve clash for matching conntracks Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 003/126] ext4: fix potential race between online resizing and write operations Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 004/126] ext4: fix potential race between s_flex_groups online resizing and access Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 005/126] ext4: fix potential race between s_group_info " Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 006/126] ipmi:ssif: Handle a possible NULL pointer reference Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 007/126] drm/msm: Set dma maximum segment size for mdss Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 008/126] dax: pass NOWAIT flag to iomap_apply Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 009/126] mac80211: consider more elements in parsing CRC Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 010/126] cfg80211: check wiphy driver existence for drvinfo report Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 011/126] qmi_wwan: re-add DW5821e pre-production variant Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 012/126] qmi_wwan: unconditionally reject 2 ep interfaces Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 013/126] net: ena: fix potential crash when rxfh key is NULL Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 014/126] net: ena: fix uses of round_jiffies() Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 015/126] net: ena: add missing ethtool TX timestamping indication Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 016/126] net: ena: fix incorrect default RSS key Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 017/126] net: ena: rss: fix failure to get indirection table Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 018/126] net: ena: rss: store hash function as values and not bits Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 019/126] net: ena: fix incorrectly saving queue numbers when setting RSS indirection table Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 020/126] net: ena: ethtool: use correct value for crc32 hash Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 021/126] net: ena: ena-com.c: prevent NULL pointer dereference Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 022/126] cifs: Fix mode output in debugging statements Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 023/126] cfg80211: add missing policy for NL80211_ATTR_STATUS_CODE Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 024/126] sysrq: Restore original console_loglevel when sysrq disabled Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 025/126] sysrq: Remove duplicated sysrq message Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 026/126] net: fib_rules: Correctly set table field when table number exceeds 8 bits Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 027/126] net: phy: restore mdio regs in the iproc mdio driver Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 028/126] nfc: pn544: Fix occasional HW initialization failure Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 029/126] sctp: move the format error check out of __sctp_sf_do_9_1_abort Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 030/126] ipv6: Fix nlmsg_flags when splitting a multipath route Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 031/126] ipv6: Fix route replacement with dev-only route Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 032/126] qede: Fix race between rdma destroy workqueue and link change event Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 033/126] net: sched: correct flower port blocking Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 034/126] ext4: potential crash on allocation error in ext4_alloc_flex_bg_array() Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 035/126] audit: fix error handling in audit_data_to_entry() Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 036/126] ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 037/126] ACPI: watchdog: Fix gas->access_width usage Greg Kroah-Hartman
2020-03-10 12:40 ` [PATCH 4.14 038/126] KVM: VMX: check descriptor table exits on instruction emulation Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 039/126] HID: ite: Only bind to keyboard USB interface on Acer SW5-012 keyboard dock Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 040/126] HID: core: fix off-by-one memset in hid_report_raw_event() Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 041/126] HID: core: increase HID report buffer size to 8KiB Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 042/126] tracing: Disable trace_printk() on post poned tests Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 043/126] Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs" Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 044/126] HID: hiddev: Fix race in in hiddev_disconnect() Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 045/126] MIPS: VPE: Fix a double free and a memory leak in release_vpe() Greg Kroah-Hartman
2020-03-10 12:41   ` Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 046/126] i2c: altera: Fix potential integer overflow Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 047/126] i2c: jz4780: silence log flood on txabrt Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 048/126] drm/i915/gvt: Separate display reset from ALL_ENGINES reset Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 049/126] usb: charger: assign specific number for enum value Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 050/126] ecryptfs: Fix up bad backport of fe2e082f5da5b4a0a92ae32978f81507ef37ec66 Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 051/126] include/linux/bitops.h: introduce BITS_PER_TYPE Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 052/126] net: netlink: cap max groups which will be considered in netlink_bind() Greg Kroah-Hartman
2020-03-10 12:41 ` Greg Kroah-Hartman [this message]
2020-03-10 12:41 ` [PATCH 4.14 054/126] net: ena: make ena rxfh support ETH_RSS_HASH_NO_CHANGE Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 055/126] namei: only return -ECHILD from follow_dotdot_rcu() Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 056/126] mwifiex: drop most magic numbers from mwifiex_process_tdls_action_frame() Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 057/126] KVM: SVM: Override default MMIO mask if memory encryption is enabled Greg Kroah-Hartman
2020-03-10 18:19   ` Sean Christopherson
2020-03-10 18:42     ` Tom Lendacky
2020-03-10 20:59       ` Tom Lendacky
2020-03-11 13:06         ` Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 058/126] KVM: Check for a bad hva before dropping into the ghc slow path Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 059/126] tuntap: correctly set SOCKWQ_ASYNC_NOSPACE Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 060/126] drivers: net: xgene: Fix the order of the arguments of alloc_etherdev_mqs() Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 061/126] kprobes: Set unoptimized flag after unoptimizing code Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 062/126] perf hists browser: Restore ESC as "Zoom out" of DSO/thread/etc Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 063/126] mm/huge_memory.c: use head to check huge zero page Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 064/126] mm, thp: fix defrag setting if newline is not used Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 065/126] [PATCH] Revert "char/random: silence a lockdep splat with printk()" Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 066/126] audit: always check the netlink payload length in audit_receive_msg() Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 067/126] vhost: Check docket sk_family instead of call getname Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 068/126] x86/mce: Handle varying MCA bank counts Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 069/126] EDAC/amd64: Set grain per DIMM Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 070/126] net: dsa: bcm_sf2: Forcibly configure IMP port for 1Gb/sec Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 071/126] RDMA/core: Fix pkey and port assignment in get_new_pps Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 072/126] RDMA/core: Fix use of logical OR " Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 073/126] kprobes: Fix optimize_kprobe()/unoptimize_kprobe() cancellation logic Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 074/126] serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 075/126] selftests: fix too long argument Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 076/126] usb: gadget: composite: Support more than 500mA MaxPower Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 077/126] usb: gadget: ffs: ffs_aio_cancel(): Save/restore IRQ flags Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 078/126] usb: gadget: serial: fix Tx stall after buffer overflow Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 079/126] drm/msm/mdp5: rate limit pp done timeout warnings Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 080/126] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 081/126] drm/msm/dsi: save pll state before dsi host is powered off Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 082/126] net: ks8851-ml: Remove 8-bit bus accessors Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 083/126] net: ks8851-ml: Fix 16-bit data access Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 084/126] net: ks8851-ml: Fix 16-bit IO operation Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 085/126] watchdog: da9062: do not ping the hw during stop() Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 086/126] s390/cio: cio_ignore_proc_seq_next should increase position index Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 087/126] x86/boot/compressed: Dont declare __force_order in kaslr_64.c Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 088/126] nvme: Fix uninitialized-variable warning Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 089/126] x86/xen: Distribute switch variables for initialization Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 090/126] net: thunderx: workaround BGX TX Underflow issue Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 091/126] cifs: dont leak -EAGAIN for stat() during reconnect Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 092/126] usb: storage: Add quirk for Samsung Fit flash Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 093/126] usb: quirks: add NO_LPM quirk for Logitech Screen Share Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 094/126] usb: core: hub: fix unhandled return by employing a void function Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 095/126] usb: core: hub: do error out if usb_autopm_get_interface() fails Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 096/126] usb: core: port: " Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 097/126] vgacon: Fix a UAF in vgacon_invert_region Greg Kroah-Hartman
2020-03-10 12:41 ` [PATCH 4.14 098/126] mm, numa: fix bad pmd by atomically check for pmd_trans_huge when marking page tables prot_numa Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 099/126] fat: fix uninit-memory access for partial initialized inode Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 100/126] arm: dts: dra76x: Fix mmc3 max-frequency Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 101/126] tty:serial:mvebu-uart:fix a wrong return Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 102/126] serial: 8250_exar: add support for ACCES cards Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 103/126] vt: selection, close sel_buffer race Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 104/126] vt: selection, push console lock down Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 105/126] vt: selection, push sel_lock up Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 106/126] x86/pkeys: Manually set X86_FEATURE_OSPKE to preserve existing changes Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 107/126] dmaengine: tegra-apb: Fix use-after-free Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 108/126] dmaengine: tegra-apb: Prevent race conditions of tasklet vs free list Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 109/126] dm cache: fix a crash due to incorrect work item cancelling Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 110/126] ARM: dts: ls1021a: Restore MDIO compatible to gianfar Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 111/126] ASoC: topology: Fix memleak in soc_tplg_link_elems_load() Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 112/126] ASoC: intel: skl: Fix pin debug prints Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 113/126] ASoC: intel: skl: Fix possible buffer overflow in debug outputs Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 114/126] ASoC: pcm: Fix possible buffer overflow in dpcm state sysfs output Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 115/126] ASoC: pcm512x: Fix unbalanced regulator enable call in probe error path Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 116/126] ASoC: dapm: Correct DAPM handling of active widgets during shutdown Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 117/126] RDMA/iwcm: Fix iwcm work deallocation Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 118/126] RMDA/cm: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen() Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 119/126] IB/hfi1, qib: Ensure RCU is locked when accessing list Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 120/126] ARM: imx: build v7_cpu_resume() unconditionally Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 121/126] ARM: dts: imx6dl-colibri-eval-v3: fix sram compatible properties Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 122/126] hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT() Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 123/126] dmaengine: coh901318: Fix a double lock bug in dma_tc_handle() Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 124/126] powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 125/126] dm integrity: fix a deadlock due to offloading to an incorrect workqueue Greg Kroah-Hartman
2020-03-10 12:42 ` [PATCH 4.14 126/126] xhci: handle port status events for removed USB3 hcd Greg Kroah-Hartman
2020-03-10 20:07 ` [PATCH 4.14 000/126] 4.14.173-stable review Jon Hunter
2020-03-10 20:07   ` Jon Hunter
2020-03-10 21:26 ` shuah
2020-03-11 13:08   ` Greg Kroah-Hartman
2020-03-13 16:17   ` Naresh Kamboju
2020-03-10 21:58 ` Guenter Roeck
2020-03-11  6:49 ` Naresh Kamboju
2020-03-11 13:11 ` Greg Kroah-Hartman
2020-03-11 19:39   ` shuah
2020-03-12  6:21     ` Greg Kroah-Hartman

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=20200310124207.605511122@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=davem@davemloft.net \
    --cc=dbogdanov@marvell.com \
    --cc=irusskikh@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbelous@marvell.com \
    --cc=stable@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.