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=-2.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 4FC24C48BD6 for ; Thu, 27 Jun 2019 12:03:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E34B208CB for ; Thu, 27 Jun 2019 12:03:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726723AbfF0MDg (ORCPT ); Thu, 27 Jun 2019 08:03:36 -0400 Received: from Chamillionaire.breakpoint.cc ([193.142.43.52]:47454 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726571AbfF0MDf (ORCPT ); Thu, 27 Jun 2019 08:03:35 -0400 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.89) (envelope-from ) id 1hgT7m-0002l1-DI; Thu, 27 Jun 2019 14:03:34 +0200 From: Florian Westphal To: Cc: ranro@mellanox.com, tariqt@mellanox.com Subject: [PATCH net-next 0/2] net: ipv4: fix circular-list infinite loop Date: Thu, 27 Jun 2019 14:03:31 +0200 Message-Id: <20190627120333.12469-1-fw@strlen.de> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Tariq and Ran reported a regression caused by net-next commit 2638eb8b50cf ("net: ipv4: provide __rcu annotation for ifa_list"). This happens when net.ipv4.conf.$dev.promote_secondaries sysctl is enabled -- we can arrange for ifa->next to point at ifa, so next process that tries to walk the list loops forever. Fix this and extend rtnetlink.sh with a small test case for this. Florian Westphal (2): net: ipv4: fix infinite loop on secondary addr promotion selftests: rtnetlink: add small test case with 'promote_secondaries' enabled net/ipv4/devinet.c | 3 ++- tools/testing/selftests/net/rtnetlink.sh | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-)