From patchwork Thu Jul 11 22:04:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13731116 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2497BC3DA4A for ; Thu, 11 Jul 2024 22:05:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 78CF76B0085; Thu, 11 Jul 2024 18:05:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 73D506B008A; Thu, 11 Jul 2024 18:05:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6042E6B0098; Thu, 11 Jul 2024 18:05:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 420966B0085 for ; Thu, 11 Jul 2024 18:05:04 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id E2D12160706 for ; Thu, 11 Jul 2024 22:05:03 +0000 (UTC) X-FDA: 82328852886.04.9E0EEE9 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf07.hostedemail.com (Postfix) with ESMTP id 2F47740009 for ; Thu, 11 Jul 2024 22:05:02 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=eW8bgOM8; spf=pass (imf07.hostedemail.com: domain of 3DVeQZgYKCDgmolYhVaiiafY.Wigfchor-ggepUWe.ila@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3DVeQZgYKCDgmolYhVaiiafY.Wigfchor-ggepUWe.ila@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720735457; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=GmNVGQhxfF+dmL8G2Kdb1Uh26WeDRaL20f0RWOUcIns=; b=IB3k9kr0Znp7LyJ3NzEnnfoTBScG4sPjX3IFAu9iNUxZZeC7BHEIpwe2ZtXV9ti6OOx+5v AJE017rFYW4BaUVRLqtqcxLa/+8eQ/nN55aOIEAVBwhZuHKDRQs/7ZMghn/CVDAPGP5iFr cBVaCvQwp7co7O/HFmo9Q7uO0E/bfCQ= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=eW8bgOM8; spf=pass (imf07.hostedemail.com: domain of 3DVeQZgYKCDgmolYhVaiiafY.Wigfchor-ggepUWe.ila@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3DVeQZgYKCDgmolYhVaiiafY.Wigfchor-ggepUWe.ila@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720735457; a=rsa-sha256; cv=none; b=oyi2vECWr9lBnMYFjyL7ci+LlOJm0TQ0Io4FQwoRZxd2AZkcQH/fyMOs/s1xbvy0dkqncE VEfmUVt58eU6Fv+ICW79qkzjZcvCBCgMnfNEqtFFSMqwMf408WWnTCljvt5/RZVh0sM4Xq vryOEvlUgHMDNDpd/jHJlbAt7wnz0ok= Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e0335450936so2546176276.1 for ; Thu, 11 Jul 2024 15:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1720735501; x=1721340301; darn=kvack.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=GmNVGQhxfF+dmL8G2Kdb1Uh26WeDRaL20f0RWOUcIns=; b=eW8bgOM8EeVMyBnN6gZke7N9lNlV1b9wm3YLvzqfd9hd9p2HKkVymnzzDfNyG3/sGB oWA+2DLk1pVNz/4SeG6Qrr+yY59SLNpLeJFPja1SXsAc5oEglhmI9W/Qexit0gzuh9Op AaILNCDUiZmasTjzZbzaEClfB7i+dKE4NqAzKymEMd+S7NnwYnwp2LJnN2GbLWHbPpbE VB+e9b0YCfkYziQ/GoBOQ+SWTNxkMDmfR350JBsXp8fdOtioJp7dCW1njD1fjoE1Sn3o oMCmrQJ6uVj24BAUoi2z67SIJDSHWsx2wyS542em+pFvPI615W/yjgFW0AuVODJTm8XQ ePFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720735501; x=1721340301; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=GmNVGQhxfF+dmL8G2Kdb1Uh26WeDRaL20f0RWOUcIns=; b=B9AmgLBONj5DbSuYvPI70JEUVEPxWgWLt3x5fT9bMay292r9fgG5ATxTfU+kv4cIap O41E7U7holehYhKRNOgeVxOo41LUVOOy8NgZdmyL08uQHzK6QZWAH5pXRCZ2ZTImzxkL AW3Tg50lqY5FWYyXHrjOLyHzR2KPrKLmBuo7i+lSyeHZB3Y1O33Z7tyvgap7VRGDGBJb 2xhIeGOigAojlRGyBZII6+Dqc+DNwr4SCoJtqqHgFrmIh9Cr00TCYZVuZswHhduPkuQk LpYahB6bs8Vavz5dX6Q6D1esiHnNC4Chawg+/5b1W5yhFUT9FNqodgGNYuTLS79lve3b ktBw== X-Forwarded-Encrypted: i=1; AJvYcCVgP0nCeDaZ8z6W8+QrRwluq0JRiCKb9hmxjQab/6lg9K2Vj+ZylziV0NalgIFkFbdz7/6BCUpwEjEgyxfhKSTA2To= X-Gm-Message-State: AOJu0YzJ9q+sYsj2nRGIcNDnEPlLJaUKXRyN53qd5oCPNYD8bzf86O7h ZYJ2cWGu4JD+Yrcd/aaOxmMfK8QgDaAeYbkoQwU1OU2T2dqif9yD6p8vjYwD1YDJ80SmxJrvPyX xzA== X-Google-Smtp-Source: AGHT+IFeorrBi9jfJXX70RSirbeZ3WCfrHwYAEA3ofVUx+qVZL0mHI2sTcB+Ym/6U8kb0iPO1/hJZdh8n04= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:3f97:69c0:dd80:bd4a]) (user=surenb job=sendgmr) by 2002:a05:6902:72b:b0:e02:b093:dc1f with SMTP id 3f1490d57ef6-e041b034472mr20616276.1.1720735501238; Thu, 11 Jul 2024 15:05:01 -0700 (PDT) Date: Thu, 11 Jul 2024 15:04:55 -0700 Mime-Version: 1.0 X-Mailer: git-send-email 2.45.2.993.g49e7a77208-goog Message-ID: <20240711220457.1751071-1-surenb@google.com> Subject: [PATCH 1/3] lib: add missing newline character in the warning message From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, vbabka@suse.cz, pasha.tatashin@soleen.com, souravpanda@google.com, keescook@chromium.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, surenb@google.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 2F47740009 X-Stat-Signature: 7aa6i5buj6uwbm9w3jrh38c13yy94jqt X-Rspam-User: X-HE-Tag: 1720735502-657070 X-HE-Meta: U2FsdGVkX191B6kI/kWiiylkshLSf4kJ/F5sQ4Y7JkCKE7PvnBzJ9HlhYBzjOvfd6fSLqv6jGBjoAa5pnkRo4jIR8hR2bS/vPQZzGzuEl/f6SmhLSHU7Cihbh51X9E9gzna0yywkmvAPPe04TZzOxoxsL6aMAlVNIO1ZlOpjI1R6KHI2nbf44sDLUR2dWirqcW9G3E4pcA0Mgf+gjau21h+x1QbRlTKSwfqXMDANwgcipCTY8TAbSirakGes9h0iu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zd34S7qIf3iZySKUB8kY3eTgtMeWP3wQrKHE5u5vue5JcM0LcHluI/sZU0hFys7dnCF1lcew9AbpUGUNyqnM2P5YJz2MiYPPU12zQtGQL1QMPqdLRCL2DT4B3gaaMgA2iCtfbII6FtakIxcQjFplLzQS/WZrLlbtrCxojRzGUvNDHDFk= X-Bogosity: Ham, tests=bogofilter, spamicity=0.017277, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Fixes: 22d407b164ff ("lib: add allocation tagging support for memory allocation profiling") Signed-off-by: Suren Baghdasaryan --- include/linux/alloc_tag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 8a18fda0febb7790de20ec1c3b4522ce026be1c6 diff --git a/include/linux/alloc_tag.h b/include/linux/alloc_tag.h index abd24016a900..8c61ccd161ba 100644 --- a/include/linux/alloc_tag.h +++ b/include/linux/alloc_tag.h @@ -122,7 +122,7 @@ static inline void alloc_tag_add_check(union codetag_ref *ref, struct alloc_tag "alloc_tag was not cleared (got tag for %s:%u)\n", ref->ct->filename, ref->ct->lineno); - WARN_ONCE(!tag, "current->alloc_tag not set"); + WARN_ONCE(!tag, "current->alloc_tag not set\n"); } static inline void alloc_tag_sub_check(union codetag_ref *ref) From patchwork Thu Jul 11 22:04:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13731117 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A3B4C3DA45 for ; Thu, 11 Jul 2024 22:05:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A25156B008A; Thu, 11 Jul 2024 18:05:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9D5426B0098; Thu, 11 Jul 2024 18:05:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 828236B0099; Thu, 11 Jul 2024 18:05:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 638206B008A for ; Thu, 11 Jul 2024 18:05:06 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id C42BAA0872 for ; Thu, 11 Jul 2024 22:05:05 +0000 (UTC) X-FDA: 82328852970.17.FAC929A Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf12.hostedemail.com (Postfix) with ESMTP id F004F40008 for ; Thu, 11 Jul 2024 22:05:03 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=fAJXsHSt; spf=pass (imf12.hostedemail.com: domain of 3DleQZgYKCDknpmZiWbjjbgZ.Xjhgdips-hhfqVXf.jmb@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3DleQZgYKCDknpmZiWbjjbgZ.Xjhgdips-hhfqVXf.jmb@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720735488; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=93kJQnyc8fg8K6y0X8F3xN7SC1oO5b0Dd7FB+lYPuNQ=; b=YW/MSHTzH8g135S43cbFCINkbr0Tv7XljSSd0CKdhs52D+aSBkT3DlNMCpvg43bsbjoMSa 2DZrxakR3zOFfOYL0QXi6DpeuPZabwgtRTcHvANnyUtaK7w2J86NshWJoPnuqOwJxJ3RKi zkmK3Gj0tEacaKrJedRI7EdNyLxlsdc= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=fAJXsHSt; spf=pass (imf12.hostedemail.com: domain of 3DleQZgYKCDknpmZiWbjjbgZ.Xjhgdips-hhfqVXf.jmb@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3DleQZgYKCDknpmZiWbjjbgZ.Xjhgdips-hhfqVXf.jmb@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720735488; a=rsa-sha256; cv=none; b=jVURoB0fAC/5JO90JxBaAdYhb3YlQLWBudmUvCccTd1yVzHbCd+eMSlk6PMOuXM9zMjvmR 7/ofZLHBTllOGKolFj3Qm6ykDJzISsRzU6vYj+yELiLlN1QUCrC7JV/lIcStBfvR6AisAh Gsk2qmaHPZMbrBT0lbpAIYGtILn4Jro= Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e03a544b9c8so2180761276.2 for ; Thu, 11 Jul 2024 15:05:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1720735503; x=1721340303; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=93kJQnyc8fg8K6y0X8F3xN7SC1oO5b0Dd7FB+lYPuNQ=; b=fAJXsHStABBeWxaQenPFSc8jqsknv4OdQR+F0xfOD3yvr/aD18rnhxwcLdFJArzFS2 uYjDUoEWoY3wveOglMw1L5nv8hUdKiG0PZfi/W0C/Tjhdx7Krw7eeGLyM/6+5r2DeqEF SE2rzd+KdX0/OyGXKAw/KZ6XbmJe18Yv0/rgz8FeE6L3NjRxMI+3MDcVTq7mEYKle9/V xSGcyvErwoKe4laTO2qh85w0VkFVgwJ4n3Jq6hA7vwxysZNtnSYZMd34oOeWRq+i+0hp SED6X0jgb6e/Xi+3hIDpaeeD09KeRlWGOxq51mKUEzARy7dJaOVVN3jv2sZqpdb0k+r7 LU5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720735503; x=1721340303; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=93kJQnyc8fg8K6y0X8F3xN7SC1oO5b0Dd7FB+lYPuNQ=; b=fAAeNuYqK9UY+Wzugf1pdgHXVEH06O74uUZAjufMWf0I6EX/CmexWAlGvs70+54q+o +wfXKo3hTZKrMJHIg/0p7e31Dsh4U2ld6IMj0JQSNuM1QAbPDFtfghSG8hyBHa7q6YKy 3M83YVgvgNf8BP0Tw4aCMCj41NlwmODYbYSY1ncnhlz9gFwLGmABUrAuy0T27kn61jIu 2f9SKwN+wVJ4I+/Y4kwRkiAv7SO3P1FRaLpMCBr4lXG6ACZJGD1e1rcEh6zCaxi+Er5k CU95NqVgrnNbRFtR/nI1FjjfQ9WefpTnXQsC5ZT8ekMmFpcbhNGIaGuOpxGAjEr1dOLq qJag== X-Forwarded-Encrypted: i=1; AJvYcCUoL+T64VllDgvMapazkrGyUyNCqNCI4iXHXQcgJb4E1ahiRjc6IhOxgB8BPd08mxTowBjSbIUV47BQ73SY4HgUfmI= X-Gm-Message-State: AOJu0Yw+8pw8+x1j/DOFL6Sj549M60byykiK5XRN6GDO6RWnGOBZTCL2 3WMukH6zV+Nu5EPwxdcFHn2YRa4u8Z8THRzUUnuAA96c0bHMZ8zU+vChhaYwqUCb+WWK3bCItjV mAw== X-Google-Smtp-Source: AGHT+IE5Ve5SJ1wAwBQCkjGpJ5hWlIgqCRMJq8/YBUF401ZfiUTIDMS3IJ0Xh5DM4xHnHKnJdlSUE6tovAs= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:3f97:69c0:dd80:bd4a]) (user=surenb job=sendgmr) by 2002:a05:6902:1208:b0:dfa:48f9:186a with SMTP id 3f1490d57ef6-e041b0370bbmr22072276.3.1720735502941; Thu, 11 Jul 2024 15:05:02 -0700 (PDT) Date: Thu, 11 Jul 2024 15:04:56 -0700 In-Reply-To: <20240711220457.1751071-1-surenb@google.com> Mime-Version: 1.0 References: <20240711220457.1751071-1-surenb@google.com> X-Mailer: git-send-email 2.45.2.993.g49e7a77208-goog Message-ID: <20240711220457.1751071-2-surenb@google.com> Subject: [PATCH 2/3] lib: reuse page_ext_data() to obtain codetag_ref From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, vbabka@suse.cz, pasha.tatashin@soleen.com, souravpanda@google.com, keescook@chromium.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, surenb@google.com X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: F004F40008 X-Stat-Signature: qmp5md4s45cm5do4kzwskkkqhdbpdk8f X-HE-Tag: 1720735503-796150 X-HE-Meta: U2FsdGVkX1+igczV0OYfXVlDHTuz7OCHiouHYOs8Z4XLfz+rfuAJ+85WKPDcp18cWh+UOb6xKztredw3h3RCRnx3CBNDCqMK3NAOn1olOVgLfJoJx6ReXbiBKXEUkdv//PPdg+wsXfF/eFeGkj2jhp7Ic/K9DGSE2gZfjurUUJUrH6HM//FaR0tw6YL7yDsycS5e/pJiAywLeSiRguSprLGofJKcGSr9Xj+xHQk+A4zHzn1ICNULxjos/eLJnwGXRljjZqNev/VfFeXjwb2Vir5k5tgTvjtCzwId/AUlQiyjffzsQm+hTl2o7I+oSUBnCjm2r1dgmlFpn/gOo0Lhw/qhRdhEliHwiN8ke2sO7vRuo9mouk69sbkdzSOOQwlzYwRPKMUVJFsTJk7I8l5KPmubPV/XGJZEFv78lBcUhr1dMN4oKW3IULjYR92lKV8Cw72jBpg1ZBzwQdg3ZKOANNQ040MPYRsaMSZ+dXNccIo/rN02uA2V4PDVXeZiNG4l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4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: codetag_ref_from_page_ext() reimplements the same calculation as page_ext_data(). Reuse existing function instead. Fixes: dcfe378c81f7 ("lib: introduce support for page allocation tagging") Signed-off-by: Suren Baghdasaryan --- include/linux/pgalloc_tag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/pgalloc_tag.h b/include/linux/pgalloc_tag.h index 9cacadbd61f8..acb1e9ce7981 100644 --- a/include/linux/pgalloc_tag.h +++ b/include/linux/pgalloc_tag.h @@ -15,7 +15,7 @@ extern struct page_ext_operations page_alloc_tagging_ops; static inline union codetag_ref *codetag_ref_from_page_ext(struct page_ext *page_ext) { - return (void *)page_ext + page_alloc_tagging_ops.offset; + return (union codetag_ref *)page_ext_data(page_ext, &page_alloc_tagging_ops); } static inline struct page_ext *page_ext_from_codetag_ref(union codetag_ref *ref) From patchwork Thu Jul 11 22:04:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13731118 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C44FFC3DA4D for ; Thu, 11 Jul 2024 22:05:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 25D5F6B0098; Thu, 11 Jul 2024 18:05:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 20D306B0099; Thu, 11 Jul 2024 18:05:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 05FE56B009A; Thu, 11 Jul 2024 18:05:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D40A36B0098 for ; Thu, 11 Jul 2024 18:05:07 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 9041A16082D for ; Thu, 11 Jul 2024 22:05:07 +0000 (UTC) X-FDA: 82328853054.28.FE39911 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf22.hostedemail.com (Postfix) with ESMTP id CB2F6C0021 for ; Thu, 11 Jul 2024 22:05:05 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=Mi312nNO; spf=pass (imf22.hostedemail.com: domain of 3EFeQZgYKCDsprobkYdlldib.Zljifkru-jjhsXZh.lod@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3EFeQZgYKCDsprobkYdlldib.Zljifkru-jjhsXZh.lod@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720735479; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=XUqZ9LjRSmNrW6ngPL3y0CGgomBIu4HcNtQ8V/Usrc4=; b=w5XixM7Pn4HTWdLMfAtOKxKKedIXm+GmrIoZgT8E9/pco1KfzCpu7npZJDxqxUalH5+CHC Pa7Y2L2+tqMGej1R1CZIGHE8J45QQ64W3sewrv3pKb28xAXRDqyqScwa28D3Z1ONxL6OZk tkkZcnWcJekN/KROqlUw2tQYWozC3hg= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=Mi312nNO; spf=pass (imf22.hostedemail.com: domain of 3EFeQZgYKCDsprobkYdlldib.Zljifkru-jjhsXZh.lod@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3EFeQZgYKCDsprobkYdlldib.Zljifkru-jjhsXZh.lod@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720735479; a=rsa-sha256; cv=none; b=kcX0+hFoHV2j0Ct/rL6Vryom5wvkROucUaU0osJEF0EYu4vVBQ7Y69ZrHFnt4472YVTFSW 1TfCIPSihCWS/W5JQ88kYLLjQa6W/DYfL2CZY4bP1JD8ucnBJCuy9Txn1A9TKQyvwqWOTj Qp8ztIzpp+zLU6KGyGXOuttIm8/7O8U= Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dfa73db88dcso2527521276.0 for ; Thu, 11 Jul 2024 15:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1720735505; x=1721340305; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=XUqZ9LjRSmNrW6ngPL3y0CGgomBIu4HcNtQ8V/Usrc4=; b=Mi312nNOlJ+3cYMR/yHBIwDy9a7fKrNBUUI3P5x9LFCfRgqAJ4y2ybTDm6g78kstXW U/qyDaP0bMqWvqDgb9+0PRkNfZAtp3LKhZ/WhDkF+GykEGKsfNQ0AZw4tr8/KyeXIwVj wJM4eCHfxXqkqoQzIR+4e0CpYLglWNTzNJukYzvtTif9unjpTwpEBrt5oUqzpzspVMrW xBAPvnx/5p8he8UL8UOILwKSGGSzGsTxkI3W5Ul/euOCsjVd3BP5bsmqyPrS2hT/x/Wn iV/8MIP0gWpLubFWusuaq/4jbMmxUa9TTM5bZjpP85ih2U5/JWyUnW4kI7gju8ruhbSC boQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720735505; x=1721340305; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XUqZ9LjRSmNrW6ngPL3y0CGgomBIu4HcNtQ8V/Usrc4=; b=RfJKG2K8wRbQTEeI6W6F/c4tp2Tu/yTOrJ751msSJ/CkgmG319pC6e750NaTPK0EmR MVuaiPKN09mAB96Aa9SW39aqgfGjpvNiTJ1SZQnV86w9qNGRTufU21OrCbbnYEcwPWOI KAzyQtREV6JRWi/g1ol+XyA7wHq7Ig0Raeuz3Es9Wcd8VQgq9JTievQrDCW9HpcPBCBG GtrIvuEDqmMto+JAuK7owlX4/FfnoBV+j4wVzBdnToVaW5GsRTpnJ2oisq5EwYUZfeIo X0fR0ZVDxyqMs8us0tAZ3Lb4AU7FPYSqnlV3FIgRv8MA5PxFnrUbN6XDd44DiUZyzTeP 038A== X-Forwarded-Encrypted: i=1; AJvYcCV/AcHFba032PYrmhR4tiQdyJUkC/Y80MXUv/URiO7TRMPGw6mcU5y9L4aQThjgsU+d4obV74R8IdE2GoOCm17mIFE= X-Gm-Message-State: AOJu0YwLSpknKQXXmC/6pNQu/U42sPhyVSSZOOsUaHcDUbKSu8o71uqm XZl29zjxrZivrcXhnfyR4vTxjfaooytt55Bhy5KNZAr7yqv7mg4EWk09AIZLPllO4mNPlUoVuEA keA== X-Google-Smtp-Source: AGHT+IGhq4L2iZI0qjQrwTOUQOvU97/c4AmsbzpWcAXlY7wJJCThuhaIO+OEQIc1xTorafJYcExQaSO905U= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:3f97:69c0:dd80:bd4a]) (user=surenb job=sendgmr) by 2002:a05:6902:124a:b0:e03:31ec:8a25 with SMTP id 3f1490d57ef6-e041b10fd77mr20935276.10.1720735504863; Thu, 11 Jul 2024 15:05:04 -0700 (PDT) Date: Thu, 11 Jul 2024 15:04:57 -0700 In-Reply-To: <20240711220457.1751071-1-surenb@google.com> Mime-Version: 1.0 References: <20240711220457.1751071-1-surenb@google.com> X-Mailer: git-send-email 2.45.2.993.g49e7a77208-goog Message-ID: <20240711220457.1751071-3-surenb@google.com> Subject: [PATCH 3/3] alloc_tag: fix page_ext_get/page_ext_put sequence during page splitting From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, vbabka@suse.cz, pasha.tatashin@soleen.com, souravpanda@google.com, keescook@chromium.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, surenb@google.com X-Stat-Signature: n697oticcdqhrtussojgbaq9kgeiqee4 X-Rspam-User: X-Rspamd-Queue-Id: CB2F6C0021 X-Rspamd-Server: rspam02 X-HE-Tag: 1720735505-321833 X-HE-Meta: U2FsdGVkX1+d5eYyg50YjB3A+kKMVfE1rqEFnPAAz3lrW+tsSH6qjqTFQxqRVosEqt5TeLM2v1yAeuVGO2xYY+1i3I2xfXgLFY3wCAFBvgdxsHB/Wcd5LPYCj1puJFLSNaKWThPHMUru3MK/FixOSUeMFlYFlwfUnmpIprPqF/QEeCENI5j/LiONtBRchVQ05Yx96VAa9c/0o3WbPTF04bv5FKr5tV+2qEI1bNCDweuttzuXrwBl0GOFH39Mtezz9PZvdMYVTHVBpS5JGd/AkoTmExfOtWu4VBPQ/oYZinxjt5U4V0aWHwBRU07VRduZyFV6Eqfbm/gK+U8Iiz7RL3uFUYyHajntQ5/cJe3Pl96oj/OCN6ep9tERjUFBShD/XggI8+yYCiIlP5PAll6ruZoa34xE0JVNXwpLHUQgqVUBWYOqrzILpQjm1fGT0xOh9+W8En/iPvaEZj6f96IkWyzpFFjEOpebpm+5YR74HQRh5EqFhGx5Ntr9VqVLt9ES7PO3gGZbSVxBz+OIbzwUSSx8JDmsLDDy7cicYmncKnhrrg2zCRJVr8EPE5sOn20ATIBnnkr8LlmwCM94OEjtqqO9KND0VrT2EPzSlQfI3i0/zvnc89mq+9U3MabbLh3Qbpd9cnZvlDqzEDwyRgOjOjy38JqFqIJ/4eY0nClrYKfpDgQO6rDSyzn57qr7xMdSL83XjG1j9eEnQhNBuztWnZQRHuaAljQsdY9CMpzRuZvOKK1Qr+se4KsY//TcVs6Q449KTnuFDsDEkMwN3Io/PUyugRBEbrTBcou1igoQUsIXxuWEs6+wuUch4Qs4gkL4ameIipa9D80yc9a7e7I8ivYlkLGZVU424wMsE3+jiEIQvDFLkmaki02uyfZ9BtWQPVIl0Ql1KxwqdDo4s19S9ldqJI67SfZyiNuDUe44Bv/IeGil2I6NFqkHwgj+q96oB4igQ/PGv0PNhPLVP4p 6w6s7Gmc 0/ZLOASu80fIgIiTZ8jezEbdLUdoU/HmcO0KgOyOHgJTTSEppqPL1J9H43C+OMBoSsy6hqrCPAGnpRUAPVV40D2uHZax2fHRYGXl6Oy639iGQwj9f4VtJBZBYLW8HVhaO4sI2fLxBPPwJWhQ0wRdfwfaFyqokSXB9sTeOhz9Ia3sP1mdDMrXE/tKpCeRnIcZujKF1mqS/P/D2e1vLymfLU5d+1oK722bA13Dils4WbL7Y2mcTV7s955RtfMVauuosOU9X1GAhDrQYXirLc8ovC9ETTUpZvR+q7vbxNnDCjB1Wc0/FReCTs5tCTm2O4UVp5VuybwzsVBpNCSbFJQMD9dx4/fAWsqxEEzy81gyTNrOu3HhU2mCLN8ecm3EA6t6DJLlZTbbCqvK4Ug+ergsOIfx0VCQp0YlrF7fYXWn0K6pDuNtqoR7LorWRuu5aucSGX4LPrM6TyJKN1BpEryk2P+P8YpdxpMUHwg+HEq0IThpk2GsgiCnNzXBgZCLvuono+NxjTo8BLxV8olSO4fcIdWAEuuDoIEXVRBwy6qf4xyA70R0= X-Bogosity: Ham, tests=bogofilter, spamicity=0.002205, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: pgalloc_tag_sub() might call page_ext_put() using a page different from the one used in page_ext_get() call. This does not pose an issue since page_ext_put() ignores this parameter as long as it's non-NULL but technically this is wrong. Fix it by storing the original page used in page_ext_get() and passing it to page_ext_put(). Fixes: be25d1d4e822 ("mm: create new codetag references during page splitting") Signed-off-by: Suren Baghdasaryan --- include/linux/pgalloc_tag.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/pgalloc_tag.h b/include/linux/pgalloc_tag.h index acb1e9ce7981..18cd0c0c73d9 100644 --- a/include/linux/pgalloc_tag.h +++ b/include/linux/pgalloc_tag.h @@ -71,6 +71,7 @@ static inline void pgalloc_tag_sub(struct page *page, unsigned int nr) static inline void pgalloc_tag_split(struct page *page, unsigned int nr) { int i; + struct page_ext *first_page_ext; struct page_ext *page_ext; union codetag_ref *ref; struct alloc_tag *tag; @@ -78,7 +79,7 @@ static inline void pgalloc_tag_split(struct page *page, unsigned int nr) if (!mem_alloc_profiling_enabled()) return; - page_ext = page_ext_get(page); + first_page_ext = page_ext = page_ext_get(page); if (unlikely(!page_ext)) return; @@ -94,7 +95,7 @@ static inline void pgalloc_tag_split(struct page *page, unsigned int nr) page_ext = page_ext_next(page_ext); } out: - page_ext_put(page_ext); + page_ext_put(first_page_ext); } static inline struct alloc_tag *pgalloc_tag_get(struct page *page)