Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9B5ECA9EAF for ; Thu, 24 Oct 2019 10:09:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8A10920663 for ; Thu, 24 Oct 2019 10:09:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393218AbfJXKJA (ORCPT ); Thu, 24 Oct 2019 06:09:00 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:47034 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388287AbfJXKI7 (ORCPT ); Thu, 24 Oct 2019 06:08:59 -0400 Received: from penelope.horms.nl (ip4dab7138.direct-adsl.nl [77.171.113.56]) by kirsty.vergenet.net (Postfix) with ESMTPA id 1E9BB25B768; Thu, 24 Oct 2019 21:08:58 +1100 (AEDT) Received: by penelope.horms.nl (Postfix, from userid 7100) id 7CA1336C2; Thu, 24 Oct 2019 12:08:55 +0200 (CEST) Date: Thu, 24 Oct 2019 12:08:55 +0200 From: Simon Horman To: Eric Dumazet Cc: "David S . Miller" , netdev , Eric Dumazet , syzbot , Wensong Zhang , Julian Anastasov Subject: Re: [PATCH net] ipvs: move old_secure_tcp into struct netns_ipvs Message-ID: <20191024100855.GA21854@verge.net.au> References: <20191023165303.259361-1-edumazet@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191023165303.259361-1-edumazet@google.com> Organisation: Horms Solutions BV User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Oct 23, 2019 at 09:53:03AM -0700, Eric Dumazet wrote: > syzbot reported the following issue : > > BUG: KCSAN: data-race in update_defense_level / update_defense_level > > read to 0xffffffff861a6260 of 4 bytes by task 3006 on cpu 1: > update_defense_level+0x621/0xb30 net/netfilter/ipvs/ip_vs_ctl.c:177 > defense_work_handler+0x3d/0xd0 net/netfilter/ipvs/ip_vs_ctl.c:225 > process_one_work+0x3d4/0x890 kernel/workqueue.c:2269 > worker_thread+0xa0/0x800 kernel/workqueue.c:2415 > kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253 > ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 > > write to 0xffffffff861a6260 of 4 bytes by task 7333 on cpu 0: > update_defense_level+0xa62/0xb30 net/netfilter/ipvs/ip_vs_ctl.c:205 > defense_work_handler+0x3d/0xd0 net/netfilter/ipvs/ip_vs_ctl.c:225 > process_one_work+0x3d4/0x890 kernel/workqueue.c:2269 > worker_thread+0xa0/0x800 kernel/workqueue.c:2415 > kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253 > ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 > > Reported by Kernel Concurrency Sanitizer on: > CPU: 0 PID: 7333 Comm: kworker/0:5 Not tainted 5.4.0-rc3+ #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 > Workqueue: events defense_work_handler > > Indeed, old_secure_tcp is currently a static variable, while it > needs to be a per netns variable. > > Fixes: a0840e2e165a ("IPVS: netns, ip_vs_ctl local vars moved to ipvs struct.") > Signed-off-by: Eric Dumazet > Reported-by: syzbot > Cc: Wensong Zhang > Cc: Simon Horman > Cc: Julian Anastasov Thanks Eric, I will apply this to the ipvs tree which feeds into the nf tree.