Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp806774pxj; Fri, 11 Jun 2021 12:01:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ+dP/gPA0TwgrySWADZ90C0juw8RnEJWD0lBVWegaWU8i+AQ2IerNFw27xwf/CdRaFQHs X-Received: by 2002:a17:907:20c6:: with SMTP id qq6mr4853146ejb.207.1623438092105; Fri, 11 Jun 2021 12:01:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623438092; cv=none; d=google.com; s=arc-20160816; b=JwO9x8DH+g5ZtGRXZ5MoVfq01hdR9dEuH6ZRs855FoEe7YAdk8P1BKQG1HPLChNtbp P1Un1AMZA1Tms6BAdQdthYCQ9X4mXXbJGhNEfqyFH3PC8dXjursTrZpqUbrto1NkDfxU ELxa6ufcQRQWmIiweqLHQUtv8X7ZV6C9QLq7ItUGVp4MTcjxDNc+wYGjenfqP4t2K/Zz XXWvKnC9ST7Mu+gt3KLpTnFva8hkX6MKfe1I88p13dtmVO69PHQSChaXRUEA1ZIOCK92 FDZRugHms7CFeK3TD4gP+icWFt4h0FN7K/9+vv1DrYX3PT9fuLUKXIeYyT0MOuAXLgZ0 47xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:subject :references:cc:to:dkim-signature; bh=IlXqNN4DCVLdzq7m01pXqxaNCLTpWZMZHvoFH3QaHXc=; b=pMYYb/eaOGZE76k/k5BYfECh261J0AX62DOICr0JIXzOODx/HhDFI8gYh+++4o9zvt qqEM2aIpEgJf6o0AKgcqyTXiFlsWcMALBV2gH0hbcr1qwCrhnhlrhCEJjvNKNoLS+jya W38S+aeEOBzy3q9W6KeuXBCTYLJ3doMxe8dOcmqw9tXfLfPmMcfhfTrwBqPmAsIvjX7r 3YEX0wS8ZWbe94FFw5aoueVRQgxkOKfFtCpieRjW872RFoT9HUveFeOqSrKoc/3LLKm/ LXT8vN5B0DP1emPxa7Prusc1jeOoWYN9QZBdOF9Moe2mvTYznkUFyifLLjPRPeaTpqMq Lbgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=Xoh54ZEV; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b24si5369117edr.577.2021.06.11.12.01.08; Fri, 11 Jun 2021 12:01:32 -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=@amazon.com header.s=amazon201209 header.b=Xoh54ZEV; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231173AbhFKTBd (ORCPT + 99 others); Fri, 11 Jun 2021 15:01:33 -0400 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:19347 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230334AbhFKTBb (ORCPT ); Fri, 11 Jun 2021 15:01:31 -0400 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-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org + Returns non-empty string on success, negarive error code otherwise. Nit: typo, 'negarive' +    if (ctx->kdamond) { +        if (targetid_is_pid(ctx)) +            dbgfs_put_pids(targets, nr_targets); +        ret = -EBUSY; +        goto unlock_out; I don't understand this block, what does EBUSY mean in this context? +    if (sscanf(kbuf, "%s", kbuf) != 1) { +        kfree(kbuf); +        return -EINVAL; +    } Nit, this diverts from other patterns use elsewhere where error conditions that need to free memory use a goto label.