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-next>] [day] [month] [year] [list]
Message-Id: <1461836093-1436847-1-git-send-email-arnd@arndb.de>
Date:	Thu, 28 Apr 2016 11:33:48 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Alex Deucher <alexander.deucher@....com>,
	Michal Hocko <mhocko@...e.com>
Cc:	Arnd Bergmann <arnd@...db.de>,
	Christian König <christian.koenig@....com>,
	David Airlie <airlied@...ux.ie>,
	Felix Kuehling <Felix.Kuehling@....com>,
	Jammy Zhou <Jammy.Zhou@....com>, Monk Liu <monk.liu@....com>,
	Jack Xiao <Jack.Xiao@....com>, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] drm/amdgpu: use ERR_PTR() to return from amdgpu_mn_get

The newly added failure path in amdgpu_mn_get() use the
wrong return type:

drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c: In function 'amdgpu_mn_get':
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:237:10: error: return makes pointer from integer without a cast

This adds the necessary ERR_PTR() conversion.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
Fixes: ad35eee9fb17 ("drm/amdgpu: make amdgpu_mn_get wait for mmap_sem killable")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
index cf90686a50d1..32fa7b7913f7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
@@ -234,7 +234,7 @@ static struct amdgpu_mn *amdgpu_mn_get(struct amdgpu_device *adev)
 	mutex_lock(&adev->mn_lock);
 	if (down_write_killable(&mm->mmap_sem)) {
 		mutex_unlock(&adev->mn_lock);
-		return -EINTR;
+		return ERR_PTR(-EINTR);
 	}
 
 	hash_for_each_possible(adev->mn_hash, rmn, node, (unsigned long)mm)
-- 
2.7.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ