Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Stephen Rothwell Newsgroups: linux.kernel Subject: linux-next: manual merge of the tip tree with the drm tree Date: Thu, 17 Mar 2016 03:10:01 +0100 Message-ID: X-Original-To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , Dave Airlie Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201601; t=1458180030; bh=gTLIf2T1acCzcJWKxvjEOGFBGsXMAv/SH+cfnfUabwA=; h=Date:From:To:Cc:Subject:From; b=IWHy7x5h13cGaoUPJ9h+Uu+yP51AjhyvsFHqnNP1dwarrSlchn3lKxdloXmqYotci bGUJCtA2UPKopCe3nVVhGoO2SQfLGb5tcsMn3hPvo5rM5fULQ2RmPINsCoJMrTvLjR BtQP74gIAjZ/I6Sf4/L4b81GMaraRiipT8DjjA8M= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 55 Organization: linux.* mail to news gateway X-Original-Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Christian =?UTF-8?B?S8O2bmln?= , Alex Deucher , Dave Hansen X-Original-Date: Thu, 17 Mar 2016 13:00:29 +1100 X-Original-Message-ID: <20160317130029.5569b2f4@canb.auug.org.au> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1359527 Hi all, Today's linux-next merge of the tip tree got a conflict in: drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c between commit: 637dd3b5ca9e ("drm/amdgpu: prevent get_user_pages recursion") from the drm tree and commit: d4edcf0d5695 ("mm/gup: Switch all callers of get_user_pages() to not pass tsk/mm") from the tip tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. -- Cheers, Stephen Rothwell diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 0f42b1a24446,7b82e57aa09c..000000000000 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@@ -532,21 -516,9 +532,20 @@@ int amdgpu_ttm_tt_get_user_pages(struc do { unsigned num_pages = ttm->num_pages - pinned; uint64_t userptr = gtt->userptr + pinned * PAGE_SIZE; - struct page **pages = ttm->pages + pinned; + struct page **p = pages + pinned; + struct amdgpu_ttm_gup_task_list guptask; + + guptask.task = current; + spin_lock(>t->guptasklock); + list_add(&guptask.list, >t->guptasks); + spin_unlock(>t->guptasklock); - r = get_user_pages(current, current->mm, userptr, num_pages, - write, 0, p, NULL); + r = get_user_pages(userptr, num_pages, write, 0, pages, NULL); + + spin_lock(>t->guptasklock); + list_del(&guptask.list); + spin_unlock(>t->guptasklock); + if (r < 0) goto release_pages;