Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

accel/habanalabs: remove old interface variation of 'access_ok()'

The access_ok() API no longer requires the VERIFY_WRITE argument,
and the use of the old interface with VERIFY_WRITE is deprecated.

Clean up the habanalabs memory manager to use the modern access_ok()
interface consistently. This removes old #ifdef guards and aligns the
driver with current upstream kernel APIs.

Signed-off-by: Ilia Levi <ilia.levi@intel.com>
Reviewed-by: Koby Elbaz <koby.elbaz@intel.com>
Signed-off-by: Koby Elbaz <koby.elbaz@intel.com>

authored by

Ilia Levi and committed by
Koby Elbaz
0668db41 0529b191

-5
-5
drivers/accel/habanalabs/common/memory_mgr.c
··· 259 259 goto put_mem; 260 260 } 261 261 262 - #ifdef _HAS_TYPE_ARG_IN_ACCESS_OK 263 - if (!access_ok(VERIFY_WRITE, (void __user *)(uintptr_t)vma->vm_start, 264 - user_mem_size)) { 265 - #else 266 262 if (!access_ok((void __user *)(uintptr_t)vma->vm_start, 267 263 user_mem_size)) { 268 - #endif 269 264 dev_err(mmg->dev, "%s: User pointer is invalid - 0x%lx\n", 270 265 buf->behavior->topic, vma->vm_start); 271 266