Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp811331rdf; Fri, 3 Nov 2023 16:42:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERapRfxTXsOscJ9OAEZY0M2kxH741Qh1GD1H9O+FyOJD7Qh146+5AA7Iox5rTnsfOc4Qr6 X-Received: by 2002:a05:6e02:2167:b0:359:680f:b2cf with SMTP id s7-20020a056e02216700b00359680fb2cfmr3314612ilv.15.1699054936273; Fri, 03 Nov 2023 16:42:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699054936; cv=none; d=google.com; s=arc-20160816; b=cxk0skZMqtJQ/vyKGoCwj8L06H7qHfxW9tkk7dddk+f75g7Y4YiUXu5/wL88gnp0aP LIH58sj8kZU1i4uzkkmsJjtdSAvGuj1Qme58/CGBWd0BcKCwmFT8SZXPKghUAEmmzegV kLl6fAqmLoDvyhd5FQTTqC5bPc2R0Hl1TGTWaAMrlZvQXkmXxix2nMftRxZ2uPitL23R /bdAQSfpZ/rskxzMM0SWPQB73mY7ETh4J/R3l+2giv5GpoEpMEeHyRS+gSclM9yZ9rEm YutILQimqDtbGFhp8TzmCS9VTkJNOLDBQDrDILFjcpfFwKoEVpY3oKKHdFzE+oh+TB2P DMCQ== 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=01UalbeeXeLylUyRzF/vSpZA0gSYvuxFA9cB6+h3P1Q=; fh=01GqzDePSq1rYprGd4dxYYUgV++4mrVSMMCyZYEp2nI=; b=sheSvXWkY4sU/JQg5jbb2/1Z9caR2RuAw5BLmTE8PppW472F6CG/C8dTjXwh4kM1nS +/3etMwMnMAu/mR478yTChmPAEQ/TdcP5c4v2XNFeRQByPf9UfK3LiQNq4qmjIDzCNdH r8mM1pS+brBte8jBznPlkkb6eWT0mmCdY9IbAJsbsqJ9bYphGNUERAgmlextkCnM5py+ wSFCWxMqVLG5N9my2GAweeYMsZ1ZMxm5cd3BBdItdAMqV+ZHEZPCmuwZzFKv+I/OqNBp 24hGYN3pnC9xxs+iOJe/KiIuthQvIAT5Sp6nMmeVjdRHvgEd6ymEcIx3dy47w2Udb4Jo Y4+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=l7vr27CX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id 78-20020a630151000000b005895c80c902si2390186pgb.438.2023.11.03.16.42.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 16:42:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=l7vr27CX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 00DE581489CE; Fri, 3 Nov 2023 16:42:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229557AbjKCXmB (ORCPT + 99 others); Fri, 3 Nov 2023 19:42:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231665AbjKCXl6 (ORCPT ); Fri, 3 Nov 2023 19:41:58 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C30F1D48 for ; Fri, 3 Nov 2023 16:41:49 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id C586240002; Fri, 3 Nov 2023 23:41:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1699054908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=01UalbeeXeLylUyRzF/vSpZA0gSYvuxFA9cB6+h3P1Q=; b=l7vr27CXDc41xs4jbHLNnd0VYqkRE7A5NvcwQnO7NZjSQL/5wzEIKxItB345z97S+G6gfM FHyVvTMaPVFcBoNmuWxZRCtzwWhoinbvoSLoy1ZHYOMG73D4sRSkGsbSkAd5Tj5zqhLnpH 6yj9GT1i9A2yOCqNw1TbFWIpZ9SoNb+13KBmx78zI4tgm68dHzOABq3ZoKwax1ZR/uDxPA I00zWwShBj5+WAYLxSSSt+LLItXNFFv2i0vhqH94EN8TxWIuGOQqb3RflwY0UwEEP+/mjh Oe2CoBFzcRUMnyVu14VoBRfE5Dy8v2GnkakgOCQeKE5I7ACkgawj0aFCCOXWrg== Date: Sat, 4 Nov 2023 00:41:47 +0100 From: Alexandre Belloni To: linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, Billy Tsai Cc: BMC-SW@aspeedtech.com Subject: Re: [PATCH v1] i3c/master/mipi-i3c-hci: Fix a kernel panic for accessing DAT_data. Message-ID: <169905489155.439104.1007504050351939428.b4-ty@bootlin.com> References: <20231023080237.560936-1-billy_tsai@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231023080237.560936-1-billy_tsai@aspeedtech.com> X-GND-Sasl: alexandre.belloni@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 03 Nov 2023 16:42:14 -0700 (PDT) On Mon, 23 Oct 2023 16:02:37 +0800, Billy Tsai wrote: > The `i3c_master_bus_init` function may attach the I2C devices before the > I3C bus initialization. In this flow, the DAT `alloc_entry`` will be used > before the DAT `init`. Additionally, if the `i3c_master_bus_init` fails, > the DAT `cleanup` will execute before the device is detached, which will > execue DAT `free_entry` function. The above scenario can cause the driver > to use DAT_data when it is NULL. > > [...] Applied, thanks! [1/1] i3c/master/mipi-i3c-hci: Fix a kernel panic for accessing DAT_data. commit: b53e9758a31c683fc8615df930262192ed5f034b Best regards, -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com