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=-4.3 required=3.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_INVALID,DKIM_SIGNED,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 EF6EAC48BE5 for ; Fri, 11 Jun 2021 18:59:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9AF0F613BC for ; Fri, 11 Jun 2021 18:59:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9AF0F613BC Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0F6786B006C; Fri, 11 Jun 2021 14:59:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A7576B006E; Fri, 11 Jun 2021 14:59:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E898D6B0070; Fri, 11 Jun 2021 14:59:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0092.hostedemail.com [216.40.44.92]) by kanga.kvack.org (Postfix) with ESMTP id B7C326B006C for ; Fri, 11 Jun 2021 14:59:34 -0400 (EDT) Received: from smtpin34.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4527B181AEF32 for ; Fri, 11 Jun 2021 18:59:34 +0000 (UTC) X-FDA: 78242356668.34.2FFB32F Received: from smtp-fw-6002.amazon.com (smtp-fw-6002.amazon.com [52.95.49.90]) by imf17.hostedemail.com (Postfix) with ESMTP id 8510B40002E4 for ; Fri, 11 Jun 2021 18:59:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1623437974; x=1654973974; h=to:cc:references:subject:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=IlXqNN4DCVLdzq7m01pXqxaNCLTpWZMZHvoFH3QaHXc=; b=Xoh54ZEVWECrIZt5wuLvFdbn7DlbHMzQAhEHDcopepS5SuKmF03UDf85 XevOfCf7p45A8AOI1/AFREGVLBuT3CH/Ezjsj2DQLrrvsD21mo95xqfTP JoFw8Z06dom35I2Ac0tUClqexb41EwRbQEb0wnV5tlEPhqWrvlRUTslZ/ c=; X-IronPort-AV: E=Sophos;i="5.83,267,1616457600"; d="scan'208";a="118269492" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-2b-81e76b79.us-west-2.amazon.com) ([10.43.8.2]) by smtp-border-fw-6002.iad6.amazon.com with ESMTP; 11 Jun 2021 18:59:24 +0000 Received: from EX13D31EUA001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-2b-81e76b79.us-west-2.amazon.com (Postfix) with ESMTPS id 56AE0A18A7; Fri, 11 Jun 2021 18:59:21 +0000 (UTC) Received: from EX13MTAUWC001.ant.amazon.com (10.43.162.135) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 11 Jun 2021 18:59:19 +0000 Received: from u898248c994d452.ant.amazon.com (10.85.45.245) by mail-relay.amazon.com (10.43.162.232) with Microsoft SMTP Server (TLS) id 15.0.1497.18 via Frontend Transport; Fri, 11 Jun 2021 18:59:06 +0000 To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <20210520075629.4332-8-sj38.park@gmail.com> Subject: Re: [PATCH v29 07/13] mm/damon: Implement a debugfs-based user space interface From: Message-ID: Date: Fri, 11 Jun 2021 20:59:04 +0200 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: <20210520075629.4332-8-sj38.park@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 8510B40002E4 X-Stat-Signature: 6xbptca9hcysaz51x8ddor9huhpe5mw8 Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=amazon.com header.s=amazon201209 header.b=Xoh54ZEV; dmarc=pass (policy=quarantine) header.from=amazon.com; spf=pass (imf17.hostedemail.com: domain of "prvs=78925abf9=sieberf@amazon.com" designates 52.95.49.90 as permitted sender) smtp.mailfrom="prvs=78925abf9=sieberf@amazon.com" X-HE-Tag: 1623437969-215885 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: + Returns non-empty string on success, negarive error code otherwise. Nit: typo, 'negarive' +=C2=A0=C2=A0=C2=A0 if (ctx->kdamond) { +=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 if (targetid_is_pid(ctx)) +=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 dbgfs_put_pids(= targets, nr_targets); +=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 ret =3D -EBUSY; +=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 goto unlock_out; I don't understand this block, what does EBUSY mean in this context? +=C2=A0=C2=A0=C2=A0 if (sscanf(kbuf, "%s", kbuf) !=3D 1) { +=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 kfree(kbuf); +=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 return -EINVAL; +=C2=A0=C2=A0=C2=A0 } Nit, this diverts from other patterns use elsewhere where error=20 conditions that need to free memory use a goto label.