From mboxrd@z Thu Jan 1 00:00:00 1970 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=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED 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 534E4C282C8 for ; Mon, 28 Jan 2019 07:17:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 17D6A20882 for ; Mon, 28 Jan 2019 07:17:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726865AbfA1HRX (ORCPT ); Mon, 28 Jan 2019 02:17:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37782 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726627AbfA1HRW (ORCPT ); Mon, 28 Jan 2019 02:17:22 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B79DDC0587CA; Mon, 28 Jan 2019 07:17:22 +0000 (UTC) Received: from localhost (ovpn-112-14.rdu2.redhat.com [10.10.112.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 322002B9CF; Mon, 28 Jan 2019 07:17:20 +0000 (UTC) Date: Sun, 27 Jan 2019 23:17:19 -0800 (PST) Message-Id: <20190127.231719.285504281465860129.davem@redhat.com> To: nird@mellanox.com Cc: netdev@vger.kernel.org, nikolay@cumulusnetworks.com, mlxsw@mellanox.com Subject: Re: [PATCH net] ip6mr: Fix notifiers call on mroute_clean_tables() From: David Miller In-Reply-To: <20190127072622.24835-1-nird@mellanox.com> References: <20190127072622.24835-1-nird@mellanox.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 28 Jan 2019 07:17:22 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Nir Dotan Date: Sun, 27 Jan 2019 09:26:22 +0200 > When the MC route socket is closed, mroute_clean_tables() is called to > cleanup existing routes. Mistakenly notifiers call was put on the cleanup > of the unresolved MC route entries cache. > In a case where the MC socket closes before an unresolved route expires, > the notifier call leads to a crash, caused by the driver trying to > increment a non initialized refcount_t object [1] and then when handling > is done, to decrement it [2]. This was detected by a test recently added in > commit 6d4efada3b82 ("selftests: forwarding: Add multicast routing test"). > > Fix that by putting notifiers call on the resolved entries traversal, > instead of on the unresolved entries traversal. ... > Fixes: 088aa3eec2ce ("ip6mr: Support fib notifications") > Signed-off-by: Nir Dotan > Reviewed-by: Ido Schimmel Applied and queued up for -stable, thanks.