From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Maurizio Lombardi <mlombard@redhat.com>,
Chad Dupuis <chad.dupuis@qlogic.com>,
Christoph Hellwig <hch@lst.de>
Subject: [PATCH 3.14 65/73] bnx2fc: do not add shared skbs to the fcoe_rx_list
Date: Fri, 5 Dec 2014 14:45:11 -0800 [thread overview]
Message-ID: <20141205224435.873693961@linuxfoundation.org> (raw)
In-Reply-To: <20141205224433.921659956@linuxfoundation.org>
3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maurizio Lombardi <mlombard@redhat.com>
commit 01a4cc4d0cd6a836c7b923760e8eb1cbb6a47258 upstream.
In some cases, the fcoe_rx_list may contains multiple instances
of the same skb (the so called "shared skbs").
the bnx2fc_l2_rcv thread is a loop that extracts a skb from the list,
modifies (and destroys) its content and then proceed to the next one.
The problem is that if the skb is shared, the remaining instances will
be corrupted.
The solution is to use skb_share_check() before adding the skb to the
fcoe_rx_list.
[ 6286.808725] ------------[ cut here ]------------
[ 6286.808729] WARNING: at include/scsi/fc_frame.h:173 bnx2fc_l2_rcv_thread+0x425/0x450 [bnx2fc]()
[ 6286.808748] Modules linked in: bnx2x(-) mdio dm_service_time bnx2fc cnic uio fcoe libfcoe 8021q garp stp mrp libfc llc scsi_transport_fc scsi_tgt sg iTCO_wdt iTCO_vendor_support coretemp kvm_intel kvm crct10dif_pclmul crc32_pclmul crc32c_intel e1000e ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper ptp cryptd hpilo serio_raw hpwdt lpc_ich pps_core ipmi_si pcspkr mfd_core ipmi_msghandler shpchp pcc_cpufreq mperf nfsd auth_rpcgss nfs_acl lockd sunrpc dm_multipath xfs libcrc32c ata_generic pata_acpi sd_mod crc_t10dif crct10dif_common mgag200 syscopyarea sysfillrect sysimgblt i2c_algo_bit ata_piix drm_kms_helper ttm drm libata i2c_core hpsa dm_mirror dm_region_hash dm_log dm_mod [last unloaded: mdio]
[ 6286.808750] CPU: 3 PID: 1304 Comm: bnx2fc_l2_threa Not tainted 3.10.0-121.el7.x86_64 #1
[ 6286.808750] Hardware name: HP ProLiant DL120 G7, BIOS J01 07/01/2013
[ 6286.808752] 0000000000000000 000000000b36e715 ffff8800deba1e00 ffffffff815ec0ba
[ 6286.808753] ffff8800deba1e38 ffffffff8105dee1 ffffffffa05618c0 ffff8801e4c81888
[ 6286.808754] ffffe8ffff663868 ffff8801f402b180 ffff8801f56bc000 ffff8800deba1e48
[ 6286.808754] Call Trace:
[ 6286.808759] [<ffffffff815ec0ba>] dump_stack+0x19/0x1b
[ 6286.808762] [<ffffffff8105dee1>] warn_slowpath_common+0x61/0x80
[ 6286.808763] [<ffffffff8105e00a>] warn_slowpath_null+0x1a/0x20
[ 6286.808765] [<ffffffffa054f415>] bnx2fc_l2_rcv_thread+0x425/0x450 [bnx2fc]
[ 6286.808767] [<ffffffffa054eff0>] ? bnx2fc_disable+0x90/0x90 [bnx2fc]
[ 6286.808769] [<ffffffff81085aef>] kthread+0xcf/0xe0
[ 6286.808770] [<ffffffff81085a20>] ? kthread_create_on_node+0x140/0x140
[ 6286.808772] [<ffffffff815fc76c>] ret_from_fork+0x7c/0xb0
[ 6286.808773] [<ffffffff81085a20>] ? kthread_create_on_node+0x140/0x140
[ 6286.808774] ---[ end trace c6cdb939184ccb4e ]---
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -411,6 +411,7 @@ static int bnx2fc_rcv(struct sk_buff *sk
struct fc_frame_header *fh;
struct fcoe_rcv_info *fr;
struct fcoe_percpu_s *bg;
+ struct sk_buff *tmp_skb;
unsigned short oxid;
interface = container_of(ptype, struct bnx2fc_interface,
@@ -423,6 +424,12 @@ static int bnx2fc_rcv(struct sk_buff *sk
goto err;
}
+ tmp_skb = skb_share_check(skb, GFP_ATOMIC);
+ if (!tmp_skb)
+ goto err;
+
+ skb = tmp_skb;
+
if (unlikely(eth_hdr(skb)->h_proto != htons(ETH_P_FCOE))) {
printk(KERN_ERR PFX "bnx2fc_rcv: Wrong FC type frame\n");
goto err;
next prev parent reply other threads:[~2014-12-05 22:45 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 22:44 [PATCH 3.14 00/73] 3.14.26-stable review Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 01/73] MIPS: oprofile: Fix backtrace on 64-bit kernel Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 02/73] MIPS: Loongson: Make platform serial setup always built-in Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 03/73] x86_64, traps: Fix the espfix64 #DF fixup and rewrite it in C Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 04/73] x86_64, traps: Stop using IST for #SS Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 05/73] x86_64, traps: Rework bad_iret Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 06/73] x86: Require exact match for noxsave command line option Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 07/73] x86, mm: Set NX across entire PMD at boot Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 08/73] x86, kaslr: Handle Gold linker for finding bss/brk Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 09/73] uprobes, x86: Fix _TIF_UPROBE vs _TIF_NOTIFY_RESUME Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 10/73] sparc64: Fix constraints on swab helpers Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 11/73] inetdevice: fixed signed integer overflow Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 12/73] ipv4: Fix incorrect error code when adding an unreachable route Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 13/73] ieee802154: fix error handling in ieee802154fake_probe() Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 15/73] bonding: fix curr_active_slave/carrier with loadbalance arp monitoring Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 16/73] pptp: fix stack info leak in pptp_getname() Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 17/73] ipx: fix locking regression in ipx_sendmsg and ipx_recvmsg Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 18/73] PCI: Support 64-bit bridge windows if we have 64-bit dma_addr_t Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 19/73] PCI/MSI: Add device flag indicating that 64-bit MSIs dont work Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 20/73] clockevent: sun4i: Fix race condition in the probe code Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 21/73] IB/isert: Adjust CQ size to HW limits Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 22/73] ib_isert: Add max_send_sge=2 minimum for control PDU responses Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 23/73] ASoC: rsnd: remove unsupported PAUSE flag Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 24/73] ASoC: fsi: " Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 25/73] ASoC: sgtl5000: Fix SMALL_POP bit definition Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 26/73] ASoC: wm_adsp: Avoid attempt to free buffers that might still be in use Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 27/73] ASoC: dpcm: Fix race between FE/BE updates and trigger Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 28/73] ath9k: Fix RTC_DERIVED_CLK usage Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 29/73] of/base: Fix PowerPC address parsing hack Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 30/73] powerpc/pseries: Honor the generic "no_64bit_msi" flag Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 31/73] powerpc/pseries: Fix endiannes issue in RTAS call from xmon Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 32/73] iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 33/73] staging: r8188eu: Add new device ID for DLink GO-USB-N150 Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 34/73] USB: ssu100: fix overrun-error reporting Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 35/73] USB: keyspan: " Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 36/73] USB: keyspan: fix tty line-status reporting Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 37/73] USB: serial: cp210x: add IDs for CEL MeshConnect USB Stick Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 38/73] usb: serial: ftdi_sio: add PIDs for Matrix Orbital products Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 39/73] usb-quirks: Add reset-resume quirk for MS Wireless Laser Mouse 6000 Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 40/73] USB: xhci: dont start a halted endpoint before its new dequeue is set Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 41/73] usb: xhci: rework root port wake bits if controller isnt allowed to wakeup Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 42/73] can: esd_usb2: fix memory leak on disconnect Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 43/73] ALSA: usb-audio: Add ctrl message delay quirk for Marantz/Denon devices Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 45/73] of/irq: Drop obsolete interrupts vs interrupts-extended text Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 46/73] ARM: 8216/1: xscale: correct auxiliary register in suspend/resume Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 47/73] ARM: 8222/1: mvebu: enable strex backoff delay Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 48/73] ARM: 8226/1: cacheflush: get rid of restarting block Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 49/73] Input: synaptics - adjust min/max on Thinkpad E540 Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 50/73] Input: xpad - use proper endpoint type Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 51/73] srp-target: Retry when QP creation fails with ENOMEM Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 52/73] target: Dont call TFO->write_pending if data_length == 0 Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.14 53/73] iser-target: Handle DEVICE_REMOVAL event on network portal listener correctly Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 54/73] Target/iser: Fix a wrong dereference in case discovery session is over iser Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 55/73] iser-target: Disable TX completion interrupt coalescing Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 56/73] spi: dw: Fix dynamic speed change Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 57/73] vhost-scsi: Take configfs group dependency during VHOST_SCSI_SET_ENDPOINT Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 60/73] rt2x00: do not align payload on modern H/W Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 61/73] nfsd: correctly define v4.2 support attributes Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 62/73] nfsd: Fix slot wake up race in the nfsv4.1 callback code Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 63/73] nfsd: dont halt scanning the DRC LRU list when theres an RC_INPROG entry Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 64/73] net/ping: handle protocol mismatching scenario Greg Kroah-Hartman
2014-12-05 22:45 ` Greg Kroah-Hartman [this message]
2014-12-05 22:45 ` [PATCH 3.14 66/73] drm/radeon: fix endian swapping in vbios fetch for tdp table Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 67/73] gpu/radeon: Set flag to indicate broken 64-bit MSI Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 68/73] bitops: Fix shift overflow in GENMASK macros Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 69/73] locks: eliminate BUG() call when theres an unexpected lock on file close Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 70/73] powerpc/powernv: Honor the generic "no_64bit_msi" flag Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 71/73] batman: fix a bogus warning from batadv_is_on_batman_iface() Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.14 72/73] x86: kvm: use alternatives for VMCALL vs. VMMCALL if kernel text is read-only Greg Kroah-Hartman
2014-12-06 3:30 ` [PATCH 3.14 00/73] 3.14.26-stable review Guenter Roeck
2014-12-06 21:36 ` Shuah Khan
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=20141205224435.873693961@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=chad.dupuis@qlogic.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mlombard@redhat.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 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).