lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2913254.nLUtoX01AU@wuerfel>
Date:	Thu, 17 Mar 2016 10:00:56 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
Cc:	Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu>,
	"H. Peter Anvin" <hpa@...or.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Dave Airlie <airlied@...ux.ie>, linux-next@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Christian König <christian.koenig@....com>,
	Alex Deucher <alexander.deucher@....com>,
	Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: linux-next: manual merge of the tip tree with the drm tree

On Thursday 17 March 2016 13:00:29 Stephen Rothwell wrote:
> 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(&gtt->guptasklock);
>  +              list_add(&guptask.list, &gtt->guptasks);
>  +              spin_unlock(&gtt->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(&gtt->guptasklock);
>  +              list_del(&guptask.list);
>  +              spin_unlock(&gtt->guptasklock);
>  +
>                 if (r < 0)
>                         goto release_pages;

Your merge looks incorrect to me, and I got a build warning for it:

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c: In function 'amdgpu_ttm_tt_get_user_pages':
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:535:17: error: unused variable 'p' [-Werror=unused-variable]

I think the one-line change below is what is needed here, but it's probably
best for amdgpu maintainers to take a closer look.

Signed-off-by: Arnd Bergmann <arnd@...db.de>

index 8b9b245fd0c8..ab34190859a8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -540,7 +540,7 @@ int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages)
 		list_add(&guptask.list, &gtt->guptasks);
 		spin_unlock(&gtt->guptasklock);
 
-		r = get_user_pages(userptr, num_pages, write, 0, pages, NULL);
+		r = get_user_pages(userptr, num_pages, write, 0, p, NULL);
 
 		spin_lock(&gtt->guptasklock);
 		list_del(&guptask.list);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ