Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3923456pxj; Mon, 21 Jun 2021 09:27:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzj+WN+bQOyEATdIKa42QtDBuMFxvgElH9GVYZjie9CGr+kPsoTm2dIAeq68W4HtP++/IV8 X-Received: by 2002:a17:906:1dc5:: with SMTP id v5mr25374072ejh.212.1624292871987; Mon, 21 Jun 2021 09:27:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292871; cv=none; d=google.com; s=arc-20160816; b=EKUSwrYUW88BHKgVhAt942K0W88bC7ecDjWbQUaNlirWTKm1kvInjeaWhsToABvg3s lsbLwB0uwNKu4XlnIJsnqK+vzUbw6o2lZlpo9vAuXe0VcH+PsEIuVnEBtjc1JZ38IsZu RIkCUtX+g0MFnEtU61iBhWiUI4SFZDXWxETQmJyVfuUm/k7EgDuSdSwhCsofLbpEOFl7 /erNCWR+CdTaIY5kh1SUzChGlGmYsqqc7Vh/oPULQs00RDGTCMrYlZzMPHizjd44hADc CXAaOXpjFwrlGzgNtGFNqlZHiq2SRgZMy/LQ6fJVyMnEzLqnWNGkimJ5UpxRaeahu0gF 7hXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SuXMko0GjMF6/rTtT1eskZbx5TIBoK37F4yzhjTpMxE=; b=g46BVSD7vN+9+cI7kfKHvrzNjHdegr5Dy/ezC3X/WdvSEoZNI6+exbgN7KARcdcc42 etR8Fv/Hf3UlEF53qYPlv7Z4qJLYUs0f2QW+QGr4M9ygQ6BcGVOU9lgFJzwQ4W8F8tUF Xpdn6rVVRIkuCfdb6rApCXrz2TgQn/xsvkW/ivjSu1Sy2Xt6h935bRDKt9wurue7W9vT NXXXVmdrOiTpr8gB5/Zb55xEVdISBEEGY52Q5GQhyQ3zt3G+UXUzJ29DgRwKL3v3GWCi FETeluwjD3niGyBYT7eH4x+rbwy2LegYDTzDmrT+7zfZ80fYuy9loXt2DbZcjflKj28V jaAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=g6z3tUgv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si7443016edd.133.2021.06.21.09.27.29; Mon, 21 Jun 2021 09:27:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=g6z3tUgv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231591AbhFUQ2q (ORCPT + 99 others); Mon, 21 Jun 2021 12:28:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:47296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231676AbhFUQ1G (ORCPT ); Mon, 21 Jun 2021 12:27:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B10FD6135F; Mon, 21 Jun 2021 16:22:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292561; bh=dixYyN8BueKQ5fmxxBym+kQQuRVhIMNWZwPCdJ+oPuA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g6z3tUgvCCsgjT/cTyztf8xryuqdduL7AQ5RPT21AtAHTKpeaXLnQHFVf5n6rubNh 8D+gOb4EMoTzUAjdQedh3xmh0sGCi0mugw0asxbF9aNVh2fWevlxNLx6qSf1y/DWv3 hZ3q01Fa713YjuCVt29SdkHDDuzNzIAu9xKy8V+Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tetsuo Handa , syzbot+c0b807de416427ff3dd1@syzkaller.appspotmail.com, Sven Eckelmann , Simon Wunderlich , Sasha Levin Subject: [PATCH 5.10 012/146] batman-adv: Avoid WARN_ON timing related checks Date: Mon, 21 Jun 2021 18:14:02 +0200 Message-Id: <20210621154911.682289245@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sven Eckelmann [ Upstream commit 9f460ae31c4435fd022c443a6029352217a16ac1 ] The soft/batadv interface for a queued OGM can be changed during the time the OGM was queued for transmission and when the OGM is actually transmitted by the worker. But WARN_ON must be used to denote kernel bugs and not to print simple warnings. A warning can simply be printed using pr_warn. Reported-by: Tetsuo Handa Reported-by: syzbot+c0b807de416427ff3dd1@syzkaller.appspotmail.com Fixes: ef0a937f7a14 ("batman-adv: consider outgoing interface in OGM sending") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Sasha Levin --- net/batman-adv/bat_iv_ogm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index 206d0b424712..c0aa54d21c64 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c @@ -410,8 +410,10 @@ static void batadv_iv_ogm_emit(struct batadv_forw_packet *forw_packet) if (WARN_ON(!forw_packet->if_outgoing)) return; - if (WARN_ON(forw_packet->if_outgoing->soft_iface != soft_iface)) + if (forw_packet->if_outgoing->soft_iface != soft_iface) { + pr_warn("%s: soft interface switch for queued OGM\n", __func__); return; + } if (forw_packet->if_incoming->if_status != BATADV_IF_ACTIVE) return; -- 2.30.2