another linux fix

This commit is contained in:
Alan Hourihane 2001-07-23 08:45:05 +00:00
parent f7bb776038
commit b854253533
2 changed files with 14 additions and 2 deletions

View file

@ -233,7 +233,13 @@ int DRM(addmap)( DRM_OS_IOCTL )
#endif
DRM_OS_UNLOCK;
DRM_OS_KRNTOUSR((drm_map_t *)data, *map, sizeof(*map) );
#ifdef __linux__
if ( copy_to_user( (drm_map_t *)data, map, sizeof(*map) ) )
DRM_OS_RETURN(EFAULT);
#endif
#ifdef __FreeBSD__
*(drm_map_t *)data = *map;
#endif
if ( map->type != _DRM_SHM ) {
#ifdef __linux__

View file

@ -233,7 +233,13 @@ int DRM(addmap)( DRM_OS_IOCTL )
#endif
DRM_OS_UNLOCK;
DRM_OS_KRNTOUSR((drm_map_t *)data, *map, sizeof(*map) );
#ifdef __linux__
if ( copy_to_user( (drm_map_t *)data, map, sizeof(*map) ) )
DRM_OS_RETURN(EFAULT);
#endif
#ifdef __FreeBSD__
*(drm_map_t *)data = *map;
#endif
if ( map->type != _DRM_SHM ) {
#ifdef __linux__