Julia Lawall
024cb8a67f
drivers/isdn: Use memdup_user
...
Use memdup_user when user data is immediately copied into the
allocated region.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/ )
// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@
- to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+ to = memdup_user(from,size);
if (
- to==NULL
+ IS_ERR(to)
|| ...) {
<+... when != goto l1;
- -ENOMEM
+ PTR_ERR(to)
...+>
}
- if (copy_from_user(to, from, size) != 0) {
- <+... when != goto l2;
- -EFAULT
- ...+>
- }
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2010-05-31 00:24:15 -07:00
..
2010-05-28 16:14:17 -07:00
2010-05-25 19:41:19 -04:00
2010-05-22 00:36:56 -06:00
2010-05-25 08:07:09 -07:00
2010-05-27 09:12:48 -07:00
2010-05-22 00:36:56 -06:00
2010-05-20 21:04:44 -07:00
2010-05-18 16:10:44 -06:00
2010-05-27 22:05:02 -04:00
2010-05-19 17:10:57 -07:00
2010-05-18 08:49:13 -07:00
2010-05-28 16:14:17 -07:00
2010-05-22 00:36:56 -06:00
2010-05-30 09:12:43 -07:00
2010-05-27 09:12:52 -07:00
2010-05-27 10:22:06 -07:00
2010-05-21 09:37:31 -07:00
2010-05-28 01:37:59 +02:00
2010-05-28 16:14:40 -07:00
2010-05-27 09:19:55 -07:00
2010-05-27 19:59:03 +02:00
2010-05-22 00:36:56 -06:00
2010-05-26 19:51:09 +02:00
2010-05-28 14:26:20 -04:00
2010-05-27 10:22:06 -07:00
2010-05-30 09:12:16 -07:00
2010-05-28 01:37:38 +02:00
2010-05-31 00:24:15 -07:00
2010-05-28 08:35:27 +01:00
2010-05-24 08:01:10 -07:00
2010-05-27 09:12:48 -07:00
2010-05-24 08:01:10 -07:00
2010-05-27 09:12:41 -07:00
2010-05-28 01:38:02 +02:00
2010-05-27 09:12:54 -07:00
2010-05-27 09:12:40 -07:00
2010-05-27 22:05:02 -04:00
2010-05-31 00:24:14 -07:00
2010-05-22 00:36:56 -06:00
2010-05-26 19:51:09 +02:00
2010-05-28 14:42:18 -07:00
2010-05-24 08:01:10 -07:00
2010-05-20 10:16:13 -04:00
2010-05-25 08:16:34 -07:00
2010-05-30 09:02:47 -07:00
2010-05-28 01:37:45 +02:00
2010-05-28 01:37:45 +02:00
2010-05-26 23:27:09 +02:00
2010-05-24 08:01:10 -07:00
2010-05-27 10:28:11 -07:00
2010-05-28 19:40:05 +09:00
2010-05-27 12:46:20 -04:00
2010-05-25 00:48:24 -06:00
2010-05-28 13:57:01 -04:00
2010-05-30 09:11:11 -07:00
2010-05-27 09:12:42 -07:00
2010-05-27 22:05:02 -04:00
2010-05-28 10:18:40 -07:00
2010-05-27 22:05:02 -04:00
2010-05-21 17:22:52 -07:00
2010-05-21 09:37:31 -07:00
2010-05-28 01:37:52 +02:00
2010-05-25 08:07:07 -07:00
2010-05-21 09:37:31 -07:00
2010-05-28 14:26:20 -04:00