Skip to content

Commit 6fec199

Browse files
edumazetgregkh
authored andcommitted
net: fix harmonize_features() vs NETIF_F_HIGHDMA
[ Upstream commit 7be2c82cfd5d28d7adb66821a992604eb6dd112e ] Ashizuka reported a highmem oddity and sent a patch for freescale fec driver. But the problem root cause is that core networking stack must ensure no skb with highmem fragment is ever sent through a device that does not assert NETIF_F_HIGHDMA in its features. We need to call illegal_highdma() from harmonize_features() regardless of CSUM checks. Fixes: ec5f061 ("net: Kill link between CSUM and SG features.") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Pravin Shelar <pshelar@ovn.org> Reported-by: "Ashizuka, Yuusuke" <ashiduka@jp.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4f5e54b commit 6fec199

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

net/core/dev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2650,9 +2650,9 @@ static netdev_features_t harmonize_features(struct sk_buff *skb,
26502650
if (skb->ip_summed != CHECKSUM_NONE &&
26512651
!can_checksum_protocol(features, type)) {
26522652
features &= ~NETIF_F_ALL_CSUM;
2653-
} else if (illegal_highdma(skb->dev, skb)) {
2654-
features &= ~NETIF_F_SG;
26552653
}
2654+
if (illegal_highdma(skb->dev, skb))
2655+
features &= ~NETIF_F_SG;
26562656

26572657
return features;
26582658
}

0 commit comments

Comments
 (0)