From patchwork Wed Oct 2 14:27:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 2975341 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 760EABFF0B for ; Wed, 2 Oct 2013 14:34:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B961F2017D for ; Wed, 2 Oct 2013 14:34:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D0D5201FA for ; Wed, 2 Oct 2013 14:34:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753368Ab3JBOeO (ORCPT ); Wed, 2 Oct 2013 10:34:14 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49003 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753184Ab3JBO26 (ORCPT ); Wed, 2 Oct 2013 10:28:58 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BA980A5429; Wed, 2 Oct 2013 16:28:57 +0200 (CEST) Received: by quack.suse.cz (Postfix, from userid 1000) id 12F7180ECE; Wed, 2 Oct 2013 16:28:55 +0200 (CEST) From: Jan Kara To: LKML Cc: linux-mm@kvack.org, Jan Kara , Gleb Natapov , Paolo Bonzini , kvm@vger.kernel.org Subject: [PATCH 17/26] kvm: Use get_user_pages_unlocked() in async_pf_execute() Date: Wed, 2 Oct 2013 16:27:58 +0200 Message-Id: <1380724087-13927-18-git-send-email-jack@suse.cz> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1380724087-13927-1-git-send-email-jack@suse.cz> References: <1380724087-13927-1-git-send-email-jack@suse.cz> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP CC: Gleb Natapov CC: Paolo Bonzini CC: kvm@vger.kernel.org Signed-off-by: Jan Kara --- virt/kvm/async_pf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c index 8a39dda7a325..8d4b39a4bc12 100644 --- a/virt/kvm/async_pf.c +++ b/virt/kvm/async_pf.c @@ -67,9 +67,7 @@ static void async_pf_execute(struct work_struct *work) might_sleep(); use_mm(mm); - down_read(&mm->mmap_sem); - get_user_pages(current, mm, addr, 1, 1, 0, &page, NULL); - up_read(&mm->mmap_sem); + get_user_pages_unlocked(current, mm, addr, 1, 1, 0, &page); unuse_mm(mm); spin_lock(&vcpu->async_pf.lock);