Commit 3608504 Al Viro
committed
1 parent a392948 commit 3608504 Copy full SHA for 3608504
File tree 1 file changed +3
-22
lines changed
1 file changed +3
-22
lines changed Original file line number Diff line number Diff line change @@ -251,32 +251,13 @@ static struct {
251
251
static int do_atm_iobuf (struct socket * sock , unsigned int cmd ,
252
252
unsigned long arg )
253
253
{
254
- struct atm_iobuf __user * iobuf ;
255
- struct compat_atm_iobuf __user * iobuf32 ;
254
+ struct compat_atm_iobuf __user * iobuf32 = compat_ptr (arg );
256
255
u32 data ;
257
- void __user * datap ;
258
- int len , err ;
259
-
260
- iobuf = compat_alloc_user_space (sizeof (* iobuf ));
261
- iobuf32 = compat_ptr (arg );
262
256
263
- if (get_user (len , & iobuf32 -> length ) ||
264
- get_user (data , & iobuf32 -> buffer ))
265
- return - EFAULT ;
266
- datap = compat_ptr (data );
267
- if (put_user (len , & iobuf -> length ) ||
268
- put_user (datap , & iobuf -> buffer ))
257
+ if (get_user (data , & iobuf32 -> buffer ))
269
258
return - EFAULT ;
270
259
271
- err = do_vcc_ioctl (sock , cmd , (unsigned long ) iobuf , 0 );
272
-
273
- if (!err ) {
274
- if (copy_in_user (& iobuf32 -> length , & iobuf -> length ,
275
- sizeof (int )))
276
- err = - EFAULT ;
277
- }
278
-
279
- return err ;
260
+ return atm_getnames (& iobuf32 -> length , compat_ptr (data ));
280
261
}
281
262
282
263
static int do_atmif_sioc (struct socket * sock , unsigned int cmd ,
You can’t perform that action at this time.
0 commit comments