2005-03-23 23:23:46

by Jesper Juhl

[permalink] [raw]
Subject: [PATCH] verify_area to access_ok conversion in drivers/char/drm/drm_os_linux.h


verify_area is deprecated, replaced by access_ok.
Seems I missed this one when I did the big overall conversion.


Signed-off-by: Jesper Juhl <[email protected]>

--- linux-2.6.12-rc1-mm1-orig/drivers/char/drm/drm_os_linux.h 2005-03-21 23:12:26.000000000 +0100
+++ linux-2.6.12-rc1-mm1/drivers/char/drm/drm_os_linux.h 2005-03-24 00:18:57.000000000 +0100
@@ -89,7 +89,7 @@ static __inline__ int mtrr_del (int reg,
copy_to_user(arg1, arg2, arg3)
/* Macros for copyfrom user, but checking readability only once */
#define DRM_VERIFYAREA_READ( uaddr, size ) \
- verify_area( VERIFY_READ, uaddr, size )
+ (access_ok( VERIFY_READ, uaddr, size ) ? 0 : -EFAULT)
#define DRM_COPY_FROM_USER_UNCHECKED(arg1, arg2, arg3) \
__copy_from_user(arg1, arg2, arg3)
#define DRM_COPY_TO_USER_UNCHECKED(arg1, arg2, arg3) \



2005-03-24 00:45:21

by Dave Airlie

[permalink] [raw]
Subject: Re: [PATCH] verify_area to access_ok conversion in drivers/char/drm/drm_os_linux.h


>
> verify_area is deprecated, replaced by access_ok.
> Seems I missed this one when I did the big overall conversion.
>
>
> Signed-off-by: Jesper Juhl <[email protected]>
>

In my tree for 2.6.12.. just have to fix the big clangers first..

Dave.