From: Rongguang Wei The USO features in set_offload() incorrectly uses feature_mask instead of arg argument. TUN_F_USO4 and TUN_F_USO6 belong to the TUN_F_* flag, while feature_mask belong to NETIF_F_* values (NETIF_F_HW_CSUM, NETIF_F_TSO, etc.) and will never contain any TUN_F_* bits. Fixes: 399e0827642f ("driver/net/tun: Added features for USO.") Signed-off-by: Rongguang Wei --- drivers/net/tap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tap.c b/drivers/net/tap.c index fae115915c8e..ce25ebeeccf0 100644 --- a/drivers/net/tap.c +++ b/drivers/net/tap.c @@ -895,7 +895,7 @@ static int set_offload(struct tap_queue *q, unsigned long arg) * user-space will not receive TSO frames. */ if (feature_mask & (NETIF_F_TSO | NETIF_F_TSO6) || - (feature_mask & (TUN_F_USO4 | TUN_F_USO6)) == (TUN_F_USO4 | TUN_F_USO6)) + (arg & (TUN_F_USO4 | TUN_F_USO6)) == (TUN_F_USO4 | TUN_F_USO6)) features |= RX_OFFLOADS; else features &= ~RX_OFFLOADS; -- 2.25.1 No virus found Checked by Hillstone Network AntiVirus