From nobody Sat Dec 17 17:09:22 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NZCBB6TjSzt4xl; Sat, 17 Dec 2022 17:09:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NZCBB4gCCz3w5G; Sat, 17 Dec 2022 17:09:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671296962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pDs4NZfWzBbVKyClQtO1OW7qngBhGYhSs05rYS+rvgo=; b=kaaoxA54sCvzQH8zvITHmJCAUdfYMN9WwJgszBSWEzVctez2TasWQbAeqKYKPEUd7VImvZ WNe8bLzzUrjK1vnp//vBic8YhtpURfBFz0B4Yhmc0m75O+8iXtgh/0H6JlyVAYjlGT6JIj c1S4Kx+Q/4v04PxsRL8cNmjaOuAX89777niDN/HhXPc5w46e2bsrSd9IwCEOLeBEEEnmRB yc4xwCCeh/8mzGJlVZSqZFBIc7ityAVaden4msWyp1prvcV0xrcWUKIwUjopnQIUkz9nwY 8yfwXKThJfSTlBHB3zVRjiGNyp6b177P3XcyilNxnlb9rvGCOrPC6E/iNB4hPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671296962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pDs4NZfWzBbVKyClQtO1OW7qngBhGYhSs05rYS+rvgo=; b=o0+pepskOzCD8kxzb8kAKnKH8y8YHElDOXEb3ItvfbWutOBkXk8buAv3cQOeCiU/i62W/d bdf3D0uiyJ3Bq2myCxf1Q/jprpFQmg6BKALPjkd5nZhzFMA+ihZ0JEg69B1iHThuk8Y21m Jw0ZwnT1I08iEy3RK0+YLko/9s5WREuGzYM05nVTG9p2JOGA1mG4+1yrv49KGF6iaYUsJ8 USVNRc0BpWeqEPPZ3n4YtkLBQ50bV6rr1ZK7Gu0tfYiVpeHs85/qqcGIJXncwcUv0QAkM8 rSI6KWqwlh22haoost7MtBkmmWdyzJXNJgVhqe+Lr2uXmckZ5fKaay+IY46gVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671296962; a=rsa-sha256; cv=none; b=oTd+G7RLhrguYmM7ZNdhuf25nmbPGdAMZ52vDvWVus9griSudKNvrxDFXpSu0qovJD2XKf FJAHFJ1flYRdeQe/u79A2Q5Lt++mRjuPJOj8RXNzdvwJIDOzPeB0cTMhvxwW2OUajf/jLn Z/VDYOANvTYdxHrXZQOmNjYDE466PY8Y3iq36oJH3As9lVIiy/p2IIYEHZ1dNYQ3ICYxnz PUHZHyxQXeoU5K31gJtS612d1s5TE8aAsVD/1syLqFPrF5XwcekVWdYnxBa2MCp6vOcvdL 5y5gtrlb+1tjlGZ073fTsfg+a7vGc1QwvFVOSd4xieawyJWQmtPipoIp+T2WhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NZCBB2b7Sz10Db; Sat, 17 Dec 2022 17:09:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BHH9Ml1087641; Sat, 17 Dec 2022 17:09:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BHH9MXk087640; Sat, 17 Dec 2022 17:09:22 GMT (envelope-from git) Date: Sat, 17 Dec 2022 17:09:22 GMT Message-Id: <202212171709.2BHH9MXk087640@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 3249449190c2 - main - vm_page_grab_valid(): clear *mp in case of pager denying page allocation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3249449190c2c71ecfc4fa5f518f94ff552df440 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3249449190c2c71ecfc4fa5f518f94ff552df440 commit 3249449190c2c71ecfc4fa5f518f94ff552df440 Author: Konstantin Belousov AuthorDate: 2022-12-17 00:12:14 +0000 Commit: Konstantin Belousov CommitDate: 2022-12-17 17:01:43 +0000 vm_page_grab_valid(): clear *mp in case of pager denying page allocation Same as it is done in other error return cases. Callers depend on error case returning NULL, e.g. vm_imgact_hold_page(). Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37719 --- sys/vm/vm_page.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 797207205f42..90413f235ec0 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -4713,8 +4713,10 @@ retrylookup: *mp = NULL; return (VM_PAGER_FAIL); } else if ((m = vm_page_alloc(object, pindex, pflags)) == NULL) { - if (!vm_pager_can_alloc_page(object, pindex)) + if (!vm_pager_can_alloc_page(object, pindex)) { + *mp = NULL; return (VM_PAGER_AGAIN); + } goto retrylookup; }