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 X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEFFDC433C1 for ; Fri, 19 Mar 2021 16:24:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4677D6194A for ; Fri, 19 Mar 2021 16:24:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4677D6194A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C323F8D000B; Fri, 19 Mar 2021 12:24:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C093E6B0088; Fri, 19 Mar 2021 12:24:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AD1EB8D000B; Fri, 19 Mar 2021 12:24:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0020.hostedemail.com [216.40.44.20]) by kanga.kvack.org (Postfix) with ESMTP id 9482E6B0085 for ; Fri, 19 Mar 2021 12:24:15 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 59674180220AB for ; Fri, 19 Mar 2021 16:24:15 +0000 (UTC) X-FDA: 77937146070.25.44DE013 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by imf15.hostedemail.com (Postfix) with ESMTP id 8E3E2A0002BC for ; Fri, 19 Mar 2021 16:24:13 +0000 (UTC) Received: by mail-lf1-f48.google.com with SMTP id w37so10872647lfu.13 for ; Fri, 19 Mar 2021 09:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=aiocf0WxxanLqyRsSiGwW/7Cm4F3BhhRyAtMPi0R2vI=; b=TzaZNCAAXCckxX0tMM0aaFF37YOMh9ipM3hGGzyTS6/K8X/SSQXu+Bk/VebuEH93n1 Tnjx5y69x4EQ0UqkqqUleADJcmpGcCsHW47Q+AXgQ6MGO6zn5REYobBHlYJ55bYZJNus g+siIdV9udUhO6akT178HZUdnyJIZoazUYR+4bT5oINQfn4t+0i+VLjvg9UH/N/4Rbch eSTTuo2x9t/tkuuiOUbXSijKAfkcEN4Hzk9ckkeQiFhj+FhBJ9mlOmbScDX70l9liNOh G1H3W8IFG0AeY2C/JsUvUwlH49YWsNBkeyiuDMGoQwe0k6TOgLGIepEYikU0+sVI7t8E YqGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aiocf0WxxanLqyRsSiGwW/7Cm4F3BhhRyAtMPi0R2vI=; b=cFM0Ju/k+bZDVg4RDcnBkzIi5xxCLSxc5cV1jAQvziHbZMipFH7iFD5neb3ek/UzDS 6nldptHoq5vOxgnAeJHv2ldWCSeGvk5A22wBxFwK6Oxv2t9wWLSV7AbjlhCrcHkuFRR7 AyHAIYpmipwK6WVkpgVB9wi5AP2bHLqqPsLetcVqGfm41EkuOf1kvClLybuHLA4v8UzQ MHEyC/ERvr30dAIE1H5ZPLNE5fSAr5LEqRYtu+JwcNwdOOZK9kdq1agr9UotFd06y7D2 x+vo9x7PTwHi2COOexNbyH4Wme8LKyeOAmv/8HLlqBq+Ks7o7o4ddxOKfH5fUU7bRPZ0 nSaA== X-Gm-Message-State: AOAM532reJaoop1bhcX18Vp5t89YtfZdHg4YzOYUToy0VPBH3RJPAT5u kgr2oIhzA4vCJNx3o1zTS6E= X-Google-Smtp-Source: ABdhPJyg/QM5zj5H1K/MnoEQ2/ZteQPsrgY5N44yLteTttmCFU6BVWLteS2RGoE4OXc0kiOFYakySw== X-Received: by 2002:ac2:4472:: with SMTP id y18mr1246047lfl.332.1616171047070; Fri, 19 Mar 2021 09:24:07 -0700 (PDT) Received: from [192.168.2.145] (109-252-193-52.dynamic.spd-mgts.ru. [109.252.193.52]) by smtp.googlemail.com with ESMTPSA id i3sm828675ljj.82.2021.03.19.09.24.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Mar 2021 09:24:06 -0700 (PDT) Subject: Re: [PATCH v4] mm: cma: support sysfs To: Greg Kroah-Hartman Cc: Minchan Kim , Andrew Morton , linux-mm , LKML , joaodias@google.com, willy@infradead.org, david@redhat.com, surenb@google.com, John Hubbard , Nicolas Chauvet , "linux-tegra@vger.kernel.org" References: <20210309062333.3216138-1-minchan@kernel.org> <33ec18ef-8652-643a-1a53-ff7c3caf4399@gmail.com> <78883205-e6da-5bc4-dcec-b6eb921567b1@gmail.com> From: Dmitry Osipenko Message-ID: <72db59eb-75dc-d1ed-7a83-17052e8f22a8@gmail.com> Date: Fri, 19 Mar 2021 19:24:05 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 8E3E2A0002BC X-Stat-Signature: yo7o3m6d8uc8fpp5768t55r7omecmuct Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf15; identity=mailfrom; envelope-from=""; helo=mail-lf1-f48.google.com; client-ip=209.85.167.48 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616171053-578066 Content-Transfer-Encoding: quoted-printable 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: 19.03.2021 18:50, Greg Kroah-Hartman =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> Then initialization order won't be a problem. > I don't understand the problem here, what is wrong with the patch as-is= ? The cma->stat is NULL at the time when CMA is used on ARM because cma->stat is initialized at the subsys level. This is the problem, apparently. > Also, watch out, if you only make the kobject dynamic, how are you goin= g > to get backwards from the kobject to the values you want to send to > userspace in the show functions? Still there should be a wrapper around the kobj with a back reference to the cma entry. If you're suggesting that I should write a patch, then I may take a look at it later on. Although, I assume that Minchan could just correct this patch and re-push it to -next.