Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp380949rwb; Thu, 27 Jul 2023 14:23:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlE69uAbU8q5vbi/03YGrATT6netZxTaij11v7tx7EXJgV6iGl2C2IggSOWEdMdzKmv3op50 X-Received: by 2002:a17:90b:f91:b0:268:42da:25e1 with SMTP id ft17-20020a17090b0f9100b0026842da25e1mr4506021pjb.8.1690492998601; Thu, 27 Jul 2023 14:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690492998; cv=none; d=google.com; s=arc-20160816; b=md9VyNNSNF701c+e+2RibN91q5qZoL7Vg1xKCtAVyzE62WDUUk/Ity0xlbDAASOFhz 15Q0xlq2uAyllrKA7/QUqdzUlkMqgGvrkHv08OlkMc6zuiXXmMnIcX4Sn1zuNveCMtbh NwtzFoHWi8UCyENvk1weshrzosAa7htmPQON2Yki8uhHZiUr+tFlIqHLw2qRP6uSdg+7 MphXk0L/wt4cBwUf6L92eyvl9I3hlKOoMyqEFth3I6RGhM7jp3BGYkF5M3U94Wyvm3YD GuEeAiw+jUAxiSWW6T81DMLjBIIVobLlDfyQPwFTkZ8pWE0ELccpe8rW/z/6jjyhBxU0 XH9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=siOA2GY13lGUpTz2EjB0iYplHzP+HpMw9bSpeVetDoY=; fh=ZBeuL0n9gwUa7ggJKe/SK96FkKWYCrnzTXNx/ESmMbc=; b=LOZprU0U3c3OBfPGyGkydkL7nmwHXYFidfxvWL6VI5Q7+mTmPtIEMcg7v7sEZV+/A7 LmNuDRD9OI/xT3mQmZoHX3zgZeT7qoDo6xj6cOcxG4GGZh7Fl6ViKg21PPf5hXMCTqao SYH3I+kYUuIFNkAOEXv9ZP+fju/698Kug77wZk7V8pvROAXfzXj9M0ic70J2bWKKrej4 rapq7vhE1khAq3pWeGM2r/5X8QJdlClm8UPqftyxzWfRSUO8Wz2CZuqp16tMWATlzQQm a8AdF8W3kK/HZmI1cFjXPv/sAUG7AOoxAqm1bG69Zi36Cm/kc43TAUUb3JKNX5tREcz1 fSiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dZyI1Xl5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z18-20020a170903019200b001bba8a9e29dsi1883997plg.100.2023.07.27.14.23.06; Thu, 27 Jul 2023 14:23:18 -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=@kernel.org header.s=k20201202 header.b=dZyI1Xl5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231697AbjG0Unr (ORCPT + 99 others); Thu, 27 Jul 2023 16:43:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229552AbjG0Unp (ORCPT ); Thu, 27 Jul 2023 16:43:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A25E22D5B; Thu, 27 Jul 2023 13:43:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3F54F61F44; Thu, 27 Jul 2023 20:43:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C880AC433C8; Thu, 27 Jul 2023 20:43:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690490623; bh=QlIHP8dhX5OJKYng0fljwWznF8dNsUY8Bn/VfqY1drk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dZyI1Xl51voxYvqt1b7E85tntZQ5XlSa5Ls6CckQJLCdMgznvnKbraiKe8MCHhYVf DrFwWDUwwoZ9KNsfdjh4jNrM/UkjjT4chmd64CdvouO15NN6LgcuRJ+cEgjG/UWkA3 0dKQm1OYI3mxScCV8kGX0g4SvK5S4t0FEUTqhArHzrugieUdAx36AXcoboDy6v364m T2mQ/Ei6DCnpT3TC+a0WyOKPRg+4BTbKs+ejkeSCI0qWD1OP2BSmT1+g3VuIgZJc0g PKNEKGfAxViz2VIsXv60rn6c0AEPlnT7t2Ii7UMCy4PP/SWbPFI+0T4mBTn+Cw77LJ 0WRtMZ0GcA+bw== Date: Thu, 27 Jul 2023 22:43:40 +0200 From: Andi Shyti To: Chengfeng Ye Cc: rjui@broadcom.com, sbranden@broadcom.com, wsa@kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] i2c: bcm-iproc: Fix bcm_iproc_i2c_isr deadlock issue Message-ID: <20230727204340.454cmkli5gotipmb@intel.intel> References: <20230707084941.28964-1-dg573847474@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230707084941.28964-1-dg573847474@gmail.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi Chengfeng, On Fri, Jul 07, 2023 at 08:49:41AM +0000, Chengfeng Ye wrote: > iproc_i2c_rd_reg() and iproc_i2c_wr_reg() are called from both > interrupt context (e.g. bcm_iproc_i2c_isr) and process context > (e.g. bcm_iproc_i2c_suspend). Therefore, interrupts should be > disabled to avoid potential deadlock. To prevent this scenario, > use spin_lock_irqsave(). > > Fixes: 9a1038728037 ("i2c: iproc: add NIC I2C support") > Signed-off-by: Chengfeng Ye Reviewed-by: Andi Shyti Thanks, Andi