Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2468331rdf; Mon, 6 Nov 2023 15:34:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IGDEdOATVHPyHF7c5IGbbh8tkvohCwuQmSPiEfgIwG9bR+9yH2cJB9ig/8Ty1UCG4gOGiiI X-Received: by 2002:a17:902:e744:b0:1cc:6cc3:d9fa with SMTP id p4-20020a170902e74400b001cc6cc3d9famr19040882plf.67.1699313673030; Mon, 06 Nov 2023 15:34:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699313673; cv=none; d=google.com; s=arc-20160816; b=SSp9MWvudjk19StnXPLzC/zZElymWahU51ZQhKTK10i+Pi5irtRCbXXP8terKDVFHH NtXZ3i0xywy4sdWR9JalSnAZL0BwDvt4plc5bZ/4uzHcfN6waYrbYJ7W2b1Cixm9saEd aPj6S3hfsEhCZUqVE0apjrAH9HKhjl4OnC0VVIEVMahRMq8G0ZkskwfvA9F7uO3WimyF hoOlC0dKuZcgbW72bsk6DgWwhrmZaTIjnIGZbGuVOWabPzMiZMdp01AV7oQvensKusO9 7U2dONll2GMVmyIh9zy1XM1S5RAFST3T1cJgsaLEJY32k782Qm0YZZoog18dJyjmeas+ bKuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=hy62UH3tZAYGfKSbBwcceqFkcDXmAUKxt7vsyZbaKq0=; fh=BzdeVYqZhG5iuwuKJRNLP969rvCput73lx0iwx2zu7A=; b=RlOsbEcyOBBR1sWsgb+EMDERZ9u0dY1L6jNdDCC4OqVctym/B54bHUJ05jImJsBUZE 1jmunLQdGN6M9zI8Tqg6cNJxC1w3KTliqPRMGtqSAh0N1SCmPzKY10MrlA2Hi0L6eudj VEPXUz4rEgQtjBMgFhMuj6ivpsSEuFhCErg1azCbqpXTQmo9aJwlb1mgrQxuuzvfBUti J45PfIDBcCAgJ9ERsqex8PeP5JHSTVnUl9pQJhy1qW55LNN0KDErNpJrfnx23IH3XQ5a L4JYAIFYXKY6HbeVtM1fHEwf4P5biUgN09PexjbPiAkiZUV1q2wYejrCozMFNPYcOwrM 5h9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Zf599/1W"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id ix18-20020a170902f81200b001c9b172c35fsi8867483plb.40.2023.11.06.15.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 15:34:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Zf599/1W"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 491AA802F685; Mon, 6 Nov 2023 15:34:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233267AbjKFXeN (ORCPT + 99 others); Mon, 6 Nov 2023 18:34:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233080AbjKFXeM (ORCPT ); Mon, 6 Nov 2023 18:34:12 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13E5D83 for ; Mon, 6 Nov 2023 15:34:10 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54337C433C7; Mon, 6 Nov 2023 23:34:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699313649; bh=PbpR9uAMS4z983F6X6mqfiz2aQZYHIrus56jewv3Dm0=; h=From:To:Cc:Subject:Date:From; b=Zf599/1WIA2jNOUN4kR6gOh3lwFhhyDXC4RuryzQnC5JBIIHZIzvtul8AWm0Cj3AP DRTXjtzUf05LqPIg2tLtbNDn5BzCTLwS7WGB8flQ2zX2OBsp6ZNSAIqULowMqed27J CAoHT1Pzg6ONtcJLuS2YPea+Eq/vqqIeh6VIyxxja8Feu0ezVbgdOzCMrXQND5LZAi 0wIqTG5GMQP7N68wqCP3uZlmKxSYyxbWw6k2Ly4LDD7L7AwhLXWDSvSefmSw23Efa7 E8YRMS7WI+nFrqyD4iqio5wDm049e6aoKFO99iOvGpYK1QCT45QIqL0W0i026aHu9C qQ/b2gV0R/fhA== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] mm/damon/sysfs: fix unhandled return values Date: Mon, 6 Nov 2023 23:34:05 +0000 Message-Id: <20231106233408.51159-1-sj@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 06 Nov 2023 15:34:24 -0800 (PST) Some of DAMON sysfs interface code is not handling return values from some functions. As a result, confusing user input handling or NULL-dereference is possible. Check those properly. Please note that these patches are not cleanly applicable on mm-unstable since mm-unstable has dropped the mainline-merged patches and rebased on v6.6, while some DAMON patches that these patches are depend on are merged in the mainline after v6.6. I confirmed these patches can cleanly applied on latest mainline, or mm-stable-2023-11-01-14-33. SeongJae Park (3): mm/damon/sysfs: check error from damon_sysfs_update_target() mm/damon/sysfs-schemes: handle tried regions sysfs directory allocation failure mm/damon/sysfs-schemes: handle tried region directory allocation failure mm/damon/sysfs-schemes.c | 5 +++++ mm/damon/sysfs.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) base-commit: 3496e8e0a1eeabb738105c09e575495fa78914bb -- 2.34.1