8000 Merge tag 'critical_fix_for_3.9' of git://git.kernel.org/pub/scm/linu… · codeguru85/linux@de6e131 · GitHub
[go: up one dir, main page]

Skip to content

Commit de6e131

Browse files
committed
Merge tag 'critical_fix_for_3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/rwlove/fcoe
Pull FCoE fix from Robert W Love: "This patch fixes a critical bug that was introduced in 3.9 related to VLAN tagging FCoE frames" * tag 'critical_fix_for_3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/rwlove/fcoe: fcoe: Use correct API to set vlan tag for FCoE Ethertype skbs
2 parents 78750f1 + 2884d42 commit de6e131

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/scsi/fcoe/fcoe.c

Lines changed: 5 additions & 2 deletions
< 6704 td data-grid-cell-id="diff-639bd6017f63bab16d25c5e3fd12af29f23fa052aaea8bb467da623bf8f6389c-1660-1659-2" data-line-anchor="diff-639bd6017f63bab16d25c5e3fd12af29f23fa052aaea8bb467da623bf8f6389cR1659" data-selected="false" role="gridcell" style="background-color:var(--diffBlob-additionLine-bgColor, var(--diffBlob-addition-bgColor-line));padding-right:24px" tabindex="-1" valign="top" class="focusable-grid-cell diff-text-cell right-side-diff-cell left-side">+
/* must set skb->dev before calling vlan_put_tag */
Original file line numberDiff line numberDiff line change
@@ -1656,9 +1656,12 @@ static int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp)
16561656

16571657
if (fcoe->netdev->priv_flags & IFF_802_1Q_VLAN &&
16581658
fcoe->realdev->features & NETIF_F_HW_VLAN_CTAG_TX) {
1659-
skb->vlan_tci = VLAN_TAG_PRESENT |
1660-
vlan_dev_vlan_id(fcoe->netdev);
1659
16611660
skb->dev = fcoe->realdev;
1661+
skb = __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
1662+
vlan_dev_vlan_id(fcoe->netdev));
1663+
if (!skb)
1664+
return -ENOMEM;
16621665
} else
16631666
skb->dev = fcoe->netdev;
16641667

0 commit comments

Comments
 (0)
0