Message ID | 20220308141437.144919-2-david@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 C2FD4C433F5 for <linux-mm@archiver.kernel.org>; Tue, 8 Mar 2022 14:15:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 60BB88D0003; Tue, 8 Mar 2022 09:15:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5BBAE8D0001; Tue, 8 Mar 2022 09:15:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 483EA8D0003; Tue, 8 Mar 2022 09:15:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 3BD0F8D0001 for <linux-mm@kvack.org>; Tue, 8 Mar 2022 09:15:39 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 115AF8182E for <linux-mm@kvack.org>; Tue, 8 Mar 2022 14:15:39 +0000 (UTC) X-FDA: 79221417198.02.CC0EFA4 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf09.hostedemail.com (Postfix) with ESMTP id 7FD59140013 for <linux-mm@kvack.org>; Tue, 8 Mar 2022 14:15:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646748937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2SNuouyRzX4GVO8cSj3iXN07fP9GTVoyu2qUwM1ekiY=; b=Kt04fFzNApBGcSLbM4CzLeSigy9aif225P5m2fb8TXJeIJH9R+96+AGg6qWl8Ol+ZnGLYy Bt/DeRBrJWaHTFIv6wQIZlnIz7LkugpV+81unzT3wNOLprBoK9oc1Fj26ywIzezHFo8ER4 FE7bdL07vaI5VcNbGmWsrZPJc9kl2To= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-443-hvWi_1T3PuWaKfFMDQpfrQ-1; Tue, 08 Mar 2022 09:15:34 -0500 X-MC-Unique: hvWi_1T3PuWaKfFMDQpfrQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DCD11824FA7; Tue, 8 Mar 2022 14:15:30 +0000 (UTC) Received: from t480s.redhat.com (unknown [10.39.195.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C1877887E; Tue, 8 Mar 2022 14:14:46 +0000 (UTC) From: David Hildenbrand <david@redhat.com> To: linux-kernel@vger.kernel.org Cc: Andrew Morton <akpm@linux-foundation.org>, Hugh Dickins <hughd@google.com>, Linus Torvalds <torvalds@linux-foundation.org>, David Rientjes <rientjes@google.com>, Shakeel Butt <shakeelb@google.com>, John Hubbard <jhubbard@nvidia.com>, Jason Gunthorpe <jgg@nvidia.com>, Mike Kravetz <mike.kravetz@oracle.com>, Mike Rapoport <rppt@linux.ibm.com>, Yang Shi <shy828301@gmail.com>, "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>, Matthew Wilcox <willy@infradead.org>, Vlastimil Babka <vbabka@suse.cz>, Jann Horn <jannh@google.com>, Michal Hocko <mhocko@kernel.org>, Nadav Amit <namit@vmware.com>, Rik van Riel <riel@surriel.com>, Roman Gushchin <guro@fb.com>, Andrea Arcangeli <aarcange@redhat.com>, Peter Xu <peterx@redhat.com>, Donald Dutile <ddutile@redhat.com>, Christoph Hellwig <hch@lst.de>, Oleg Nesterov <oleg@redhat.com>, Jan Kara <jack@suse.cz>, Liang Zhang <zhangliang5@huawei.com>, Pedro Gomes <pedrodemargomes@gmail.com>, Oded Gabbay <oded.gabbay@gmail.com>, linux-mm@kvack.org, David Hildenbrand <david@redhat.com>, Khalid Aziz <khalid.aziz@oracle.com> Subject: [PATCH v1 01/15] mm/rmap: fix missing swap_free() in try_to_unmap() after arch_unmap_one() failed Date: Tue, 8 Mar 2022 15:14:23 +0100 Message-Id: <20220308141437.144919-2-david@redhat.com> In-Reply-To: <20220308141437.144919-1-david@redhat.com> References: <20220308141437.144919-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 7FD59140013 X-Rspam-User: Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Kt04fFzN; spf=none (imf09.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Stat-Signature: u46gs34fhwytifdhuqxsi97oggbjzkmh X-HE-Tag: 1646748938-547095 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
mm: COW fixes part 2: reliable GUP pins of anonymous pages
|
expand
|
diff --git a/mm/rmap.c b/mm/rmap.c index 6a1e8c7f6213..f825aeef61ca 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -1625,6 +1625,7 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma, break; } if (arch_unmap_one(mm, vma, address, pteval) < 0) { + swap_free(entry); set_pte_at(mm, address, pvmw.pte, pteval); ret = false; page_vma_mapped_walk_done(&pvmw);