patch-1.3.82 linux/net/ipv4/af_inet.c
Next file: linux/net/ipv4/arp.c
Previous file: linux/net/ipv4/Makefile
Back to the patch index
Back to the overall index
- Lines: 83
- Date:
Mon Apr 1 10:46:31 1996
- Orig file:
v1.3.81/linux/net/ipv4/af_inet.c
- Orig date:
Sun Mar 31 00:13:19 1996
diff -u --recursive --new-file v1.3.81/linux/net/ipv4/af_inet.c linux/net/ipv4/af_inet.c
@@ -407,7 +407,7 @@
* later once I know the bug is buried.
*/
tcp_cache_zap();
- kfree_s((void *)sk,sizeof(*sk));
+ sk_free(sk);
}
else
{
@@ -578,7 +578,7 @@
struct proto *prot;
int err;
- sk = (struct sock *) kmalloc(sizeof(*sk), GFP_KERNEL);
+ sk = sk_alloc(GFP_KERNEL);
if (sk == NULL)
return(-ENOBUFS);
memset(sk,0,sizeof(*sk)); /* Efficient way to set most fields to zero */
@@ -591,7 +591,7 @@
case SOCK_SEQPACKET:
if (protocol && protocol != IPPROTO_TCP)
{
- kfree_s((void *)sk, sizeof(*sk));
+ sk_free(sk);
return(-EPROTONOSUPPORT);
}
protocol = IPPROTO_TCP;
@@ -602,7 +602,7 @@
case SOCK_DGRAM:
if (protocol && protocol != IPPROTO_UDP)
{
- kfree_s((void *)sk, sizeof(*sk));
+ sk_free(sk);
return(-EPROTONOSUPPORT);
}
protocol = IPPROTO_UDP;
@@ -613,12 +613,12 @@
case SOCK_RAW:
if (!suser())
{
- kfree_s((void *)sk, sizeof(*sk));
+ sk_free(sk);
return(-EPERM);
}
if (!protocol)
{
- kfree_s((void *)sk, sizeof(*sk));
+ sk_free(sk);
return(-EPROTONOSUPPORT);
}
prot = &raw_prot;
@@ -629,12 +629,12 @@
case SOCK_PACKET:
if (!suser())
{
- kfree_s((void *)sk, sizeof(*sk));
+ sk_free(sk);
return(-EPERM);
}
if (!protocol)
{
- kfree_s((void *)sk, sizeof(*sk));
+ sk_free(sk);
return(-EPROTONOSUPPORT);
}
prot = &packet_prot;
@@ -643,7 +643,7 @@
break;
default:
- kfree_s((void *)sk, sizeof(*sk));
+ sk_free(sk);
return(-ESOCKTNOSUPPORT);
}
sk->socket = sock;
@@ -655,7 +655,6 @@
sk->allocation = GFP_KERNEL;
sk->sndbuf = SK_WMEM_MAX;
sk->rcvbuf = SK_RMEM_MAX;
- sk->ato = HZ/3;
sk->rto = TCP_TIMEOUT_INIT; /*TCP_WRITE_TIME*/
sk->cong_window = 1; /* start with only sending one packet at a time. */
sk->priority = 1;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this