Message ID | 20231106233408.51159-1-sj@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2991987vqu; Mon, 6 Nov 2023 15:34:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4KNCObBY8/LBFbYz+0Fh5ITL08tYmtnOyfK4Xmex4uaoJQSDlRb/2NxC9iIvJPvO1+Nz3 X-Received: by 2002:a05:6a21:32aa:b0:15f:b5:bfee with SMTP id yt42-20020a056a2132aa00b0015f00b5bfeemr29568555pzb.5.1699313682726; Mon, 06 Nov 2023 15:34:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699313682; cv=none; d=google.com; s=arc-20160816; b=U0I6iAT2O86j5rnbpMwu/IhI4jxz1LDb7qcxkKjAi/ElIyJGfLtX25HN/kPekoNHTX p64qCCIZSiyHnEedbsE1jH9ssTk+arBzgcJhL/QFPjfyap/vr8dXsIpLYBhrvFCKUcB2 Aca4oWMm05MAS4eozW1aKBo7poutaSKRTBSm7p3QittkqyR9idCSIaUeCNYhFC55pfVC e+SQGZWF+BuLgDigkK7yPkBED7m8byD5ZhOcLFy2lduQR7ZBv0YEHtZTz5A4jHKi1ROw 3Kh4tANcsnn6twhvr37EJV62pZBIOQ2Qnf2qyDlcN4yGS3ejP4Y3R1pwGZkhPqYCtaox N2bg== 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 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id x17-20020a170902ec9100b001ca8f6b3b8fsi9633580plg.266.2023.11.06.15.34.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 15:34:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; 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 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id AFEDC802F25F; Mon, 6 Nov 2023 15:34:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233316AbjKFXeN (ORCPT <rfc822;heyuhang3455@gmail.com> + 33 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <linux-kernel@vger.kernel.org>; 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 <sj@kernel.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: SeongJae Park <sj@kernel.org>, 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 agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 06 Nov 2023 15:34:38 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781859544124865285 X-GMAIL-MSGID: 1781859544124865285 |
Series | mm/damon/sysfs: fix unhandled return values | |
Message
SeongJae Park
Nov. 6, 2023, 11:34 p.m. UTC
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
Comments
On Mon, 6 Nov 2023 23:34:05 +0000 SeongJae Park <sj@kernel.org> wrote: > 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. I just checked mm-unstable has just updated, and confirmed these patches can cleanly applied. Thanks, SJ [...]