From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752247AbdHPOaJ (ORCPT ); Wed, 16 Aug 2017 10:30:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45836 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751661AbdHPOaI (ORCPT ); Wed, 16 Aug 2017 10:30:08 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E8FFC81DED Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jasowang@redhat.com Subject: Re: [PATCH] tun: make tun_build_skb() thread safe To: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: mst@redhat.com, Eric Dumazet References: <1502892873-10770-1-git-send-email-jasowang@redhat.com> From: Jason Wang Message-ID: <10bb7c67-d30f-2f72-9e16-a9c3a99bc7fc@redhat.com> Date: Wed, 16 Aug 2017 22:29:55 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1502892873-10770-1-git-send-email-jasowang@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 16 Aug 2017 14:30:08 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017年08月16日 22:14, Jason Wang wrote: > From: Eric Dumazet > > tun_build_skb() is not thread safe since it uses per queue page frag, > this will break things when multiple threads are sending through same > queue. Switch to use per-thread generator (no lock involved). > > Fixes: 66ccbc9c87c2 ("tap: use build_skb() for small packet") > Tested-by: Jason Wang > Signed-off-by: Eric Dumazet > Signed-off-by: Jason Wang > --- > drivers/net/tun.c | 7 +------ Forget to mention, this is for net-next. Thanks