Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp232891rdf; Tue, 21 Nov 2023 00:37:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGnW0Vb570iktekzlIDcJUfDW26e3/hnRTN2g98qd9UUrvT48lyRE3HyXyNIVzSGkVTgsJY X-Received: by 2002:a05:6a20:2585:b0:18a:fbd1:8e6d with SMTP id k5-20020a056a20258500b0018afbd18e6dmr415016pzd.27.1700555820833; Tue, 21 Nov 2023 00:37:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700555820; cv=none; d=google.com; s=arc-20160816; b=0Q0C5PuzFGUNnCZjJlGUXqQ3HllvyZ2Di5peZ/sQJ/BmERqQY3yIzt0uDTkbr3lGVu V3U03WLtTAppvutEfH8NdZWo/DWz8PkOOEEJWhnkJuglcJAGgoWLK51TpTb3w4Ubd6aE O2ccwBSLfF2Xo/EsQDcwhktvk8sllV8o00LYOPxhHAOBkVD/T6tFPnmioQcKDV9F6Ita IZPt41mci224sDiwAsyOflea5MJFH3LzLR3jCSUZF7hx4x5x1WF5CeWMzTXn8KU0CzY4 XHODUmfSiVol1dic92Kwm6O3G0BDcRqogmWX5DfdAWst0JH9HJKxkvlsEp6oCBuIKB7+ /3iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=fYuXZhlm7dF5mNLWGGYMJssRa3OAs+AEtsGL74xZuBM=; fh=64+YlsEIQMahBv/liHGEDgUI1s/7FRIwSYFU324PGLo=; b=T5/K8rLcY6yxMDoqOI3RFyZti22r4GYmmMhcQrI9nHlFglflPQd+vVkzMuy4De2D4z bRNAPAlRBxG7fi4DNdq294nv207WuE9X9r/UGV/ErYksPZr5D8HqENXhE6CmmYBvzlV3 yG88t3l/t+2BtYNMskrnopGFgcV/f+ZdQcbxKUiaGkYenKg7XbOE+NAmW+XKw+vyiDvi 0exlUeTPN/D20h/ZEdhDrQmW9RcK7tBw9RcP66r9Jr5REFjw4xFORgHChiK2wsy/PZ42 jsn3Ub34yEkGP8WJ9kYWbwTrgNUnm5eSbHJvZQGyu2APAw4BS44PCGiy1Ue9onsallPV SEHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cpb9mDKc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id w10-20020a63d74a000000b005b884a11fdcsi9640547pgi.28.2023.11.21.00.37.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 00:37:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cpb9mDKc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 254E280BD762; Tue, 21 Nov 2023 00:36:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229492AbjKUIgs (ORCPT + 99 others); Tue, 21 Nov 2023 03:36:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjKUIgr (ORCPT ); Tue, 21 Nov 2023 03:36:47 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F20FE11A for ; Tue, 21 Nov 2023 00:36:43 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 750A6C433C8; Tue, 21 Nov 2023 08:36:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700555803; bh=7oU59AhZacys6APydlz0Q8zZkl6P3NympOdU5R/Oc3U=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=cpb9mDKcB5aYYed7/kjYr2pzaCQItJgAcs9utMW+k9X7jToQQgP7pHDWeSDu1pvd+ IJFlrlA03ZbHNtnk9BzkOuDIGU3CEAk6xv1M6ASc0KATmaRIl5b+reje3db8mmgN8H TdnWxZvMVeAEwDhTAnZrg+6r3KaFPcLWzEQzqhduG/Tb7u56TW4SCdXb0gOEuqXjR+ JP27xIXD2jLV807at3tVO0bjmPjI4XwFzWHMDmfbYdA0htNmacVaQMnM2Os/gD6PQH 1UKyjaXhtG6C09i7ziufdGN2b38d6MHp9Ncua8TnvY7s/Sxc3VG/NSY9C74E6+lM4t xRPbVUGkWFcLQ== Date: Tue, 21 Nov 2023 09:36:40 +0100 (CET) From: Jiri Kosina To: Charles Yi cc: benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] HID: fix a crash in hid_debug_events_release In-Reply-To: <20231031043239.157943-1-be286@163.com> Message-ID: References: <20231031043239.157943-1-be286@163.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 fry.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 (fry.vger.email [0.0.0.0]); Tue, 21 Nov 2023 00:36:58 -0800 (PST) On Tue, 31 Oct 2023, Charles Yi wrote: > hid_debug_events_release() access released memory by > hid_device_release(). This is fixed by the patch. > > When hid_debug_events_release() was being called, in most case, > hid_device_release() finish already, the memory of list->hdev > freed by hid_device_release(), if list->hdev memory > reallocate by others, and it's modified, zeroed, then > list->hdev->debug_list_lock occasioned crash come out. I have applied the changelog changes proposed by Rahul and applied, thanks. -- Jiri Kosina SUSE Labs