Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1626940pxf; Fri, 19 Mar 2021 11:23:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwTPzJgea8FF8z+id59uJ12RhzwuiVW9YTDg7tlphIs4Y88YR163SGgbSG7uGxzC6LIRzz X-Received: by 2002:a17:906:8308:: with SMTP id j8mr5681297ejx.339.1616178220478; Fri, 19 Mar 2021 11:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616178220; cv=none; d=google.com; s=arc-20160816; b=Xw7raFFGnk0vQeQr6iudChnFS4w6As30RU6YzrNhJqyWamEwr6luXoDBvkeqIYAkfL o2pJfQStni7tjePC3oDfzjwaJb0agO5F1tLkhZGOJ4RYGpXRS9v3jOcM7ZXOgY+7bg0j q8xI9G4/ePLWzkLoieCLnYZwoicip7Vrg3UthV+/zo4RRzLNjeuqOji7h9dirtMyNeD2 SIGwT3KGJCxuNeLQ5FQm2JSXwnrssC2hRL9y9zW3ZZ7FyMboWNxkbhNXjAUP2E8KNHkO N7rlivOlmNKNHLU9Hm3h/8msecEOj+S88f+hL17eKCVqBPl55GlBDkFehPNQwSOYLN59 WhZg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=79uKpKqH8yE9ALQi9JEApAMx1JELp/Qz4rJBRLestg4=; b=Z4wekoh57TTE8ZbYZzyQtsOGOgvLDKgl7z0p1bn0GylFU4f0YUOqGUhdfsQS8IyLyK /gWMxMcBneFYTbRsQ6ruxXZzOaiFeGQDCUON3yFdMjrDRKYksV2kPsUNC4SztuwCRXiI eKsQK+Se+cCSmqBjTYr5mT8XGvUEWp94zy8Lho8I6txVYc4wFzdMBREdRlbPCq93cy/c iK7UHD8icFhvrIw5MeR4iVixdJ5uOPQoYo3hJmaSf5xH9BPU/efA05aTyiaKolBqLLfy 9Ko0LQFvpDUDe1MLnL67hRpnySHYC/nY95/39mGnJTlCdwNK3Zh8vtI3TORoNQevdBWA AAsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Z5GSLVHR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do3si5106602ejc.486.2021.03.19.11.23.17; Fri, 19 Mar 2021 11:23:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Z5GSLVHR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230286AbhCSSVs (ORCPT + 99 others); Fri, 19 Mar 2021 14:21:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230063AbhCSSV2 (ORCPT ); Fri, 19 Mar 2021 14:21:28 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA1D8C06174A; Fri, 19 Mar 2021 11:21:27 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id ga23-20020a17090b0397b02900c0b81bbcd4so7154524pjb.0; Fri, 19 Mar 2021 11:21:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=79uKpKqH8yE9ALQi9JEApAMx1JELp/Qz4rJBRLestg4=; b=Z5GSLVHRbgWOht2H1kUZASS6SP7XLmmP6NuxjMuW4qXbGRfWfPsIoY7i6DbauIRt3c E4wZQXLU779XR0oFRrf+AsYi1nDnmunNpnZLomSwWjE4YVNc3n0CoBjoLjE6sKONoy5k 5qRc+XhskLKkawGHgHqqsl8NaUPxwmu+BZMHUAvimDFE8vwPI1sHhojlf1BXmQwgY90H Nv6FUgzcxe5nyJTEY0PfnI+UNbTFALUv8AHEvOhUJqegkvbpsyUbyEEgeHzvqlY3G3KR 5n0xiUehiowiSn3W8cMDr963yjq/S4M+5+iIwcF+1EbNHtE753nzIJHgXAG4WA1rvtHd +aHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=79uKpKqH8yE9ALQi9JEApAMx1JELp/Qz4rJBRLestg4=; b=sjKNQlS5nkYT67WmssqwGrIURnk3xVZ/GPu6KZ3AQoB/q/3jros94SDs7CM1esjo/r MDKtFOU7urvxPD+W8ERR9pNUkOC/TmdH3hJO2zwAaBWo1+06UHbeJbdLeqjE02xZjPBy ye2Yj4OihTcODRFEY18zjEL7sVlguwlrQE6I7Ws4neb6pOdK/45+kbCWGC89nvIu1bUj 03rvXswzONFiBdM5crG3VsV2TH7N/eRfBhfw30koUG+KBVNdmXFKHhv3RIGLqnvn6O4v AgmCRUD1CaY0aaK2hzL+X4y8eH48LbXO6XzZ5uIICC0Fk1jb+RfW9GiT2t/HXbceis4/ sfSw== X-Gm-Message-State: AOAM532fOjFqeIdranMB9pKSSavPzWblg5sEsiAa3Z5+ZgUDespopw5m lbr2nKMbei4og2dUoboIq/g= X-Received: by 2002:a17:902:d201:b029:e6:bba:52b3 with SMTP id t1-20020a170902d201b02900e60bba52b3mr15882020ply.51.1616178087504; Fri, 19 Mar 2021 11:21:27 -0700 (PDT) Received: from google.com ([2620:15c:211:201:2033:9813:e1ed:7060]) by smtp.gmail.com with ESMTPSA id q34sm5564426pgl.92.2021.03.19.11.21.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 11:21:26 -0700 (PDT) Sender: Minchan Kim Date: Fri, 19 Mar 2021 11:21:24 -0700 From: Minchan Kim To: Dmitry Osipenko Cc: Greg Kroah-Hartman , 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" Subject: Re: [PATCH v4] mm: cma: support sysfs Message-ID: References: <33ec18ef-8652-643a-1a53-ff7c3caf4399@gmail.com> <78883205-e6da-5bc4-dcec-b6eb921567b1@gmail.com> <72db59eb-75dc-d1ed-7a83-17052e8f22a8@gmail.com> <071c6681-f492-2c94-5686-30c30778f39d@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <071c6681-f492-2c94-5686-30c30778f39d@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 19, 2021 at 08:56:06PM +0300, Dmitry Osipenko wrote: > 19.03.2021 19:30, Minchan Kim пишет: > > +static void cma_kobj_release(struct kobject *kobj) > > +{ > > + struct cma_kobject *cma_kobj = container_of(kobj, struct cma_kobject, kobj); > > + > > + kfree(cma_kobj); > > +} > > Oh, wait.. I think this kfree wrong since cma_kobj belongs to the array. Oh, good spot. Let me use kzalloc.