[Patch] Fix ATM copy-to-user usage in 2.4

From: Horms
Date: Wed Mar 23 2005 - 03:47:58 EST


Applologies if this is already pending, but the signdness fix for
atm_get_addr() in 2.6 seems to be needed for 2.4 as well.

This relates to the bugs reported in this document
http://www.guninski.com/where_do_you_want_billg_to_go_today_3.html

--
Horms

Backport of ATM copy-to-user signedness fix from 2.6

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

===== net/atm/addr.h 1.2 vs edited =====
--- 1.2/net/atm/addr.h 2002-02-05 16:39:14 +09:00
+++ edited/net/atm/addr.h 2005-03-23 13:40:46 +09:00
@@ -13,6 +13,6 @@
void atm_reset_addr(struct atm_dev *dev);
int atm_add_addr(struct atm_dev *dev,struct sockaddr_atmsvc *addr);
int atm_del_addr(struct atm_dev *dev,struct sockaddr_atmsvc *addr);
-int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc *u_buf,int size);
+int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc *u_buf,size_t size);

#endif
===== net/atm/addr.c 1.4 vs edited =====
--- 1.4/net/atm/addr.c 2003-09-04 12:31:04 +09:00
+++ edited/net/atm/addr.c 2005-03-23 13:41:03 +09:00
@@ -114,7 +114,7 @@
}


-int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc *u_buf,int size)
+int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc *u_buf,size_t size)
{
unsigned long flags;
struct atm_dev_addr *walk;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/