[linux-dvb] [Patch] Error in dvb_net.c on 64bit platforms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

Removing several dvb net interfaces as follows:

        /sbin/ifconfig dvb0_4 down
        /sbin/ifconfig dvb0_3 down
        /sbin/ifconfig dvb0_2 down
        /sbin/ifconfig dvb0_1 down
        /sbin/ifconfig dvb0_0 down

Always produces an oops on a 64 bit system. On a 32 bit system this is no
problem. Applying the attached patch makes it work on 64 bit systems.

Holger (Kiehl)
-- 
-------------- next part --------------
--- linux/drivers/media/dvb/dvb-core/dvb_net.c.orig	2005-08-12 15:37:59.000000000 +0000
+++ linux/drivers/media/dvb/dvb-core/dvb_net.c	2005-10-31 14:11:30.000000000 +0000
@@ -1213,7 +1213,7 @@
 	return if_num;
 }
 
-static int dvb_net_remove_if(struct dvb_net *dvbnet, unsigned int num)
+static int dvb_net_remove_if(struct dvb_net *dvbnet, unsigned long num)
 {
 	struct net_device *net = dvbnet->device[num];
 	struct dvb_net_priv *priv;
@@ -1287,9 +1287,9 @@
 
 		if (!capable(CAP_SYS_ADMIN))
 			return -EPERM;
-		if ((unsigned int) parg >= DVB_NET_DEVICES_MAX)
+		if ((unsigned long) parg >= DVB_NET_DEVICES_MAX)
 			return -EINVAL;
-		ret = dvb_net_remove_if(dvbnet, (unsigned int) parg);
+		ret = dvb_net_remove_if(dvbnet, (unsigned long) parg);
 		if (!ret)
 			module_put(dvbdev->adapter->module);
 		return ret;

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux