From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85188C25B0E for ; Wed, 17 Aug 2022 02:31:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D4A6B8D0002; Tue, 16 Aug 2022 22:31:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CF9D78D0001; Tue, 16 Aug 2022 22:31:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B9C078D0002; Tue, 16 Aug 2022 22:31:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id A62EF8D0001 for ; Tue, 16 Aug 2022 22:31:44 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 7CDF8ABCBA for ; Wed, 17 Aug 2022 02:31:44 +0000 (UTC) X-FDA: 79807508928.04.60FD84E Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by imf01.hostedemail.com (Postfix) with ESMTP id 0D329401CB for ; Wed, 17 Aug 2022 02:31:43 +0000 (UTC) Content-Type: text/plain; charset=utf-8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1660703502; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nlTzxQqE79Q9RIB87dn43uL+LcDuOAdW5kHAEE4gy6Y=; b=nxffWsIkVsRMwm8+MLmB1eInSqSCenUn1OL2lHjSZ2nOUF1nvW860KUZQLwxLTWwbj/DqV lZaWwAHxmI+ynG7yXWoI1ehTWxeklbr7T+FFjnrtyCx6hva+YLt/sBInMBR1ch30Hp3V56 uH3eVsEhviSym7raqyBosK2Guc5np70= MIME-Version: 1.0 Subject: Re: [PATCH 2/6] mm/hugetlb: fix WARN_ON(!kobj) in sysfs_create_group() X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20220816130553.31406-3-linmiaohe@huawei.com> Date: Wed, 17 Aug 2022 10:31:07 +0800 Cc: Andrew Morton , mike.kravetz@oracle.com, Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20220816130553.31406-1-linmiaohe@huawei.com> <20220816130553.31406-3-linmiaohe@huawei.com> To: Miaohe Lin X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=nxffWsIk; spf=pass (imf01.hostedemail.com: domain of muchun.song@linux.dev designates 94.23.1.103 as permitted sender) smtp.mailfrom=muchun.song@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660703504; a=rsa-sha256; cv=none; b=unv77VCWaRr8lQ6x8ast7OW0zM4dFu2F93AkOdR2+1Aiy9cHf6Wi7yYJ+BpYwqx3C796+y kDMUEpEB/qycGzWVYqVEiF+K8c715yKDJYyKMu7bPeBuEP7w/4TpQFoGGhOfj/htLvVXWq 2BrzYLtPAQQTt0lKJJ4k0ld40Hz9ZUw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660703504; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=nlTzxQqE79Q9RIB87dn43uL+LcDuOAdW5kHAEE4gy6Y=; b=jYDF+2YJIonskQpvrH4gGD54uiGx+AnQFIM0DPhjZDaBaoO39uHck6gghgpPWs5zSJR3eD HU4iLNf0vZwP+aQeBt6oqMFGWKfvVYfQc0VCjtf/NYy5MnFgtc+HTE5s/0FlQeJ7qEW0su Yi4WYP1uT0gUsUm2Mtj/kFElA94p0L8= Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=nxffWsIk; spf=pass (imf01.hostedemail.com: domain of muchun.song@linux.dev designates 94.23.1.103 as permitted sender) smtp.mailfrom=muchun.song@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Rspam-User: X-Rspamd-Server: rspam12 X-Stat-Signature: uqonzabesrwgjtsi3yjzz7gbg7pb8uob X-Rspamd-Queue-Id: 0D329401CB X-HE-Tag: 1660703503-925991 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > On Aug 16, 2022, at 21:05, Miaohe Lin wrote: >=20 > If sysfs_create_group() fails with hstate_attr_group, hstate_kobjs[hi] > will be set to NULL. Then it will be passed to sysfs_create_group() if > h->demote_order !=3D 0 thus triggering WARN_ON(!kobj) check. Fix this = by > making sure hstate_kobjs[hi] !=3D NULL when calling = sysfs_create_group. >=20 > Signed-off-by: Miaohe Lin It=E2=80=99s better to add a Fixes tag here. Reviewed-by: Muchun Song Thanks.