Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2331120pxa; Mon, 17 Aug 2020 07:09:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6nPdhKwEjeASlJhLvWXz//O3pGTUJCSGRo9FGEEJwpphSYM4LFdQ2GpCWUv+nTWHw8Goy X-Received: by 2002:a17:906:25d3:: with SMTP id n19mr5090924ejb.551.1597673359724; Mon, 17 Aug 2020 07:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597673359; cv=none; d=google.com; s=arc-20160816; b=RQJX7lQZtm6LTTGVHHfaobyTobiZmr1oO50X0Wwd0LB6e0FqVc4NMw6GiQupLJrBhj fmEFwZ2wzT37leyCfKHtiaZF2fSpg2/LL9CL6kqla2ZKoAJIlKOqkZJmXmURvxGoOz2x sOWc41+BaFmVaZ0w6lu1E5ahAioaapUfGJSFobIrDbm6AS+zaGa+Ud6+ybJu+Q+j5hqC 2ZpmSHqlMDKnLre1hcYQVV4kylu0D3r1ai2Gu0DNhgPgsqyER1tWMgsP/RMJXbVzvyQf NM2zBSY184Uq4eAvPqh5FX8QM9IEZCRrhkGkf3sZztqJQ7E3Rtl9XZotV+eb72Npo31j 9L1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CISar0ED1yHEmy/zSC+DxJhwjT7dtxetwJg9y4KnwVg=; b=KPdqFI6Whh2qXFHqoRH48/5CAfb1DD/L9AWSmQrcH+Apr8Bm8GeTQlxEcuYUTBNOka Q6dRyKg5Q5PtsQ5qmifq9ptULOALxE1pTCua5odgG5i3sLEaBAf7BljVuskL2zIiE/r7 EynpvzL8EZaCVG4WZKKiin+BdjzAKp4CZP6iPhqh1LWPv5j3OCQtdFEcoBJn1WxsUIbG PYlu7WMygbSHjmDLMgFSKb9hyryUy20Lgqm1JE4VcdeQ4KPmhDlSYDDOVKSTO4kw6ZfL OjiRm45ZcA3nDqB7dy4SgDyL/tSha8swP8c3ui7cTvGQV2H1MgycK9mPk4mKkR2+bKek pi/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UQsukgFJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l13si11566574eja.670.2020.08.17.07.08.56; Mon, 17 Aug 2020 07:09:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UQsukgFJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728834AbgHQOHx (ORCPT + 99 others); Mon, 17 Aug 2020 10:07:53 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:42066 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728489AbgHQOHx (ORCPT ); Mon, 17 Aug 2020 10:07:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597673272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CISar0ED1yHEmy/zSC+DxJhwjT7dtxetwJg9y4KnwVg=; b=UQsukgFJZnMEjpdAbatgz0l5XdP8kWmcKxadQeij2DCLQHNOtcIIiDRAdgWbClZgpEqgNQ vRYuNCkS9/lIBIRFeYpOHi9Aj1WzYldssIfqOsOjkCdsbEwIdpGQKJ2tI9bMtEiEDbD97x 4VS+h2O7KCzCjqOV/3pIdmQ5fsmYyMI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-385-sRjTP-gnMsORM4V06tB3vA-1; Mon, 17 Aug 2020 10:07:50 -0400 X-MC-Unique: sRjTP-gnMsORM4V06tB3vA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 95EAF185E521; Mon, 17 Aug 2020 14:07:48 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.40.192.59]) by smtp.corp.redhat.com (Postfix) with SMTP id 9D1767A1C0; Mon, 17 Aug 2020 14:07:46 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Mon, 17 Aug 2020 16:07:48 +0200 (CEST) Date: Mon, 17 Aug 2020 16:07:45 +0200 From: Oleg Nesterov To: Hugh Dickins Cc: Andrew Morton , Song Liu , "Kirill A. Shutemov" , Srikar Dronamraju , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] uprobes: __replace_page() avoid BUG in munlock_vma_page() Message-ID: <20200817140744.GC29865@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/16, Hugh Dickins wrote: > > --- v5.9-rc/kernel/events/uprobes.c 2020-08-12 19:46:50.851196584 -0700 > +++ linux/kernel/events/uprobes.c 2020-08-16 13:18:35.292821674 -0700 > @@ -205,7 +205,7 @@ static int __replace_page(struct vm_area > try_to_free_swap(old_page); > page_vma_mapped_walk_done(&pvmw); > > - if (vma->vm_flags & VM_LOCKED) > + if ((vma->vm_flags & VM_LOCKED) && !PageCompound(old_page)) > munlock_vma_page(old_page); > put_page(old_page); Thanks! Acked-by: Oleg Nesterov