Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp182108imn; Thu, 4 Aug 2022 01:36:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR7vnNoUClBz4GfCfRl2Z2idjOIV+Xtm7IVm9io2aeecsvCXDfS8aKN6fnrGzT2vuVjbv7Nd X-Received: by 2002:a17:906:cc5e:b0:730:cf6d:5451 with SMTP id mm30-20020a170906cc5e00b00730cf6d5451mr602372ejb.725.1659602179868; Thu, 04 Aug 2022 01:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659602179; cv=none; d=google.com; s=arc-20160816; b=O+U28DO738I0M64/B/fxAoWCCFFArtsMnJqbaHoIpqyPfTpr7M2xb8LUXJl4QUccxi E9XL5CSqiFalN+ftmw4nmdPu3YE4+70kYph/5Z3Q/BammJYxTMmGEZOivXbI0ZxUQBvH PUofSzgaoCDRT2dR2Ch+K6ig6Q3FZWYjU/ylpVJOQh1yx8yb8WWnHKkwMAbdcfXp9Hm+ eZwL7JwMzXE0+0yIIKSSNuSILQTRroOFtIofxdMPOGKKkJkIBpWxLs/zojDOrmfw2K8j Xya55ZHD6kJxQSsKxz8uGfpCfD07KKNMCp/U5VqIB520UsK1lHligf2gmSNzOLvpHINE CJrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=dhLsCRYGUtuAwALD1KlxKTdhkhp8QSNYwM9InIv21hY=; b=H5Be9D2T9abH/7heJn4BZZvv1DKRj6lm3L/9O7EZlzCcQMsgaYjHJT3Y9suFZ1EcqE uGnK+z8h/Sbi5fZW46jFQ/7kRls595dSe0sVDHS6AGLcYi+WcSIrMj5eJW9JLm2lPoP5 BTMbSWbW1kPhuPddOQH8rZI9vbOIcLnWPa0UQx/Je2OJs/pdRG2f+W7HZzF3EL8FlxeK Zn+w6mcfXMhUXqYt/TjC+ad6kObHqpTn+VXWXTwcux77NcAF0coZ6JeXUNcFAM/AMTR9 +GqoI/4KNGsFcbiRePAdgWEcGDoF5P+WKpR7LjyQGKj8zug66vD8I1Cw1gQZ2htwh1Wh 66xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ororatech.com header.s=google header.b=vhFbtTOG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y4-20020aa7ccc4000000b0043e853919dfsi625406edt.337.2022.08.04.01.35.50; Thu, 04 Aug 2022 01:36:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ororatech.com header.s=google header.b=vhFbtTOG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237783AbiHDHpX (ORCPT + 99 others); Thu, 4 Aug 2022 03:45:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239211AbiHDHpV (ORCPT ); Thu, 4 Aug 2022 03:45:21 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DAE96156 for ; Thu, 4 Aug 2022 00:45:20 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id h12so21259790ljg.7 for ; Thu, 04 Aug 2022 00:45:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ororatech.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=dhLsCRYGUtuAwALD1KlxKTdhkhp8QSNYwM9InIv21hY=; b=vhFbtTOGOksHyzcro9kH4cZHaorB7nfGcWpikpO7dNKwncnTRw1+ByiMFJe/2elMHX b7OFjEv9TqgTOdb2zsflnf724l7IR7GO9J3muH/4h9jAjKaDV06uAda+3eRlck9Jm8fU N1FdUO8DhuA0L5atc+KdjD8fiwIjd10nsD5xvo8yOopR+hvLU+gT8/ZsGbBGbSPQGPkR kFaHhPAqmEtHB61cFq/nc59DDMptgPmfVJayemcGQqG1wEx9CUFQBwl1NCvkklilW4zn pPID1KoWR/K7YAtLuEiitRb61GcgIiFrb7XQ5x7X9gM+xOVBccR96aiQBOxUOmkOmO+D DqLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=dhLsCRYGUtuAwALD1KlxKTdhkhp8QSNYwM9InIv21hY=; b=zJl2Zq7wLf0dqpqKI+Z7ufyeib2fiCuaklQtjGFtyo2Mf3P2PI9UNvYRxlXLNToCFU YzX341R+riqYVVFwscL6iOEXFyf/0L7TuQAA4lUCKr+A78OFndKdYblnW/rl1UpRrz1t L/Hr/xN7esyaAGCpYK1g2pfnyG4kEmTrIg7B7GjsUZaZs0SyiFqzEwe26H5AiinRLook dhF2UxSqhbN5q1t0ruJNuuypaGX0o6TAF3ExaynhGYjFOzoR2esiYFg7lNv78fKWSKuZ pqOecP1As42JtAtKoz98mOxCuPKb4IOLxMtYKlhwU3o/pYEXBvdV6WWqmjsUYsRWGCXo yfVw== X-Gm-Message-State: ACgBeo3iLf6vIBpEUoiT+tiDmdodu3HJW5Bs2puWtgKXi9fjL9YexL3d cKus63upEUIt5/gl2luMFzwf3mnHPzlshAMF3Z9aLA== X-Received: by 2002:a2e:9e55:0:b0:25d:e795:d852 with SMTP id g21-20020a2e9e55000000b0025de795d852mr191846ljk.367.1659599118481; Thu, 04 Aug 2022 00:45:18 -0700 (PDT) MIME-Version: 1.0 References: <20220803185910.5jpufgziqsslnqtf@pengutronix.de> <20220804064803.63157-1-sebastian.wuerl@ororatech.com> <20220804070603.s3llvccpldtkejln@pengutronix.de> In-Reply-To: <20220804070603.s3llvccpldtkejln@pengutronix.de> From: =?UTF-8?Q?Sebastian_W=C3=BCrl?= Date: Thu, 4 Aug 2022 09:45:07 +0200 Message-ID: Subject: Re: [PATCH] can: mcp251x: Fix race condition on receive interrupt To: Marc Kleine-Budde Cc: Wolfgang Grandegger , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vincent Mailhol , =?UTF-8?Q?Stefan_M=C3=A4tje?= , Andy Shevchenko , Oliver Hartkopp , Sebastian Andrzej Siewior , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Christian Pellegrin , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 4, 2022 at 9:06 AM Marc Kleine-Budde wrote: > > Another optimization idea: Do we need to re-read the eflag1? "eflag" is > for error handling only and you're optimizing the good path. I'd argue if a new message entered mailbox 1, this also potentially changed the error state, so we need to read it. Thanks a lot for your feedback! Will post v3 soon. Also I'm sorry for spam in anyones inbox, I didn't get my mailing program to produce plain-text for the last mail. best, Sebastian