summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:20:15 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:20:15 -0800
commit5bf3be033f504f5fd79690fbb13d720407314e40 (patch)
tree96b4fdb8c54f2477829c648e6078a0e54f5e7a6e /net
parent98b8803038fa999212c37952adad1e04144f0ab7 (diff)
v2.4.10.1 -> v2.4.10.2
- me/Al Viro: fix bdget() oops with block device modules that don't clean up after they exit - Alan Cox: continued merging (drivers, license tags) - David Miller: sparc update, network fixes - Christoph Hellwig: work around broken drivers that add a gendisk more than once - Jakub Jelinek: handle more ELF loading special cases - Trond Myklebust: NFS client and lockd reclaimer cleanups/fixes - Greg KH: USB updates - Mikael Pettersson: sparate out local APIC / IO-APIC config options
Diffstat (limited to 'net')
-rw-r--r--net/appletalk/aarp.c2
-rw-r--r--net/atm/common.c2
-rw-r--r--net/atm/lec.c1
-rw-r--r--net/atm/mpc.c1
-rw-r--r--net/bluetooth/hci_core.c2
-rw-r--r--net/bluetooth/l2cap_core.c2
-rw-r--r--net/bridge/br.c1
-rw-r--r--net/core/dev.c25
-rw-r--r--net/core/neighbour.c4
-rw-r--r--net/ipv4/devinet.c38
-rw-r--r--net/ipv4/inetpeer.c10
-rw-r--r--net/ipv4/ip_gre.c4
-rw-r--r--net/ipv4/ipconfig.c97
-rw-r--r--net/ipv4/ipip.c6
-rw-r--r--net/ipv4/netfilter/ip_conntrack_ftp.c1
-rw-r--r--net/ipv4/netfilter/ip_conntrack_standalone.c2
-rw-r--r--net/ipv4/netfilter/ip_nat_ftp.c1
-rw-r--r--net/ipv4/netfilter/ip_nat_standalone.c1
-rw-r--r--net/ipv4/netfilter/ip_queue.c2
-rw-r--r--net/ipv4/netfilter/ip_tables.c1
-rw-r--r--net/ipv4/netfilter/ipchains_core.c1
-rw-r--r--net/ipv4/netfilter/ipt_LOG.c1
-rw-r--r--net/ipv4/netfilter/ipt_MARK.c1
-rw-r--r--net/ipv4/netfilter/ipt_MASQUERADE.c1
-rw-r--r--net/ipv4/netfilter/ipt_MIRROR.c1
-rw-r--r--net/ipv4/netfilter/ipt_REDIRECT.c1
-rw-r--r--net/ipv4/netfilter/ipt_REJECT.c1
-rw-r--r--net/ipv4/netfilter/ipt_TCPMSS.c1
-rw-r--r--net/ipv4/netfilter/ipt_TOS.c1
-rw-r--r--net/ipv4/netfilter/ipt_limit.c1
-rw-r--r--net/ipv4/netfilter/ipt_mac.c1
-rw-r--r--net/ipv4/netfilter/ipt_mark.c1
-rw-r--r--net/ipv4/netfilter/ipt_multiport.c1
-rw-r--r--net/ipv4/netfilter/ipt_owner.c1
-rw-r--r--net/ipv4/netfilter/ipt_state.c1
-rw-r--r--net/ipv4/netfilter/ipt_tcpmss.c1
-rw-r--r--net/ipv4/netfilter/ipt_tos.c1
-rw-r--r--net/ipv4/netfilter/ipt_unclean.c1
-rw-r--r--net/ipv4/netfilter/iptable_filter.c1
-rw-r--r--net/ipv4/netfilter/iptable_mangle.c1
-rw-r--r--net/ipv4/tcp.c4
-rw-r--r--net/ipv4/tcp_input.c84
-rw-r--r--net/ipv4/tcp_ipv4.c4
-rw-r--r--net/ipv4/tcp_minisocks.c4
-rw-r--r--net/ipv4/tcp_output.c24
-rw-r--r--net/ipv4/tcp_timer.c11
-rw-r--r--net/ipv6/af_inet6.c1
-rw-r--r--net/ipv6/netfilter/ip6_tables.c1
-rw-r--r--net/ipv6/netfilter/ip6t_MARK.c1
-rw-r--r--net/ipv6/netfilter/ip6t_limit.c1
-rw-r--r--net/ipv6/netfilter/ip6t_mark.c1
-rw-r--r--net/ipv6/netfilter/ip6table_filter.c1
-rw-r--r--net/ipv6/netfilter/ip6table_mangle.c1
-rw-r--r--net/ipv6/sit.c3
-rw-r--r--net/ipv6/tcp_ipv6.c4
-rw-r--r--net/ipx/af_ipx.c1
-rw-r--r--net/irda/af_irda.c1
-rw-r--r--net/irda/ircomm/ircomm_core.c1
-rw-r--r--net/irda/ircomm/ircomm_tty.c1
-rw-r--r--net/irda/irlan/irlan_common.c1
-rw-r--r--net/irda/irnet/irnet_ppp.c2
-rw-r--r--net/sched/cls_fw.c1
-rw-r--r--net/sched/cls_route.c1
-rw-r--r--net/sched/cls_rsvp.c1
-rw-r--r--net/sched/cls_rsvp6.c1
-rw-r--r--net/sched/cls_tcindex.c1
-rw-r--r--net/sched/cls_u32.c1
-rw-r--r--net/sched/sch_cbq.c1
-rw-r--r--net/sched/sch_csz.c1
-rw-r--r--net/sched/sch_dsmark.c1
-rw-r--r--net/sched/sch_gred.c1
-rw-r--r--net/sched/sch_ingress.c1
-rw-r--r--net/sched/sch_prio.c1
-rw-r--r--net/sched/sch_red.c1
-rw-r--r--net/sched/sch_sfq.c1
-rw-r--r--net/sched/sch_tbf.c1
-rw-r--r--net/sched/sch_teql.c1
-rw-r--r--net/sunrpc/sched.c12
-rw-r--r--net/sunrpc/xdr.c2
-rw-r--r--net/wanrouter/af_wanpipe.c1
80 files changed, 271 insertions, 135 deletions
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c
index 3c399c826b51..f5048d1f7e13 100644
--- a/net/appletalk/aarp.c
+++ b/net/appletalk/aarp.c
@@ -58,6 +58,7 @@
#include <linux/atalk.h>
#include <linux/init.h>
#include <linux/proc_fs.h>
+#include <linux/module.h>
int sysctl_aarp_expiry_time = AARP_EXPIRY_TIME;
int sysctl_aarp_tick_time = AARP_TICK_TIME;
@@ -982,3 +983,4 @@ void aarp_unregister_proc_fs(void)
}
#endif
#endif /* CONFIG_ATALK || CONFIG_ATALK_MODULE */
+MODULE_LICENSE("GPL");
diff --git a/net/atm/common.c b/net/atm/common.c
index 37386ca2690f..1cb08448deaa 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -930,6 +930,8 @@ int atm_ioctl(struct socket *sock,unsigned int cmd,unsigned long arg)
if (size)
ret_val = put_user(size,&((struct atmif_sioc *) arg)->length) ?
-EFAULT : 0;
+ else
+ ret_val = 0;
done:
spin_unlock (&atm_dev_lock);
diff --git a/net/atm/lec.c b/net/atm/lec.c
index 275a8bc261e6..e481864a9f61 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -2193,3 +2193,4 @@ lec_arp_check_empties(struct lec_priv *priv,
lec_arp_put(priv->lec_arp_tables,entry);
lec_arp_unlock(priv);
}
+MODULE_LICENSE("GPL");
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index 69bec4cf34ef..c36bbaaeb0c5 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -1479,3 +1479,4 @@ void cleanup_module(void)
return;
}
#endif /* MODULE */
+MODULE_LICENSE("GPL");
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 75d0176980dc..575a9079597b 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2028,3 +2028,5 @@ int hci_core_cleanup(void)
{
return 0;
}
+
+MODULE_LICENSE("GPL");
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 73e0e4df1479..094feb068d39 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -2312,3 +2312,5 @@ module_exit(l2cap_cleanup);
MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
MODULE_DESCRIPTION("BlueZ L2CAP ver " VERSION);
+MODULE_LICENSE("GPL");
+
diff --git a/net/bridge/br.c b/net/bridge/br.c
index cda2e570aa5a..80f6807afd20 100644
--- a/net/bridge/br.c
+++ b/net/bridge/br.c
@@ -82,3 +82,4 @@ EXPORT_NO_SYMBOLS;
module_init(br_init)
module_exit(br_deinit)
+MODULE_LICENSE("GPL");
diff --git a/net/core/dev.c b/net/core/dev.c
index d39c4a03ccd7..4ab29669876e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -552,9 +552,32 @@ int dev_alloc_name(struct net_device *dev, const char *name)
{
int i;
char buf[32];
+ char *p, c;
/*
- * If you need over 100 please also fix the algorithm...
+ * Verify the string as this thing may have come from
+ * the user. There must be one "%d" and no other "%"
+ * characters.
+ */
+ p = name;
+ while ((c = *p++) != 0) {
+ if (c == '%') {
+ c = *p++;
+ if (c != 'd')
+ return -EINVAL;
+
+ while ((c = *p++) != 0) {
+ if (c == '%')
+ return -EINVAL;
+ }
+ goto name_ok;
+ }
+ }
+ return -EINVAL;
+
+ name_ok:
+ /*
+ * If you need over 100 please also fix the algorithm...
*/
for (i = 0; i < 100; i++) {
sprintf(buf,name,i);
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 3d76882a74c9..85b068fb3170 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -725,11 +725,11 @@ int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
if (skb) {
if (skb_queue_len(&neigh->arp_queue) >= neigh->parms->queue_len) {
struct sk_buff *buff;
- buff = neigh->arp_queue.prev;
+ buff = neigh->arp_queue.next;
__skb_unlink(buff, &neigh->arp_queue);
kfree_skb(buff);
}
- __skb_queue_head(&neigh->arp_queue, skb);
+ __skb_queue_tail(&neigh->arp_queue, skb);
}
write_unlock_bh(&neigh->lock);
return 1;
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index ac62692297c0..82d2cc50de75 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1,7 +1,7 @@
/*
* NET3 IP device support routines.
*
- * Version: $Id: devinet.c,v 1.42 2001/05/16 16:45:35 davem Exp $
+ * Version: $Id: devinet.c,v 1.43 2001/09/26 22:52:58 davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -20,6 +20,10 @@
* Changes:
* Alexey Kuznetsov: pa_* fields are replaced with ifaddr lists.
* Cyrus Durgin: updated for kmod
+ * Matthias Andree: in devinet_ioctl, compare label and
+ * address (4.4BSD alias style support),
+ * fall back to comparing just the label
+ * if no match found.
*/
#include <linux/config.h>
@@ -463,6 +467,7 @@ static __inline__ int inet_abc_len(u32 addr)
int devinet_ioctl(unsigned int cmd, void *arg)
{
struct ifreq ifr;
+ struct sockaddr_in sin_orig;
struct sockaddr_in *sin = (struct sockaddr_in *)&ifr.ifr_addr;
struct in_device *in_dev;
struct in_ifaddr **ifap = NULL;
@@ -470,6 +475,7 @@ int devinet_ioctl(unsigned int cmd, void *arg)
struct net_device *dev;
char *colon;
int ret = 0;
+ int tryaddrmatch = 0;
/*
* Fetch the caller's info block into kernel space
@@ -479,6 +485,9 @@ int devinet_ioctl(unsigned int cmd, void *arg)
return -EFAULT;
ifr.ifr_name[IFNAMSIZ-1] = 0;
+ /* save original address for comparison */
+ memcpy(&sin_orig, sin, sizeof(*sin));
+
colon = strchr(ifr.ifr_name, ':');
if (colon)
*colon = 0;
@@ -492,10 +501,11 @@ int devinet_ioctl(unsigned int cmd, void *arg)
case SIOCGIFBRDADDR: /* Get the broadcast address */
case SIOCGIFDSTADDR: /* Get the destination address */
case SIOCGIFNETMASK: /* Get the netmask for the interface */
- /* Note that this ioctls will not sleep,
+ /* Note that these ioctls will not sleep,
so that we do not impose a lock.
One day we will be forced to put shlock here (I mean SMP)
*/
+ tryaddrmatch = (sin_orig.sin_family == AF_INET);
memset(sin, 0, sizeof(*sin));
sin->sin_family = AF_INET;
break;
@@ -529,9 +539,27 @@ int devinet_ioctl(unsigned int cmd, void *arg)
*colon = ':';
if ((in_dev=__in_dev_get(dev)) != NULL) {
- for (ifap=&in_dev->ifa_list; (ifa=*ifap) != NULL; ifap=&ifa->ifa_next)
- if (strcmp(ifr.ifr_name, ifa->ifa_label) == 0)
- break;
+ if (tryaddrmatch) {
+ /* Matthias Andree */
+ /* compare label and address (4.4BSD style) */
+ /* note: we only do this for a limited set of ioctls
+ and only if the original address family was AF_INET.
+ This is checked above. */
+ for (ifap=&in_dev->ifa_list; (ifa=*ifap) != NULL; ifap=&ifa->ifa_next) {
+ if ((strcmp(ifr.ifr_name, ifa->ifa_label) == 0)
+ && (sin_orig.sin_addr.s_addr == ifa->ifa_address)) {
+ break; /* found */
+ }
+ }
+ }
+ /* we didn't get a match, maybe the application is
+ 4.3BSD-style and passed in junk so we fall back to
+ comparing just the label */
+ if (ifa == NULL) {
+ for (ifap=&in_dev->ifa_list; (ifa=*ifap) != NULL; ifap=&ifa->ifa_next)
+ if (strcmp(ifr.ifr_name, ifa->ifa_label) == 0)
+ break;
+ }
}
if (ifa == NULL && cmd != SIOCSIFADDR && cmd != SIOCSIFFLAGS) {
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index 514418f051eb..bc3af5838e7b 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -3,7 +3,7 @@
*
* This source is covered by the GNU GPL, the same as all kernel sources.
*
- * Version: $Id: inetpeer.c,v 1.6 2001/06/21 20:30:14 davem Exp $
+ * Version: $Id: inetpeer.c,v 1.7 2001/09/20 21:22:50 davem Exp $
*
* Authors: Andrey V. Savochkin <saw@msu.ru>
*/
@@ -67,6 +67,7 @@
* ip_id_count: idlock
*/
+/* Exported for inet_getid inline function. */
spinlock_t inet_peer_idlock = SPIN_LOCK_UNLOCKED;
static kmem_cache_t *peer_cachep;
@@ -83,10 +84,13 @@ static rwlock_t peer_pool_lock = RW_LOCK_UNLOCKED;
#define PEER_MAXDEPTH 40 /* sufficient for about 2^27 nodes */
static volatile int peer_total;
+/* Exported for sysctl_net_ipv4. */
int inet_peer_threshold = 65536 + 128; /* start to throw entries more
* aggressively at this stage */
int inet_peer_minttl = 120 * HZ; /* TTL under high load: 120 sec */
int inet_peer_maxttl = 10 * 60 * HZ; /* usual time to live: 10 min */
+
+/* Exported for inet_putpeer inline function. */
struct inet_peer *inet_peer_unused_head,
**inet_peer_unused_tailp = &inet_peer_unused_head;
spinlock_t inet_peer_unused_lock = SPIN_LOCK_UNLOCKED;
@@ -95,10 +99,12 @@ spinlock_t inet_peer_unused_lock = SPIN_LOCK_UNLOCKED;
static void peer_check_expire(unsigned long dummy);
static struct timer_list peer_periodic_timer =
{ { NULL, NULL }, 0, 0, &peer_check_expire };
+
+/* Exported for sysctl_net_ipv4. */
int inet_peer_gc_mintime = 10 * HZ,
inet_peer_gc_maxtime = 120 * HZ;
-
+/* Called from ip_output.c:ip_init */
void __init inet_initpeers(void)
{
struct sysinfo si;
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index fd7b3d226b58..ad4d70d01ee1 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -284,7 +284,7 @@ static struct ip_tunnel * ipgre_tunnel_locate(struct ip_tunnel_parm *parms, int
}
if (i==100)
goto failed;
- memcpy(parms->name, dev->name, IFNAMSIZ);
+ memcpy(nt->parms.name, dev->name, IFNAMSIZ);
}
if (register_netdevice(dev) < 0)
goto failed;
@@ -1011,6 +1011,7 @@ ipgre_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
err = -EPERM;
if (t == &ipgre_fb_tunnel)
goto done;
+ dev = t->dev;
}
err = unregister_netdevice(dev);
break;
@@ -1296,3 +1297,4 @@ void cleanup_module(void)
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 9dfe03e702c0..18210bb45a9f 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -1,5 +1,5 @@
/*
- * $Id: ipconfig.c,v 1.37 2001/04/30 18:54:12 davem Exp $
+ * $Id: ipconfig.c,v 1.38 2001/09/25 23:23:07 davem Exp $
*
* Automatic Configuration of IP -- use DHCP, BOOTP, RARP, or
* user-supplied information to configure own IP address and routes.
@@ -816,62 +816,67 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
u8 *ext;
#ifdef IPCONFIG_DHCP
-
- u32 server_id = INADDR_NONE;
- int mt = 0;
-
- ext = &b->exten[4];
- while (ext < end && *ext != 0xff) {
- u8 *opt = ext++;
- if (*opt == 0) /* Padding */
- continue;
- ext += *ext + 1;
- if (ext >= end)
- break;
- switch (*opt) {
- case 53: /* Message type */
- if (opt[1])
- mt = opt[2];
- break;
- case 54: /* Server ID (IP address) */
- if (opt[1] >= 4)
- memcpy(&server_id, opt + 2, 4);
- break;
+ if (ic_proto_enabled & IC_USE_DHCP) {
+ u32 server_id = INADDR_NONE;
+ int mt = 0;
+
+ ext = &b->exten[4];
+ while (ext < end && *ext != 0xff) {
+ u8 *opt = ext++;
+ if (*opt == 0) /* Padding */
+ continue;
+ ext += *ext + 1;
+ if (ext >= end)
+ break;
+ switch (*opt) {
+ case 53: /* Message type */
+ if (opt[1])
+ mt = opt[2];
+ break;
+ case 54: /* Server ID (IP address) */
+ if (opt[1] >= 4)
+ memcpy(&server_id, opt + 2, 4);
+ break;
+ };
}
- }
#ifdef IPCONFIG_DEBUG
- printk("DHCP: Got message type %d\n", mt);
+ printk("DHCP: Got message type %d\n", mt);
#endif
- switch (mt) {
- case DHCPOFFER:
- /* While in the process of accepting one offer,
- ignore all others. */
- if (ic_myaddr != INADDR_NONE)
- goto drop;
- /* Let's accept that offer. */
- ic_myaddr = b->your_ip;
- ic_servaddr = server_id;
+ switch (mt) {
+ case DHCPOFFER:
+ /* While in the process of accepting one offer,
+ * ignore all others.
+ */
+ if (ic_myaddr != INADDR_NONE)
+ goto drop;
+
+ /* Let's accept that offer. */
+ ic_myaddr = b->your_ip;
+ ic_servaddr = server_id;
#ifdef IPCONFIG_DEBUG
- printk("DHCP: Offered address %u.%u.%u.%u", NIPQUAD(ic_myaddr));
- printk(" by server %u.%u.%u.%u\n", NIPQUAD(ic_servaddr));
+ printk("DHCP: Offered address %u.%u.%u.%u",
+ NIPQUAD(ic_myaddr));
+ printk(" by server %u.%u.%u.%u\n",
+ NIPQUAD(ic_servaddr));
#endif
- break;
+ break;
- case DHCPACK:
- /* Yeah! */
- break;
+ case DHCPACK:
+ /* Yeah! */
+ break;
- default:
- /* Urque. Forget it*/
- ic_myaddr = INADDR_NONE;
- ic_servaddr = INADDR_NONE;
- goto drop;
- }
+ default:
+ /* Urque. Forget it*/
+ ic_myaddr = INADDR_NONE;
+ ic_servaddr = INADDR_NONE;
+ goto drop;
+ };
- ic_dhcp_msgtype = mt;
+ ic_dhcp_msgtype = mt;
+ }
#endif /* IPCONFIG_DHCP */
ext = &b->exten[4];
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index 19c4807b9a7f..29b6f50102fb 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -1,7 +1,7 @@
/*
* Linux NET3: IP/IP protocol decoder.
*
- * Version: $Id: ipip.c,v 1.47 2001/09/18 00:36:07 davem Exp $
+ * Version: $Id: ipip.c,v 1.49 2001/09/25 22:35:47 davem Exp $
*
* Authors:
* Sam Lantinga (slouken@cs.ucdavis.edu) 02/01/95
@@ -255,7 +255,7 @@ struct ip_tunnel * ipip_tunnel_locate(struct ip_tunnel_parm *parms, int create)
}
if (i==100)
goto failed;
- memcpy(parms->name, dev->name, IFNAMSIZ);
+ memcpy(nt->parms.name, dev->name, IFNAMSIZ);
}
if (register_netdevice(dev) < 0)
goto failed;
@@ -758,6 +758,7 @@ ipip_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
err = -EPERM;
if (t == &ipip_fb_tunnel)
goto done;
+ dev = t->dev;
}
err = unregister_netdevice(dev);
break;
@@ -903,3 +904,4 @@ static void __exit ipip_fini(void)
module_init(ipip_init);
#endif
module_exit(ipip_fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ip_conntrack_ftp.c b/net/ipv4/netfilter/ip_conntrack_ftp.c
index 8f7469cb71be..6de776d8dc9e 100644
--- a/net/ipv4/netfilter/ip_conntrack_ftp.c
+++ b/net/ipv4/netfilter/ip_conntrack_ftp.c
@@ -417,6 +417,7 @@ static int __init init(void)
EXPORT_SYMBOL(ip_ftp_lock);
EXPORT_SYMBOL(ip_conntrack_ftp);
+MODULE_LICENSE("GPL");
module_init(init);
module_exit(fini);
diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c
index 4a98c004927d..3c60c0d78ea1 100644
--- a/net/ipv4/netfilter/ip_conntrack_standalone.c
+++ b/net/ipv4/netfilter/ip_conntrack_standalone.c
@@ -33,6 +33,8 @@
#endif
struct module *ip_conntrack_module = THIS_MODULE;
+MODULE_LICENSE("GPL");
+
static unsigned int
print_tuple(char *buffer, const struct ip_conntrack_tuple *tuple,
diff --git a/net/ipv4/netfilter/ip_nat_ftp.c b/net/ipv4/netfilter/ip_nat_ftp.c
index f9cb9bebe4f1..26b27d5bb169 100644
--- a/net/ipv4/netfilter/ip_nat_ftp.c
+++ b/net/ipv4/netfilter/ip_nat_ftp.c
@@ -369,3 +369,4 @@ static int __init init(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ip_nat_standalone.c b/net/ipv4/netfilter/ip_nat_standalone.c
index 20982c479db5..f6e13323d43e 100644
--- a/net/ipv4/netfilter/ip_nat_standalone.c
+++ b/net/ipv4/netfilter/ip_nat_standalone.c
@@ -343,3 +343,4 @@ EXPORT_SYMBOL(ip_nat_cheat_check);
EXPORT_SYMBOL(ip_nat_mangle_tcp_packet);
EXPORT_SYMBOL(ip_nat_seq_adjust);
EXPORT_SYMBOL(ip_nat_delete_sack);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
index 6f6d5853a8ee..06949c2172be 100644
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -685,5 +685,7 @@ static void __exit fini(void)
}
MODULE_DESCRIPTION("IPv4 packet queue handler");
+MODULE_LICENSE("GPL");
+
module_init(init);
module_exit(fini);
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 3c430d0803bc..8a0477e4de3f 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -1764,3 +1764,4 @@ EXPORT_SYMBOL(ipt_unregister_target);
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipchains_core.c b/net/ipv4/netfilter/ipchains_core.c
index e4812aafd1b1..bf320445cd10 100644
--- a/net/ipv4/netfilter/ipchains_core.c
+++ b/net/ipv4/netfilter/ipchains_core.c
@@ -1765,3 +1765,4 @@ int ipfw_init_or_cleanup(int init)
#endif
return ret;
}
+MODULE_LICENSE("BSD without advertisement clause");
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
index c7f9dfe37cff..0c97dd27b0cc 100644
--- a/net/ipv4/netfilter/ipt_LOG.c
+++ b/net/ipv4/netfilter/ipt_LOG.c
@@ -353,3 +353,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_MARK.c b/net/ipv4/netfilter/ipt_MARK.c
index dd8bb322691c..63a998d6c719 100644
--- a/net/ipv4/netfilter/ipt_MARK.c
+++ b/net/ipv4/netfilter/ipt_MARK.c
@@ -64,3 +64,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c
index 38d619f387bc..82515c49a8f2 100644
--- a/net/ipv4/netfilter/ipt_MASQUERADE.c
+++ b/net/ipv4/netfilter/ipt_MASQUERADE.c
@@ -204,3 +204,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_MIRROR.c b/net/ipv4/netfilter/ipt_MIRROR.c
index 9449c5128691..d984d7e1fb9a 100644
--- a/net/ipv4/netfilter/ipt_MIRROR.c
+++ b/net/ipv4/netfilter/ipt_MIRROR.c
@@ -151,3 +151,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_REDIRECT.c b/net/ipv4/netfilter/ipt_REDIRECT.c
index 7954d273a26c..82d1e8be6b4c 100644
--- a/net/ipv4/netfilter/ipt_REDIRECT.c
+++ b/net/ipv4/netfilter/ipt_REDIRECT.c
@@ -105,3 +105,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c
index 8e46a2f875eb..787be9b2016b 100644
--- a/net/ipv4/netfilter/ipt_REJECT.c
+++ b/net/ipv4/netfilter/ipt_REJECT.c
@@ -374,3 +374,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_TCPMSS.c b/net/ipv4/netfilter/ipt_TCPMSS.c
index 9dd50740aea4..ced0a9dced52 100644
--- a/net/ipv4/netfilter/ipt_TCPMSS.c
+++ b/net/ipv4/netfilter/ipt_TCPMSS.c
@@ -243,3 +243,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_TOS.c b/net/ipv4/netfilter/ipt_TOS.c
index 2967ed241b7c..e6061d707ac5 100644
--- a/net/ipv4/netfilter/ipt_TOS.c
+++ b/net/ipv4/netfilter/ipt_TOS.c
@@ -83,3 +83,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_limit.c b/net/ipv4/netfilter/ipt_limit.c
index 6665f1ce475a..6f8124194d37 100644
--- a/net/ipv4/netfilter/ipt_limit.c
+++ b/net/ipv4/netfilter/ipt_limit.c
@@ -133,3 +133,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_mac.c b/net/ipv4/netfilter/ipt_mac.c
index ce280b3c2e8c..b18270ae6780 100644
--- a/net/ipv4/netfilter/ipt_mac.c
+++ b/net/ipv4/netfilter/ipt_mac.c
@@ -62,3 +62,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_mark.c b/net/ipv4/netfilter/ipt_mark.c
index b7528a4c237f..05066530ee5c 100644
--- a/net/ipv4/netfilter/ipt_mark.c
+++ b/net/ipv4/netfilter/ipt_mark.c
@@ -48,3 +48,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_multiport.c b/net/ipv4/netfilter/ipt_multiport.c
index b1727bb7c551..1d9b3c395434 100644
--- a/net/ipv4/netfilter/ipt_multiport.c
+++ b/net/ipv4/netfilter/ipt_multiport.c
@@ -101,3 +101,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_owner.c b/net/ipv4/netfilter/ipt_owner.c
index 7467dfaf0268..764c50b7ab7d 100644
--- a/net/ipv4/netfilter/ipt_owner.c
+++ b/net/ipv4/netfilter/ipt_owner.c
@@ -152,3 +152,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_state.c b/net/ipv4/netfilter/ipt_state.c
index 94f6bbfa5e08..1a273138a1e5 100644
--- a/net/ipv4/netfilter/ipt_state.c
+++ b/net/ipv4/netfilter/ipt_state.c
@@ -61,3 +61,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_tcpmss.c b/net/ipv4/netfilter/ipt_tcpmss.c
index 7dae37a33694..001f7a83777a 100644
--- a/net/ipv4/netfilter/ipt_tcpmss.c
+++ b/net/ipv4/netfilter/ipt_tcpmss.c
@@ -106,3 +106,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_tos.c b/net/ipv4/netfilter/ipt_tos.c
index dfbcb40e56cb..4f51305e1b5f 100644
--- a/net/ipv4/netfilter/ipt_tos.c
+++ b/net/ipv4/netfilter/ipt_tos.c
@@ -49,3 +49,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/ipt_unclean.c b/net/ipv4/netfilter/ipt_unclean.c
index 69d18834df3b..80b6c55dbb0e 100644
--- a/net/ipv4/netfilter/ipt_unclean.c
+++ b/net/ipv4/netfilter/ipt_unclean.c
@@ -583,3 +583,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/iptable_filter.c b/net/ipv4/netfilter/iptable_filter.c
index 8c21d6cd90f7..38b5f0257acf 100644
--- a/net/ipv4/netfilter/iptable_filter.c
+++ b/net/ipv4/netfilter/iptable_filter.c
@@ -179,3 +179,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/netfilter/iptable_mangle.c b/net/ipv4/netfilter/iptable_mangle.c
index cefcd79e6f0d..1c26b28f5013 100644
--- a/net/ipv4/netfilter/iptable_mangle.c
+++ b/net/ipv4/netfilter/iptable_mangle.c
@@ -204,3 +204,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 0093121215cc..21c7328091e4 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -5,7 +5,7 @@
*
* Implementation of the Transmission Control Protocol(TCP).
*
- * Version: $Id: tcp.c,v 1.211 2001/09/20 00:35:35 davem Exp $
+ * Version: $Id: tcp.c,v 1.212 2001/09/21 21:27:34 davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -852,7 +852,7 @@ ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset, size
page = pages[poffset/PAGE_SIZE];
offset = poffset % PAGE_SIZE;
- size = min_t(unsigned int, psize, PAGE_SIZE-offset);
+ size = min(psize, PAGE_SIZE-offset);
if (tp->send_head==NULL || (copy = mss_now - skb->len) <= 0) {
new_segment:
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index a8a17f063694..fd193c721fe7 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5,7 +5,7 @@
*
* Implementation of the Transmission Control Protocol(TCP).
*
- * Version: $Id: tcp_input.c,v 1.236 2001/09/18 22:29:09 davem Exp $
+ * Version: $Id: tcp_input.c,v 1.237 2001/09/21 21:27:34 davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -168,7 +168,7 @@ static void tcp_incr_quickack(struct tcp_opt *tp)
if (quickacks==0)
quickacks=2;
if (quickacks > tp->ack.quick)
- tp->ack.quick = min_t(unsigned int, quickacks, TCP_MAX_QUICKACKS);
+ tp->ack.quick = min(quickacks, TCP_MAX_QUICKACKS);
}
void tcp_enter_quickack_mode(struct tcp_opt *tp)
@@ -198,7 +198,7 @@ static void tcp_fixup_sndbuf(struct sock *sk)
int sndmem = tp->mss_clamp+MAX_TCP_HEADER+16+sizeof(struct sk_buff);
if (sk->sndbuf < 3*sndmem)
- sk->sndbuf = min_t(int, 3*sndmem, sysctl_tcp_wmem[2]);
+ sk->sndbuf = min(3*sndmem, sysctl_tcp_wmem[2]);
}
/* 2. Tuning advertised window (window_clamp, rcv_ssthresh)
@@ -262,7 +262,7 @@ tcp_grow_window(struct sock *sk, struct tcp_opt *tp, struct sk_buff *skb)
incr = __tcp_grow_window(sk, tp, skb);
if (incr) {
- tp->rcv_ssthresh = min_t(u32, tp->rcv_ssthresh + incr, tp->window_clamp);
+ tp->rcv_ssthresh = min(tp->rcv_ssthresh + incr, tp->window_clamp);
tp->ack.quick |= 1;
}
}
@@ -282,7 +282,7 @@ static void tcp_fixup_rcvbuf(struct sock *sk)
while (tcp_win_from_space(rcvmem) < tp->advmss)
rcvmem += 128;
if (sk->rcvbuf < 4*rcvmem)
- sk->rcvbuf = min_t(int, 4*rcvmem, sysctl_tcp_rmem[2]);
+ sk->rcvbuf = min(4*rcvmem, sysctl_tcp_rmem[2]);
}
/* 4. Try to fixup all. It is made iimediately after connection enters
@@ -304,16 +304,16 @@ static void tcp_init_buffer_space(struct sock *sk)
tp->window_clamp = maxwin;
if (sysctl_tcp_app_win && maxwin>4*tp->advmss)
- tp->window_clamp = max_t(u32, maxwin-(maxwin>>sysctl_tcp_app_win), 4*tp->advmss);
+ tp->window_clamp = max(maxwin-(maxwin>>sysctl_tcp_app_win), 4*tp->advmss);
}
/* Force reservation of one segment. */
if (sysctl_tcp_app_win &&
tp->window_clamp > 2*tp->advmss &&
tp->window_clamp + tp->advmss > maxwin)
- tp->window_clamp = max_t(u32, 2*tp->advmss, maxwin-tp->advmss);
+ tp->window_clamp = max(2*tp->advmss, maxwin-tp->advmss);
- tp->rcv_ssthresh = min_t(u32, tp->rcv_ssthresh, tp->window_clamp);
+ tp->rcv_ssthresh = min(tp->rcv_ssthresh, tp->window_clamp);
tp->snd_cwnd_stamp = tcp_time_stamp;
}
@@ -321,7 +321,7 @@ static void tcp_init_buffer_space(struct sock *sk)
static void tcp_clamp_window(struct sock *sk, struct tcp_opt *tp)
{
struct sk_buff *skb;
- int app_win = tp->rcv_nxt - tp->copied_seq;
+ unsigned int app_win = tp->rcv_nxt - tp->copied_seq;
int ofo_win = 0;
tp->ack.quick = 0;
@@ -338,7 +338,7 @@ static void tcp_clamp_window(struct sock *sk, struct tcp_opt *tp)
!(sk->userlocks&SOCK_RCVBUF_LOCK) &&
!tcp_memory_pressure &&
atomic_read(&tcp_memory_allocated) < sysctl_tcp_mem[0])
- sk->rcvbuf = min_t(int, atomic_read(&sk->rmem_alloc), sysctl_tcp_rmem[2]);
+ sk->rcvbuf = min(atomic_read(&sk->rmem_alloc), sysctl_tcp_rmem[2]);
}
if (atomic_read(&sk->rmem_alloc) > sk->rcvbuf) {
app_win += ofo_win;
@@ -346,11 +346,11 @@ static void tcp_clamp_window(struct sock *sk, struct tcp_opt *tp)
app_win >>= 1;
if (app_win > tp->ack.rcv_mss)
app_win -= tp->ack.rcv_mss;
- app_win = max_t(unsigned int, app_win, 2*tp->advmss);
+ app_win = max(app_win, 2U*tp->advmss);
if (!ofo_win)
- tp->window_clamp = min_t(u32, tp->window_clamp, app_win);
- tp->rcv_ssthresh = min_t(u32, tp->window_clamp, 2*tp->advmss);
+ tp->window_clamp = min(tp->window_clamp, app_win);
+ tp->rcv_ssthresh = min(tp->window_clamp, 2U*tp->advmss);
}
}
@@ -472,7 +472,7 @@ static __inline__ void tcp_rtt_estimator(struct tcp_opt *tp, __u32 mrtt)
/* no previous measure. */
tp->srtt = m<<3; /* take the measured time to be rtt */
tp->mdev = m<<2; /* make sure rto = 3*rtt */
- tp->mdev_max = tp->rttvar = max_t(u32, tp->mdev, TCP_RTO_MIN);
+ tp->mdev_max = tp->rttvar = max(tp->mdev, TCP_RTO_MIN);
tp->rtt_seq = tp->snd_nxt;
}
}
@@ -575,7 +575,7 @@ void tcp_update_metrics(struct sock *sk)
tp->ca_state == TCP_CA_Open) {
/* Cong. avoidance phase, cwnd is reliable. */
if (!(dst->mxlock&(1<<RTAX_SSTHRESH)))
- dst->ssthresh = max_t(u32, tp->snd_cwnd>>1, tp->snd_ssthresh);
+ dst->ssthresh = max(tp->snd_cwnd>>1, tp->snd_ssthresh);
if (!(dst->mxlock&(1<<RTAX_CWND)))
dst->cwnd = (dst->cwnd + tp->snd_cwnd)>>1;
} else {
@@ -617,7 +617,7 @@ __u32 tcp_init_cwnd(struct tcp_opt *tp)
else if (cwnd > tp->snd_ssthresh)
cwnd = tp->snd_ssthresh;
- return min_t(u32, cwnd, tp->snd_cwnd_clamp);
+ return min_t(__u32, cwnd, tp->snd_cwnd_clamp);
}
/* Initialize metrics on socket. */
@@ -668,7 +668,7 @@ static void tcp_init_metrics(struct sock *sk)
tp->srtt = dst->rtt;
if (dst->rttvar > tp->mdev) {
tp->mdev = dst->rttvar;
- tp->mdev_max = tp->rttvar = max_t(u32, tp->mdev, TCP_RTO_MIN);
+ tp->mdev_max = tp->rttvar = max(tp->mdev, TCP_RTO_MIN);
}
tcp_set_rto(tp);
tcp_bound_rto(tp);
@@ -693,7 +693,7 @@ reset:
static void tcp_update_reordering(struct tcp_opt *tp, int metric, int ts)
{
if (metric > tp->reordering) {
- tp->reordering = min_t(unsigned int, TCP_MAX_REORDERING, metric);
+ tp->reordering = min(TCP_MAX_REORDERING, metric);
/* This exciting event is worth to be remembered. 8) */
if (ts)
@@ -848,12 +848,12 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
if (sacked&TCPCB_RETRANS) {
if ((dup_sack && in_sack) &&
(sacked&TCPCB_SACKED_ACKED))
- reord = min_t(int, fack_count, reord);
+ reord = min(fack_count, reord);
} else {
/* If it was in a hole, we detected reordering. */
if (fack_count < prior_fackets &&
!(sacked&TCPCB_SACKED_ACKED))
- reord = min_t(int, fack_count, reord);
+ reord = min(fack_count, reord);
}
/* Nothing to do; acked frame is about to be dropped. */
@@ -885,7 +885,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
*/
if (!(sacked & TCPCB_RETRANS) &&
fack_count < prior_fackets)
- reord = min_t(int, fack_count, reord);
+ reord = min(fack_count, reord);
if (sacked & TCPCB_LOST) {
TCP_SKB_CB(skb)->sacked &= ~TCPCB_LOST;
@@ -901,7 +901,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
tp->fackets_out = fack_count;
} else {
if (dup_sack && (sacked&TCPCB_RETRANS))
- reord = min_t(int, fack_count, reord);
+ reord = min(fack_count, reord);
}
/* D-SACK. We can detect redundant retransmission
@@ -1177,7 +1177,7 @@ tcp_time_to_recover(struct sock *sk, struct tcp_opt *tp)
* recovery more?
*/
if (tp->packets_out <= tp->reordering &&
- tp->sacked_out >= max_t(u32, tp->packets_out/2, sysctl_tcp_reordering) &&
+ tp->sacked_out >= max_t(__u32, tp->packets_out/2, sysctl_tcp_reordering) &&
!tcp_may_send_now(sk, tp)) {
/* We have nothing to send. This connection is limited
* either by receiver window or by application.
@@ -1194,9 +1194,10 @@ tcp_time_to_recover(struct sock *sk, struct tcp_opt *tp)
*/
static void tcp_check_reno_reordering(struct tcp_opt *tp, int addend)
{
- u32 holes = min_t(unsigned int,
- max_t(unsigned int, tp->lost_out, 1),
- tp->packets_out);
+ u32 holes;
+
+ holes = max(tp->lost_out, 1U);
+ holes = min(holes, tp->packets_out);
if (tp->sacked_out + holes > tp->packets_out) {
tp->sacked_out = tp->packets_out - holes;
@@ -1291,7 +1292,7 @@ static void tcp_update_scoreboard(struct sock *sk, struct tcp_opt *tp)
*/
static __inline__ void tcp_moderate_cwnd(struct tcp_opt *tp)
{
- tp->snd_cwnd = min_t(u32, tp->snd_cwnd,
+ tp->snd_cwnd = min(tp->snd_cwnd,
tcp_packets_in_flight(tp)+tcp_max_burst(tp));
tp->snd_cwnd_stamp = tcp_time_stamp;
}
@@ -1308,7 +1309,7 @@ static void tcp_cwnd_down(struct tcp_opt *tp)
if (decr && tp->snd_cwnd > tp->snd_ssthresh/2)
tp->snd_cwnd -= decr;
- tp->snd_cwnd = min_t(u32, tp->snd_cwnd, tcp_packets_in_flight(tp)+1);
+ tp->snd_cwnd = min(tp->snd_cwnd, tcp_packets_in_flight(tp)+1);
tp->snd_cwnd_stamp = tcp_time_stamp;
}
@@ -1340,15 +1341,14 @@ static void DBGUNDO(struct sock *sk, struct tcp_opt *tp, const char *msg)
static void tcp_undo_cwr(struct tcp_opt *tp, int undo)
{
if (tp->prior_ssthresh) {
- tp->snd_cwnd = max_t(unsigned int,
- tp->snd_cwnd, tp->snd_ssthresh<<1);
+ tp->snd_cwnd = max(tp->snd_cwnd, tp->snd_ssthresh<<1);
if (undo && tp->prior_ssthresh > tp->snd_ssthresh) {
tp->snd_ssthresh = tp->prior_ssthresh;
TCP_ECN_withdraw_cwr(tp);
}
} else {
- tp->snd_cwnd = max_t(unsigned int, tp->snd_cwnd, tp->snd_ssthresh);
+ tp->snd_cwnd = max(tp->snd_cwnd, tp->snd_ssthresh);
}
tcp_moderate_cwnd(tp);
tp->snd_cwnd_stamp = tcp_time_stamp;
@@ -1450,7 +1450,7 @@ static int tcp_try_undo_loss(struct sock *sk, struct tcp_opt *tp)
static __inline__ void tcp_complete_cwr(struct tcp_opt *tp)
{
- tp->snd_cwnd = min_t(u32, tp->snd_cwnd, tp->snd_ssthresh);
+ tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh);
tp->snd_cwnd_stamp = tcp_time_stamp;
}
@@ -1836,7 +1836,7 @@ static void tcp_ack_probe(struct sock *sk)
*/
} else {
tcp_reset_xmit_timer(sk, TCP_TIME_PROBE0,
- min_t(u32, tp->rto << tp->backoff, TCP_RTO_MAX));
+ min(tp->rto << tp->backoff, TCP_RTO_MAX));
}
}
@@ -2323,7 +2323,7 @@ static __inline__ void tcp_dsack_set(struct tcp_opt *tp, u32 seq, u32 end_seq)
tp->dsack = 1;
tp->duplicate_sack[0].start_seq = seq;
tp->duplicate_sack[0].end_seq = end_seq;
- tp->eff_sacks = min_t(unsigned int, tp->num_sacks+1, 4-tp->tstamp_ok);
+ tp->eff_sacks = min(tp->num_sacks+1, 4-tp->tstamp_ok);
}
}
@@ -2376,7 +2376,7 @@ static void tcp_sack_maybe_coalesce(struct tcp_opt *tp)
* Decrease num_sacks.
*/
tp->num_sacks--;
- tp->eff_sacks = min_t(unsigned int, tp->num_sacks+tp->dsack, 4-tp->tstamp_ok);
+ tp->eff_sacks = min(tp->num_sacks+tp->dsack, 4-tp->tstamp_ok);
for(i=this_sack; i < tp->num_sacks; i++)
sp[i] = sp[i+1];
continue;
@@ -2438,7 +2438,7 @@ new_sack:
sp->start_seq = seq;
sp->end_seq = end_seq;
tp->num_sacks++;
- tp->eff_sacks = min_t(unsigned int, tp->num_sacks+tp->dsack, 4-tp->tstamp_ok);
+ tp->eff_sacks = min(tp->num_sacks+tp->dsack, 4-tp->tstamp_ok);
}
/* RCV.NXT advances, some SACKs should be eaten. */
@@ -2475,7 +2475,7 @@ static void tcp_sack_remove(struct tcp_opt *tp)
}
if (num_sacks != tp->num_sacks) {
tp->num_sacks = num_sacks;
- tp->eff_sacks = min_t(unsigned int, tp->num_sacks+tp->dsack, 4-tp->tstamp_ok);
+ tp->eff_sacks = min(tp->num_sacks+tp->dsack, 4-tp->tstamp_ok);
}
}
@@ -2807,7 +2807,7 @@ tcp_collapse(struct sock *sk, struct sk_buff *head,
if (offset < 0) BUG();
if (size > 0) {
- size = min_t(int, copy, size);
+ size = min(copy, size);
if (skb_copy_bits(skb, offset, skb_put(nskb, size), size))
BUG();
TCP_SKB_CB(nskb)->end_seq += size;
@@ -2886,7 +2886,7 @@ static int tcp_prune_queue(struct sock *sk)
if (atomic_read(&sk->rmem_alloc) >= sk->rcvbuf)
tcp_clamp_window(sk, tp);
else if (tcp_memory_pressure)
- tp->rcv_ssthresh = min_t(u32, tp->rcv_ssthresh, 4*tp->advmss);
+ tp->rcv_ssthresh = min(tp->rcv_ssthresh, 4U*tp->advmss);
tcp_collapse_ofo_queue(sk);
tcp_collapse(sk, sk->receive_queue.next,
@@ -2941,7 +2941,7 @@ void tcp_cwnd_application_limited(struct sock *sk)
if (tp->ca_state == TCP_CA_Open &&
sk->socket && !test_bit(SOCK_NOSPACE, &sk->socket->flags)) {
/* Limited by application or receiver window. */
- u32 win_used = max_t(u32, tp->snd_cwnd_used, 2);
+ u32 win_used = max(tp->snd_cwnd_used, 2U);
if (win_used < tp->snd_cwnd) {
tp->snd_ssthresh = tcp_current_ssthresh(tp);
tp->snd_cwnd = (tp->snd_cwnd+win_used)>>1;
@@ -2970,7 +2970,7 @@ static void tcp_new_space(struct sock *sk)
demanded = max_t(unsigned int, tp->snd_cwnd, tp->reordering+1);
sndmem *= 2*demanded;
if (sndmem > sk->sndbuf)
- sk->sndbuf = min_t(int, sndmem, sysctl_tcp_wmem[2]);
+ sk->sndbuf = min(sndmem, sysctl_tcp_wmem[2]);
tp->snd_cwnd_stamp = tcp_time_stamp;
}
@@ -3520,7 +3520,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
if (tp->wscale_ok == 0) {
tp->snd_wscale = tp->rcv_wscale = 0;
- tp->window_clamp = min_t(u32, tp->window_clamp, 65535);
+ tp->window_clamp = min(tp->window_clamp, 65535U);
}
if (tp->saw_tstamp) {
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index a60c4057646d..69455b35eabd 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -5,7 +5,7 @@
*
* Implementation of the Transmission Control Protocol(TCP).
*
- * Version: $Id: tcp_ipv4.c,v 1.230 2001/09/01 00:31:50 davem Exp $
+ * Version: $Id: tcp_ipv4.c,v 1.231 2001/09/26 23:38:47 davem Exp $
*
* IPv4 specific functions
*
@@ -1486,7 +1486,7 @@ static struct sock *tcp_v4_hnd_req(struct sock *sk,struct sk_buff *skb)
bh_lock_sock(nsk);
return nsk;
}
- tcp_tw_put((struct tcp_tw_bucket*)sk);
+ tcp_tw_put((struct tcp_tw_bucket*)nsk);
return NULL;
}
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 8ace4da5d89a..8697cb25eefb 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -5,7 +5,7 @@
*
* Implementation of the Transmission Control Protocol(TCP).
*
- * Version: $Id: tcp_minisocks.c,v 1.13 2001/09/18 22:29:10 davem Exp $
+ * Version: $Id: tcp_minisocks.c,v 1.14 2001/09/21 21:27:34 davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -766,7 +766,7 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct open_request *req,
newtp->rcv_wscale = req->rcv_wscale;
} else {
newtp->snd_wscale = newtp->rcv_wscale = 0;
- newtp->window_clamp = min_t(u32, newtp->window_clamp, 65535);
+ newtp->window_clamp = min(newtp->window_clamp, 65535U);
}
newtp->snd_wnd = ntohs(skb->h.th->window) << newtp->snd_wscale;
newtp->max_window = newtp->snd_wnd;
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index c1210dd392a5..a3844e347564 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -5,7 +5,7 @@
*
* Implementation of the Transmission Control Protocol(TCP).
*
- * Version: $Id: tcp_output.c,v 1.141 2001/09/18 22:29:10 davem Exp $
+ * Version: $Id: tcp_output.c,v 1.142 2001/09/21 21:27:34 davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -105,11 +105,11 @@ static void tcp_cwnd_restart(struct tcp_opt *tp)
u32 cwnd = tp->snd_cwnd;
tp->snd_ssthresh = tcp_current_ssthresh(tp);
- restart_cwnd = min_t(u32, restart_cwnd, cwnd);
+ restart_cwnd = min(restart_cwnd, cwnd);
while ((delta -= tp->rto) > 0 && cwnd > restart_cwnd)
cwnd >>= 1;
- tp->snd_cwnd = max_t(u32, cwnd, restart_cwnd);
+ tp->snd_cwnd = max(cwnd, restart_cwnd);
tp->snd_cwnd_stamp = tcp_time_stamp;
tp->snd_cwnd_used = 0;
}
@@ -526,7 +526,7 @@ int tcp_sync_mss(struct sock *sk, u32 pmtu)
/* Bound mss with half of window */
if (tp->max_window && mss_now > (tp->max_window>>1))
- mss_now = max_t(u32, (tp->max_window>>1), 68 - tp->tcp_header_len);
+ mss_now = max((tp->max_window>>1), 68U - tp->tcp_header_len);
/* And store cached results */
tp->pmtu_cookie = pmtu;
@@ -651,7 +651,7 @@ u32 __tcp_select_window(struct sock *sk)
*/
int mss = tp->ack.rcv_mss;
int free_space = tcp_space(sk);
- int full_space = min_t(unsigned int, tp->window_clamp, tcp_full_space(sk));
+ int full_space = min_t(int, tp->window_clamp, tcp_full_space(sk));
int window;
if (mss > full_space)
@@ -661,7 +661,7 @@ u32 __tcp_select_window(struct sock *sk)
tp->ack.quick = 0;
if (tcp_memory_pressure)
- tp->rcv_ssthresh = min_t(u32, tp->rcv_ssthresh, 4*tp->advmss);
+ tp->rcv_ssthresh = min(tp->rcv_ssthresh, 4U*tp->advmss);
if (free_space < mss)
return 0;
@@ -817,7 +817,7 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
/* Do not sent more than we queued. 1/4 is reserved for possible
* copying overhead: frgagmentation, tunneling, mangling etc.
*/
- if (atomic_read(&sk->wmem_alloc) > min_t(int, sk->wmem_queued+(sk->wmem_queued>>2),sk->sndbuf))
+ if (atomic_read(&sk->wmem_alloc) > min(sk->wmem_queued+(sk->wmem_queued>>2),sk->sndbuf))
return -EAGAIN;
/* If receiver has shrunk his window, and skb is out of
@@ -1264,13 +1264,13 @@ void tcp_send_delayed_ack(struct sock *sk)
* directly.
*/
if (tp->srtt) {
- int rtt = max_t(unsigned int, tp->srtt>>3, TCP_DELACK_MIN);
+ int rtt = max(tp->srtt>>3, TCP_DELACK_MIN);
if (rtt < max_ato)
max_ato = rtt;
}
- ato = min_t(int, ato, max_ato);
+ ato = min(ato, max_ato);
}
/* Stay within the limit we were given */
@@ -1386,7 +1386,7 @@ int tcp_write_wakeup(struct sock *sk)
*/
if (seg_size < TCP_SKB_CB(skb)->end_seq - TCP_SKB_CB(skb)->seq ||
skb->len > mss) {
- seg_size = min_t(int, seg_size, mss);
+ seg_size = min(seg_size, mss);
TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH;
if (tcp_fragment(sk, skb, seg_size))
return -1;
@@ -1429,7 +1429,7 @@ void tcp_send_probe0(struct sock *sk)
tp->backoff++;
tp->probes_out++;
tcp_reset_xmit_timer (sk, TCP_TIME_PROBE0,
- min_t(u32, tp->rto << tp->backoff, TCP_RTO_MAX));
+ min(tp->rto << tp->backoff, TCP_RTO_MAX));
} else {
/* If packet was not sent due to local congestion,
* do not backoff and do not remember probes_out.
@@ -1440,6 +1440,6 @@ void tcp_send_probe0(struct sock *sk)
if (!tp->probes_out)
tp->probes_out=1;
tcp_reset_xmit_timer (sk, TCP_TIME_PROBE0,
- min_t(unsigned int, tp->rto << tp->backoff, TCP_RESOURCE_PROBE_INTERVAL));
+ min(tp->rto << tp->backoff, TCP_RESOURCE_PROBE_INTERVAL));
}
}
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index b867d766e281..a0cdd875397f 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -5,7 +5,7 @@
*
* Implementation of the Transmission Control Protocol(TCP).
*
- * Version: $Id: tcp_timer.c,v 1.86 2001/09/18 22:29:10 davem Exp $
+ * Version: $Id: tcp_timer.c,v 1.87 2001/09/21 21:27:34 davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -248,7 +248,7 @@ static void tcp_delack_timer(unsigned long data)
if (tcp_ack_scheduled(tp)) {
if (!tp->ack.pingpong) {
/* Delayed ACK missed: inflate ATO. */
- tp->ack.ato = min_t(u32, tp->ack.ato << 1, tp->rto);
+ tp->ack.ato = min(tp->ack.ato << 1, tp->rto);
} else {
/* Delayed ACK missed: leave pingpong mode and
* deflate ATO.
@@ -381,7 +381,7 @@ static void tcp_retransmit_timer(struct sock *sk)
if (!tp->retransmits)
tp->retransmits=1;
tcp_reset_xmit_timer(sk, TCP_TIME_RETRANS,
- min_t(u32, tp->rto, TCP_RESOURCE_PROBE_INTERVAL));
+ min(tp->rto, TCP_RESOURCE_PROBE_INTERVAL));
goto out;
}
@@ -404,7 +404,7 @@ static void tcp_retransmit_timer(struct sock *sk)
tp->retransmits++;
out_reset_timer:
- tp->rto = min_t(u32, tp->rto << 1, TCP_RTO_MAX);
+ tp->rto = min(tp->rto << 1, TCP_RTO_MAX);
tcp_reset_xmit_timer(sk, TCP_TIME_RETRANS, tp->rto);
if (tp->retransmits > sysctl_tcp_retries1)
__sk_dst_reset(sk);
@@ -517,8 +517,7 @@ static void tcp_synack_timer(struct sock *sk)
if (req->retrans++ == 0)
lopt->qlen_young--;
- timeo = min_t(unsigned long,
- (TCP_TIMEOUT_INIT << req->retrans),
+ timeo = min((TCP_TIMEOUT_INIT << req->retrans),
TCP_RTO_MAX);
req->expires = now + timeo;
reqp = &req->dl_next;
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 5e9ec1c2ac5b..2c297fd633f9 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -718,3 +718,4 @@ static void inet6_exit(void)
}
module_exit(inet6_exit);
#endif /* MODULE */
+MODULE_LICENSE("GPL");
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 20a668c43339..42a8498136fe 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -1801,3 +1801,4 @@ EXPORT_SYMBOL(ip6t_unregister_target);
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv6/netfilter/ip6t_MARK.c b/net/ipv6/netfilter/ip6t_MARK.c
index 08df336e811f..1bd758fc3221 100644
--- a/net/ipv6/netfilter/ip6t_MARK.c
+++ b/net/ipv6/netfilter/ip6t_MARK.c
@@ -65,3 +65,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv6/netfilter/ip6t_limit.c b/net/ipv6/netfilter/ip6t_limit.c
index 0d79a9a8bd73..fca374dbd363 100644
--- a/net/ipv6/netfilter/ip6t_limit.c
+++ b/net/ipv6/netfilter/ip6t_limit.c
@@ -133,3 +133,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv6/netfilter/ip6t_mark.c b/net/ipv6/netfilter/ip6t_mark.c
index 9a78b1ca269f..6a7b61cc0b99 100644
--- a/net/ipv6/netfilter/ip6t_mark.c
+++ b/net/ipv6/netfilter/ip6t_mark.c
@@ -48,3 +48,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv6/netfilter/ip6table_filter.c b/net/ipv6/netfilter/ip6table_filter.c
index 33de64cc9847..3d922ab36555 100644
--- a/net/ipv6/netfilter/ip6table_filter.c
+++ b/net/ipv6/netfilter/ip6table_filter.c
@@ -181,3 +181,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv6/netfilter/ip6table_mangle.c b/net/ipv6/netfilter/ip6table_mangle.c
index 612c292c4668..da87bbb3e8a8 100644
--- a/net/ipv6/netfilter/ip6table_mangle.c
+++ b/net/ipv6/netfilter/ip6table_mangle.c
@@ -187,3 +187,4 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);
+MODULE_LICENSE("GPL");
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 981e1c9d5e8a..b3cc361c9ca2 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -6,7 +6,7 @@
* Pedro Roque <roque@di.fc.ul.pt>
* Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
*
- * $Id: sit.c,v 1.52 2001/09/01 00:31:50 davem Exp $
+ * $Id: sit.c,v 1.53 2001/09/25 05:09:53 davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -712,6 +712,7 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
err = -EPERM;
if (t == &ipip6_fb_tunnel)
goto done;
+ dev = t->dev;
}
err = unregister_netdevice(dev);
break;
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 33e9cb1ec507..899f658575a2 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -5,7 +5,7 @@
* Authors:
* Pedro Roque <roque@di.fc.ul.pt>
*
- * $Id: tcp_ipv6.c,v 1.138 2001/09/01 00:31:50 davem Exp $
+ * $Id: tcp_ipv6.c,v 1.139 2001/09/26 23:38:47 davem Exp $
*
* Based on:
* linux/net/ipv4/tcp.c
@@ -1098,7 +1098,7 @@ static struct sock *tcp_v6_hnd_req(struct sock *sk,struct sk_buff *skb)
bh_lock_sock(nsk);
return nsk;
}
- tcp_tw_put((struct tcp_tw_bucket*)sk);
+ tcp_tw_put((struct tcp_tw_bucket*)nsk);
return NULL;
}
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index 263795d7b2c3..163dc0bdca38 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -2637,3 +2637,4 @@ static void __exit ipx_proto_finito(void)
}
module_exit(ipx_proto_finito);
+MODULE_LICENSE("GPL");
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index f9fe554430c5..358637933205 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -2571,6 +2571,7 @@ module_exit(irda_proto_cleanup);
MODULE_AUTHOR("Dag Brattli <dagb@cs.uit.no>");
MODULE_DESCRIPTION("The Linux IrDA Protocol Subsystem");
+MODULE_LICENSE("GPL");
#ifdef CONFIG_IRDA_DEBUG
MODULE_PARM(irda_debug, "1l");
#endif
diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c
index bc791de5fbfd..6346d82488ae 100644
--- a/net/irda/ircomm/ircomm_core.c
+++ b/net/irda/ircomm/ircomm_core.c
@@ -514,6 +514,7 @@ int ircomm_proc_read(char *buf, char **start, off_t offset, int len)
#ifdef MODULE
MODULE_AUTHOR("Dag Brattli <dag@brattli.net>");
MODULE_DESCRIPTION("IrCOMM protocol");
+MODULE_LICENSE("GPL");
int init_module(void)
{
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
index eb711c50e36c..7104eb14bb56 100644
--- a/net/irda/ircomm/ircomm_tty.c
+++ b/net/irda/ircomm/ircomm_tty.c
@@ -1363,6 +1363,7 @@ done:
#ifdef MODULE
MODULE_AUTHOR("Dag Brattli <dagb@cs.uit.no>");
MODULE_DESCRIPTION("IrCOMM serial TTY driver");
+MODULE_LICENSE("GPL");
int init_module(void)
{
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c
index 6afae7405793..18ca9dbdae73 100644
--- a/net/irda/irlan/irlan_common.c
+++ b/net/irda/irlan/irlan_common.c
@@ -1184,6 +1184,7 @@ void irlan_mod_dec_use_count(void)
MODULE_AUTHOR("Dag Brattli <dagb@cs.uit.no>");
MODULE_DESCRIPTION("The Linux IrDA LAN protocol");
+MODULE_LICENSE("GPL");
MODULE_PARM(eth, "i");
MODULE_PARM_DESC(eth, "Name devices ethX (0) or irlanX (1)");
diff --git a/net/irda/irnet/irnet_ppp.c b/net/irda/irnet/irnet_ppp.c
index cc27e20aa5f8..8a8f9aad845a 100644
--- a/net/irda/irnet/irnet_ppp.c
+++ b/net/irda/irnet/irnet_ppp.c
@@ -14,6 +14,7 @@
*/
#include "irnet_ppp.h" /* Private header */
+#include <linux/module.h>
/************************* CONTROL CHANNEL *************************/
/*
@@ -1095,3 +1096,4 @@ cleanup_module(void)
return ppp_irnet_cleanup();
}
#endif /* MODULE */
+MODULE_LICENSE("GPL");
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
index 31dedf1eaae7..3bd3dfcc2762 100644
--- a/net/sched/cls_fw.c
+++ b/net/sched/cls_fw.c
@@ -383,3 +383,4 @@ void cleanup_module(void)
unregister_tcf_proto_ops(&cls_fw_ops);
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c
index 60cdf0ea6999..1bde988d391f 100644
--- a/net/sched/cls_route.c
+++ b/net/sched/cls_route.c
@@ -638,3 +638,4 @@ void cleanup_module(void)
unregister_tcf_proto_ops(&cls_route4_ops);
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/sched/cls_rsvp.c b/net/sched/cls_rsvp.c
index 8388aee4c019..05a937b59032 100644
--- a/net/sched/cls_rsvp.c
+++ b/net/sched/cls_rsvp.c
@@ -39,3 +39,4 @@
#define RSVP_OPS cls_rsvp_ops
#include "cls_rsvp.h"
+MODULE_LICENSE("GPL");
diff --git a/net/sched/cls_rsvp6.c b/net/sched/cls_rsvp6.c
index 0699602134ce..85ed7b400bb4 100644
--- a/net/sched/cls_rsvp6.c
+++ b/net/sched/cls_rsvp6.c
@@ -40,3 +40,4 @@
#define RSVP_OPS cls_rsvp6_ops
#include "cls_rsvp.h"
+MODULE_LICENSE("GPL");
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c
index 750eb46722db..babb9a721dfe 100644
--- a/net/sched/cls_tcindex.c
+++ b/net/sched/cls_tcindex.c
@@ -515,3 +515,4 @@ void cleanup_module(void)
unregister_tcf_proto_ops(&cls_tcindex_ops);
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 413cf129d4be..29355b36597b 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -726,3 +726,4 @@ void cleanup_module(void)
unregister_tcf_proto_ops(&cls_u32_ops);
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 0ece0280713e..92c44d14cfc9 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -2120,3 +2120,4 @@ void cleanup_module(void)
unregister_qdisc(&cbq_qdisc_ops);
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/sched/sch_csz.c b/net/sched/sch_csz.c
index 2ccb86e590a9..69e410a6fec8 100644
--- a/net/sched/sch_csz.c
+++ b/net/sched/sch_csz.c
@@ -1069,3 +1069,4 @@ void cleanup_module(void)
unregister_qdisc(&csz_qdisc_ops);
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index 184ca0ac8fda..9990f1cf07d9 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -490,3 +490,4 @@ void cleanup_module(void)
unregister_qdisc(&dsmark_qdisc_ops);
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
index 0f03ba4e1ed8..dba5b1aeaecf 100644
--- a/net/sched/sch_gred.c
+++ b/net/sched/sch_gred.c
@@ -632,3 +632,4 @@ void cleanup_module(void)
unregister_qdisc(&gred_qdisc_ops);
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c
index 6caff3849ba7..91e6bb9058ce 100644
--- a/net/sched/sch_ingress.c
+++ b/net/sched/sch_ingress.c
@@ -392,3 +392,4 @@ void cleanup_module(void)
unregister_qdisc(&ingress_qdisc_ops);
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index 015cab96b485..71ec89664e32 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -421,3 +421,4 @@ void cleanup_module(void)
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index e377e0e0f29f..3cfa114796d5 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -497,3 +497,4 @@ void cleanup_module(void)
unregister_qdisc(&red_qdisc_ops);
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index c9a4bea68710..c2df11f156b1 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -496,3 +496,4 @@ void cleanup_module(void)
unregister_qdisc(&sfq_qdisc_ops);
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index dde3d0ddf28f..9faf302a17e2 100644
--- a/net/sched/sch_tbf.c
+++ b/net/sched/sch_tbf.c
@@ -427,3 +427,4 @@ void cleanup_module(void)
unregister_qdisc(&tbf_qdisc_ops);
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c
index 1b7119ffd340..7bc13e30ced7 100644
--- a/net/sched/sch_teql.c
+++ b/net/sched/sch_teql.c
@@ -493,3 +493,4 @@ void cleanup_module(void)
rtnl_unlock();
}
#endif
+MODULE_LICENSE("GPL");
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 2308dc9b0a58..3aabeff42924 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -772,8 +772,8 @@ rpc_allocate(unsigned int flags, unsigned int size)
}
if (flags & RPC_TASK_ASYNC)
return NULL;
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ>>4);
+ current->policy |= SCHED_YIELD;
+ schedule();
} while (!signalled());
return NULL;
@@ -1116,8 +1116,8 @@ rpciod_killall(void)
__rpc_schedule();
if (all_tasks) {
dprintk("rpciod_killall: waiting for tasks to exit\n");
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ current->policy |= SCHED_YIELD;
+ schedule();
}
}
@@ -1187,8 +1187,8 @@ rpciod_down(void)
* wait briefly before checking the process id.
*/
current->sigpending = 0;
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ current->policy |= SCHED_YIELD;
+ schedule();
/*
* Display a message if we're going to wait longer.
*/
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index 4e7c18517d4d..4140d3ffbf2d 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -95,7 +95,7 @@ xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen)
if ((len = ntohl(*p++)) > maxlen)
return NULL;
*lenp = len;
- *sp = p;
+ *sp = (char *) p;
return p + XDR_QUADLEN(len);
}
diff --git a/net/wanrouter/af_wanpipe.c b/net/wanrouter/af_wanpipe.c
index cd5ef990f5a3..5170a3cc94e5 100644
--- a/net/wanrouter/af_wanpipe.c
+++ b/net/wanrouter/af_wanpipe.c
@@ -2763,3 +2763,4 @@ int init_module(void)
return 0;
}
#endif
+MODULE_LICENSE("GPL");