aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-12-03 09:38:03 +0100
committerTakashi Iwai <tiwai@suse.de>2014-12-03 09:38:58 +0100
commit2e3d4de1bd80b2f205aab0ed0a25daef464ab91c (patch)
tree7caa6a353f9ff9f5e196ed01bbbfce1c8c5ec8ae /drivers/scsi/bnx2fc/bnx2fc_fcoe.c
parentALSA: i2sbus: Deletion of unnecessary checks before the function call "release_and_free_resource" (diff)
parentLinux 3.18-rc7 (diff)
downloadlinux-dev-2e3d4de1bd80b2f205aab0ed0a25daef464ab91c.tar.xz
linux-dev-2e3d4de1bd80b2f205aab0ed0a25daef464ab91c.zip
Merge tag 'v3.18-rc7' into for-next
... for allowing more cleanups of hda_intel.c driver-caps where both upstream and for-next contain the changes.
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_fcoe.c')
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 79e5c94107a9..72533c58c1f3 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -412,6 +412,7 @@ static int bnx2fc_rcv(struct sk_buff *skb, struct net_device *dev,
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,
@@ -424,6 +425,12 @@ static int bnx2fc_rcv(struct sk_buff *skb, struct net_device *dev,
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;