Received: by 10.223.176.5 with SMTP id f5csp498462wra; Wed, 7 Feb 2018 02:51:38 -0800 (PST) X-Google-Smtp-Source: AH8x226Lj9wmEcB6r9mDaNcxAy2BGJGvT4C1t2THPXfJpfkGlAa0w8D6eacCax5s/Rx1FzUevhLK X-Received: by 2002:a17:902:b20b:: with SMTP id t11-v6mr5608872plr.348.1518000698184; Wed, 07 Feb 2018 02:51:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518000698; cv=none; d=google.com; s=arc-20160816; b=mBaSj2onEv6o2V6AWb0p33AmLt70btsY7oiAEQCRxqmX/gvZM5AjzuGKV0j6F0zFw9 kDLFAaku9atRTBc6bninytGvI663bzJ+YbPjG8PQ6+ln3zvbXfggeQQOXeSyInQaQcrz og/brs+T8RgD3a7luzi2fiSMA4M50A6Qqzj7B9MoYXKa5lsqrZ+oc90wJ0MQ3kGG0+Hy n0MEZ6AC17lGP26Ak1rnQmEh7o0QxReWze8hhzdF/xO7G1HqYlM4yLpb0eSP0/wXslnu 6HJ3Q1NsoWXSYHbI5RCjDxQlgkM4Obt5tnWst8hxx0IZDaDOEyQXzuT6dp3uAIKK6V8P 4O9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=d8oNAsLI4/k0VluFEi6BAAobRJS9kjnEnqKI+ew2WIo=; b=PnXrwJlcOpz08ztuJF3e4l5CLvrSWxONPjuOAj7ju4uHbmRni1ywDU6s5Zx4aWcMCX tCl1kt+29XOKtvBBASq8Pq2e0rpuJbV45HYjEEbRUXY5/TxuFFwcJ12btzNJFV/fel44 lAgeH2TmFJsg27WhOEUGi6G/VPBdwk99OW83rtphCnV4MeOwTyOhVszvRI3einVsz5kn tQq3H1VQJP3DoIFrSPZa/wQXy7qfk/IM6h/ZklLnohNxdYznmsv+GPLWu8ZTAmeJ3dwD oz9IGBzzsinZAQp2yc4Ev9bNawkyFp5hSAg3ChrFSSxGVgdMCM4dmmDgYgcGJAJx7pLz GQQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=I6KxXB00; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z17-v6si895484plo.794.2018.02.07.02.51.23; Wed, 07 Feb 2018 02:51:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=I6KxXB00; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753733AbeBGKum (ORCPT + 99 others); Wed, 7 Feb 2018 05:50:42 -0500 Received: from mail-pl0-f42.google.com ([209.85.160.42]:37293 "EHLO mail-pl0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753610AbeBGKuj (ORCPT ); Wed, 7 Feb 2018 05:50:39 -0500 Received: by mail-pl0-f42.google.com with SMTP id ay8so229054plb.4 for ; Wed, 07 Feb 2018 02:50:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=d8oNAsLI4/k0VluFEi6BAAobRJS9kjnEnqKI+ew2WIo=; b=I6KxXB00cSNlyVMqm9BG1RQSdKKiDCJCmPupo7u+HlU5zxD5PMLSqFYA5owkWDSYIP 9PDw47qiv3C5Mz8Es2U97dZQeBrSlAOaLDXSLSa+dI8vg/6+OcJ32D6ZRz9/WW7n/fvi WkJLgzLgeAHXosrfvRaFGMh7y4abcG4515Ffs2FRi+K3Rr+X2bYLcTBYcgwnkoXwrDKg xqj2K4pvOqxXOqFt17Eo8oEjXwFIaUQwOOMOh1pngEiNOH1HlVxpQzR35XPQ1p7WTnCb x8xW929OaBMIIeC19rZXblLfTW+hQH1DaBizPBMltYKI4xdCg9L3wa42mJAmpH1g5u3H RDXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=d8oNAsLI4/k0VluFEi6BAAobRJS9kjnEnqKI+ew2WIo=; b=EjZvoueFHCsxPMc+2BvNkRbJFHpuZI3Gf7yyTB5g0mXOUeTU+MbqQNsg3BdcC1C+w4 tJ/23nRKencTeJ7mRc7T9KmEqM0yp4Xg0Se+p9x57W1fPmgGVK/u4g3qOjshmajpoWPo O8fx4624irU1F8kC/yjDQQWirszcFxIlMgPr3KdqRuLec12fqf4DFsFQvbMsTl0kmdHq RIZIBri0cmtqPiO6IjXi/Z0QqXp4fxxVlYsn+ynpecjshg83P0ZCbNdmv1Zask860ZXN m1co46zz7SZyMy1fA9XZujw/5WwYZEcN+neXQfx3/yIPdaNzXvABTt5EB0aIOhjMSwAW B/+w== X-Gm-Message-State: APf1xPD+0NB4S0Hi+pK5kf6R5XlFvVsaRy1+eDjlzyzTCKSJN9d3ntA7 O25c6stFhCXnhseJhOfoqGIWumnIWAlcZ1Ihaj41AQ== X-Received: by 2002:a17:902:6c44:: with SMTP id h4-v6mr5685674pln.373.1518000638893; Wed, 07 Feb 2018 02:50:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.236.140.151 with HTTP; Wed, 7 Feb 2018 02:50:18 -0800 (PST) In-Reply-To: <001a114372a68e749405649cf352@google.com> References: <945c8517a87c671825b61223088064ea2ad0a8cb.1517999262.git.pabeni@redhat.com> <001a114372a68e749405649cf352@google.com> From: Dmitry Vyukov Date: Wed, 7 Feb 2018 11:50:18 +0100 Message-ID: Subject: Re: WARNING: proc registration bug in clusterip_tg_check To: syzbot Cc: Paolo Abeni , coreteam@netfilter.org, David Miller , Florian Westphal , Jozsef Kadlecsik , Alexey Kuznetsov , LKML , netdev , netfilter-devel@vger.kernel.org, Pablo Neira Ayuso , syzkaller-bugs@googlegroups.com, Cong Wang , Hideaki YOSHIFUJI Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org You dropped syzbot from CC ;) Add syzbot+03218bcdba6aa76441a3@syzkaller.appspotmail.com to To or CC. On Wed, Feb 7, 2018 at 11:42 AM, syzbot wrote: >> #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git >> master > > > Can't find the corresponding bug. > > > >> I can't reproduce the issue locally, so asking the syzbot to test the >> tentive fix for me (and hoping I did not mess with the tag/format) > > >> --- >> net/ipv4/netfilter/ipt_CLUSTERIP.c | 30 +++++++++++++++--------------- >> 1 file changed, 15 insertions(+), 15 deletions(-) > > >> diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c >> b/net/ipv4/netfilter/ipt_CLUSTERIP.c >> index 3a84a60f6b39..db103cd971a9 100644 >> --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c >> +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c >> @@ -230,17 +230,6 @@ clusterip_config_init(struct net *net, const struct >> ipt_clusterip_tgt_info *i, >> refcount_set(&c->refcount, 1); >> refcount_set(&c->entries, 1); > > >> - spin_lock_bh(&cn->lock); >> - if (__clusterip_config_find(net, ip)) { >> - spin_unlock_bh(&cn->lock); >> - kfree(c); >> - >> - return ERR_PTR(-EBUSY); >> - } >> - >> - list_add_rcu(&c->list, &cn->configs); >> - spin_unlock_bh(&cn->lock); >> - >> #ifdef CONFIG_PROC_FS >> { >> char buffer[16]; >> @@ -257,20 +246,31 @@ clusterip_config_init(struct net *net, const struct >> ipt_clusterip_tgt_info *i, >> } >> #endif > > >> + spin_lock_bh(&cn->lock); >> + if (__clusterip_config_find(net, ip)) { >> + spin_unlock_bh(&cn->lock); >> + err = -EBUSY; >> + goto err_remove_pte: >> + } >> + >> + list_add_rcu(&c->list, &cn->configs); >> + spin_unlock_bh(&cn->lock); >> + >> c->notifier.notifier_call = clusterip_netdev_event; >> err = register_netdevice_notifier(&c->notifier); >> if (!err) >> return c; > > >> + spin_lock_bh(&cn->lock); >> + list_del_rcu(&c->list); >> + spin_unlock_bh(&cn->lock); >> + >> +err_remove_pte: >> #ifdef CONFIG_PROC_FS >> proc_remove(c->pde); >> err: >> #endif >> - spin_lock_bh(&cn->lock); >> - list_del_rcu(&c->list); >> - spin_unlock_bh(&cn->lock); >> kfree(c); >> - >> return ERR_PTR(err); >> } > > >> -- >> 2.14.3 > > >> -- >> You received this message because you are subscribed to the Google Groups >> "syzkaller-bugs" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to syzkaller-bugs+unsubscribe@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/syzkaller-bugs/945c8517a87c671825b61223088064ea2ad0a8cb.1517999262.git.pabeni%40redhat.com. >> For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "syzkaller-bugs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to syzkaller-bugs+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/syzkaller-bugs/001a114372a68e749405649cf352%40google.com. > > For more options, visit https://groups.google.com/d/optout.