Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
5eb4898b
Commit
5eb4898b
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 1.0.1
parent
13f97bf0
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
103 additions
and
57 deletions
+103
-57
CREDITS
CREDITS
+1
-1
Makefile
Makefile
+2
-2
drivers/FPU-emu/fpu_entry.c
drivers/FPU-emu/fpu_entry.c
+2
-0
drivers/char/lp.c
drivers/char/lp.c
+1
-0
drivers/net/8390.c
drivers/net/8390.c
+5
-5
fs/select.c
fs/select.c
+1
-1
mm/kmalloc.c
mm/kmalloc.c
+13
-7
mm/swap.c
mm/swap.c
+6
-3
net/inet/dev.c
net/inet/dev.c
+15
-2
net/inet/ip.c
net/inet/ip.c
+34
-33
net/inet/skbuff.c
net/inet/skbuff.c
+6
-3
net/inet/tcp.c
net/inet/tcp.c
+17
-0
No files found.
CREDITS
View file @
5eb4898b
...
...
@@ -390,7 +390,7 @@ S: D-37083 Goettingen
S: Germany
N: Ian A. Murdock
E: imurdock@
shell.portal.com
E: imurdock@
gnu.ai.mit.edu
D: Creator of Debian distribution
S: 30 White Tail Lane
S: Lafayette, Indiana 47906
...
...
Makefile
View file @
5eb4898b
VERSION
=
1
PATCHLEVEL
=
0
ALPHA
=
SUBLEVEL
=
1
all
:
Version zImage
...
...
@@ -128,7 +128,7 @@ tools/./version.h: tools/version.h
tools/version.h
:
$(CONFIGURE) Makefile
@
./makever.sh
@
echo
\#
define UTS_RELEASE
\"
$(VERSION)
.
$(PATCHLEVEL)
$(ALPHA
)
\"
>
tools/version.h
@
echo
\#
define UTS_RELEASE
\"
$(VERSION)
.
$(PATCHLEVEL)
.
$(SUBLEVEL
)
\"
>
tools/version.h
@
echo
\#
define UTS_VERSION
\"\#
`
cat
.version
`
`
date
`
\"
>>
tools/version.h
@
echo
\#
define LINUX_COMPILE_TIME
\"
`
date
+%T
`
\"
>>
tools/version.h
@
echo
\#
define LINUX_COMPILE_BY
\"
`
whoami
`
\"
>>
tools/version.h
...
...
drivers/FPU-emu/fpu_entry.c
View file @
5eb4898b
...
...
@@ -279,6 +279,8 @@ asmlinkage void math_emulate(long arg)
}
}
FPU_EIP
=
FPU_ORIG_EIP
;
/* Point to current FPU instruction. */
RE_ENTRANT_CHECK_OFF
;
current
->
tss
.
trap_no
=
16
;
current
->
tss
.
error_code
=
0
;
...
...
drivers/char/lp.c
View file @
5eb4898b
...
...
@@ -170,6 +170,7 @@ static int lp_write_interrupt(struct inode * inode, struct file * file, char * b
current
->
timeout
=
jiffies
+
LP_TIMEOUT_INTERRUPT
;
interruptible_sleep_on
(
&
lp
->
lp_wait_q
);
outb_p
((
LP_PSELECP
|
LP_PINITP
),
(
LP_C
(
minor
)));
sti
();
if
(
current
->
signal
&
~
current
->
blocked
)
{
if
(
total_bytes_written
+
bytes_written
)
return
total_bytes_written
+
bytes_written
;
...
...
drivers/net/8390.c
View file @
5eb4898b
...
...
@@ -145,14 +145,14 @@ static int ei_start_xmit(struct sk_buff *skb, struct device *dev)
return
1
;
}
isr
=
inb
(
e8390_base
+
EN0_ISR
);
printk
(
"%s: transmit timed out, TX status %#2x, ISR %#2x.
\n
"
,
printk
(
KERN_DEBUG
"%s: transmit timed out, TX status %#2x, ISR %#2x.
\n
"
,
dev
->
name
,
txsr
,
isr
);
/* Does the 8390 thinks it has posted an interrupt? */
if
(
isr
)
printk
(
"%s: Possible IRQ conflict on IRQ%d?
\n
"
,
dev
->
name
,
dev
->
irq
);
printk
(
KERN_DEBUG
"%s: Possible IRQ conflict on IRQ%d?
\n
"
,
dev
->
name
,
dev
->
irq
);
else
{
/* The 8390 probably hasn't gotten on the cable yet. */
printk
(
"%s: Possible network cable problem?
\n
"
,
dev
->
name
);
printk
(
KERN_DEBUG
"%s: Possible network cable problem?
\n
"
,
dev
->
name
);
ei_local
->
interface_num
^=
1
;
/* Try a different xcvr. */
}
/* Try to restart the card. Perhaps the user has fixed something. */
...
...
@@ -453,7 +453,7 @@ static void ei_receive(struct device *dev)
skb
=
alloc_skb
(
sksize
,
GFP_ATOMIC
);
if
(
skb
==
NULL
)
{
if
(
ei_debug
)
if
(
ei_debug
>
1
)
printk
(
"%s: Couldn't allocate a sk_buff of size %d.
\n
"
,
dev
->
name
,
sksize
);
ei_local
->
stat
.
rx_dropped
++
;
...
...
@@ -513,7 +513,7 @@ static void ei_rx_overrun(struct device *dev)
/* We should already be stopped and in page0. Remove after testing. */
outb_p
(
E8390_NODMA
+
E8390_PAGE0
+
E8390_STOP
,
e8390_base
+
E8390_CMD
);
if
(
ei_debug
)
if
(
ei_debug
>
1
)
printk
(
"%s: Receiver overrun.
\n
"
,
dev
->
name
);
ei_local
->
stat
.
rx_over_errors
++
;
...
...
fs/select.c
View file @
5eb4898b
...
...
@@ -75,7 +75,7 @@ static int check(int flag, select_table * wait, struct file * file)
return
0
;
}
int
do_select
(
int
n
,
fd_set
*
in
,
fd_set
*
out
,
fd_set
*
ex
,
static
int
do_select
(
int
n
,
fd_set
*
in
,
fd_set
*
out
,
fd_set
*
ex
,
fd_set
*
res_in
,
fd_set
*
res_out
,
fd_set
*
res_ex
)
{
int
count
;
...
...
mm/kmalloc.c
View file @
5eb4898b
...
...
@@ -155,9 +155,12 @@ void * kmalloc (size_t size, int priority)
/* Sanity check... */
if
(
intr_count
&&
priority
!=
GFP_ATOMIC
)
{
printk
(
"kmalloc called nonatomically from interrupt %08lx
\n
"
,
((
unsigned
long
*
)
&
size
)[
-
1
]);
priority
=
GFP_ATOMIC
;
static
int
count
=
0
;
if
(
++
count
<
5
)
{
printk
(
"kmalloc called nonatomically from interrupt %08lx
\n
"
,
((
unsigned
long
*
)
&
size
)[
-
1
]);
priority
=
GFP_ATOMIC
;
}
}
if
(
size
>
MAX_KMALLOC_K
*
1024
)
{
...
...
@@ -214,11 +217,14 @@ while (tries --)
/* This can be done with ints on: This is private to this invocation */
page
=
(
struct
page_descriptor
*
)
__get_free_page
(
priority
&
GFP_LEVEL_MASK
);
if
(
!
page
)
{
printk
(
"Couldn't get a free page.....
\n
"
);
if
(
!
page
)
{
static
unsigned
long
last
=
0
;
if
(
last
+
10
*
HZ
<
jiffies
)
{
last
=
jiffies
;
printk
(
"Couldn't get a free page.....
\n
"
);
}
return
NULL
;
}
}
#if 0
printk ("Got page %08x to use for %d byte mallocs....",(long)page,sz);
#endif
...
...
mm/swap.c
View file @
5eb4898b
...
...
@@ -595,9 +595,12 @@ unsigned long __get_free_page(int priority)
Is this code reentrant? */
if
(
intr_count
&&
priority
!=
GFP_ATOMIC
)
{
printk
(
"gfp called nonatomically from interrupt %08lx
\n
"
,
((
unsigned
long
*
)
&
priority
)[
-
1
]);
priority
=
GFP_ATOMIC
;
static
int
count
=
0
;
if
(
++
count
<
5
)
{
printk
(
"gfp called nonatomically from interrupt %08lx
\n
"
,
((
unsigned
long
*
)
&
priority
)[
-
1
]);
priority
=
GFP_ATOMIC
;
}
}
save_flags
(
flag
);
repeat:
...
...
net/inet/dev.c
View file @
5eb4898b
...
...
@@ -134,6 +134,7 @@ static struct packet_type ip_packet_type = {
struct
packet_type
*
ptype_base
=
&
ip_packet_type
;
static
struct
sk_buff
*
volatile
backlog
=
NULL
;
static
int
backlog_size
=
0
;
static
unsigned
long
ip_bcast
=
0
;
...
...
@@ -482,14 +483,25 @@ dev_queue_xmit(struct sk_buff *skb, struct device *dev, int pri)
void
netif_rx
(
struct
sk_buff
*
skb
)
{
static
int
dropping
=
0
;
/* Set any necessary flags. */
skb
->
sk
=
NULL
;
skb
->
free
=
1
;
/* check that we aren't oevrdoing things.. */
if
(
!
backlog_size
)
dropping
=
0
;
else
if
(
backlog_size
>
100
)
dropping
=
1
;
if
(
dropping
)
{
kfree_skb
(
skb
,
FREE_READ
);
return
;
}
/* and add it to the "backlog" queue. */
IS_SKB
(
skb
);
skb_queue_tail
(
&
backlog
,
skb
);
backlog_size
++
;
/* If any packet arrived, mark it for processing. */
if
(
backlog
!=
NULL
)
mark_bh
(
INET_BH
);
...
...
@@ -607,6 +619,7 @@ inet_bh(void *tmp)
/* Any data left to process? */
while
((
skb
=
skb_dequeue
(
&
backlog
))
!=
NULL
)
{
backlog_size
--
;
nitcount
=
dev_nit
;
flag
=
0
;
sti
();
...
...
net/inet/ip.c
View file @
5eb4898b
...
...
@@ -10,6 +10,7 @@
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
* Donald Becker, <becker@super.org>
* Alan Cox, <gw4pts@gw4pts.ampr.org>
*
* Fixes:
* Alan Cox : Commented a couple of minor bits of surplus code
...
...
@@ -40,6 +41,9 @@
* Alan Cox : Silly ip bug when an overlength
* fragment turns up. Now frees the
* queue.
* Linus Torvalds/ : Memory leakage on fragmentation
* Alan Cox : handling.
* Gerhard Koerting: Forwarding uses IP priority hints
*
* To Fix:
* IP option processing is mostly not needed. ip_forward needs to know about routing rules
...
...
@@ -831,9 +835,8 @@ static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct
offset
=
ntohs
(
iph
->
frag_off
);
flags
=
offset
&
~
IP_OFFSET
;
offset
&=
IP_OFFSET
;
if
(((
flags
&
IP_MF
)
==
0
)
&&
(
offset
==
0
))
{
if
(
qp
!=
NULL
)
if
(((
flags
&
IP_MF
)
==
0
)
&&
(
offset
==
0
))
{
if
(
qp
!=
NULL
)
ip_free
(
qp
);
/* Huh? How could this exist?? */
return
(
skb
);
}
...
...
@@ -844,20 +847,20 @@ static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct
* as we still are receiving fragments. Otherwise, create a fresh
* queue entry.
*/
if
(
qp
!=
NULL
)
{
del_timer
(
&
qp
->
timer
);
qp
->
timer
.
expires
=
IP_FRAG_TIME
;
/* about 30 seconds
*/
qp
->
timer
.
data
=
(
unsigned
long
)
qp
;
/* pointer to queue
*/
qp
->
timer
.
function
=
ip_expire
;
/* expire function */
add_timer
(
&
qp
->
timer
);
}
else
{
if
((
qp
=
ip_create
(
skb
,
iph
,
dev
))
==
NULL
)
return
(
NULL
);
}
if
(
qp
!=
NULL
)
{
del_timer
(
&
qp
->
timer
);
qp
->
timer
.
expires
=
IP_FRAG_TIME
;
/* about 30 seconds */
qp
->
timer
.
data
=
(
unsigned
long
)
qp
;
/* pointer to queue
*/
qp
->
timer
.
function
=
ip_expire
;
/* expire function
*/
add_timer
(
&
qp
->
timer
);
}
else
{
if
((
qp
=
ip_create
(
skb
,
iph
,
dev
))
==
NULL
)
{
skb
->
sk
=
NULL
;
kfree_skb
(
skb
,
FREE_READ
);
return
NULL
;
}
}
/* Determine the position of this fragment. */
ihl
=
(
iph
->
ihl
*
sizeof
(
unsigned
long
));
end
=
offset
+
ntohs
(
iph
->
tot_len
)
-
ihl
;
...
...
@@ -924,6 +927,7 @@ static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct
if
(
tfp
->
next
!=
NULL
)
next
->
next
->
prev
=
next
->
prev
;
kfree_skb
(
next
->
skb
,
FREE_READ
);
kfree_s
(
next
,
sizeof
(
struct
ipfrag
));
}
DPRINTF
((
DBG_IP
,
"IP: defrag: fixed high overlap %d bytes
\n
"
,
i
));
...
...
@@ -932,6 +936,11 @@ static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct
/* Insert this fragment in the chain of fragments. */
tfp
=
NULL
;
tfp
=
ip_frag_create
(
offset
,
end
,
skb
,
ptr
);
if
(
!
tfp
)
{
skb
->
sk
=
NULL
;
kfree_skb
(
skb
,
FREE_READ
);
return
NULL
;
}
tfp
->
prev
=
prev
;
tfp
->
next
=
next
;
if
(
prev
!=
NULL
)
...
...
@@ -1000,11 +1009,6 @@ static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct
dev
->
name
,
dev
->
mtu
,
left
,
in_ntoa
(
iph
->
saddr
)));
DPRINTF
((
DBG_IP
,
" DST=%s
\n
"
,
in_ntoa
(
iph
->
daddr
)));
/*
* FIXME:
* We should send an ICMP warning message here!
*/
icmp_send
(
skb
,
ICMP_DEST_UNREACH
,
ICMP_FRAG_NEEDED
,
dev
);
return
;
}
...
...
@@ -1017,15 +1021,6 @@ static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct
while
(
left
>
0
)
{
len
=
left
;
#ifdef OLD
if
(
len
+
8
>
mtu
)
len
=
(
dev
->
mtu
-
hlen
-
8
);
if
((
left
-
len
)
>=
8
)
{
len
/=
8
;
len
*=
8
;
}
#else
/* IF: it doesn't fit, use 'mtu' - the data space left */
if
(
len
>
mtu
)
len
=
mtu
;
...
...
@@ -1036,7 +1031,6 @@ static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct
len
/=
8
;
len
*=
8
;
}
#endif
DPRINTF
((
DBG_IP
,
"IP: frag: creating fragment of %d bytes (%d total)
\n
"
,
len
,
len
+
hlen
));
...
...
@@ -1199,7 +1193,14 @@ ip_forward(struct sk_buff *skb, struct device *dev, int is_frag)
kfree_skb
(
skb2
,
FREE_WRITE
);
}
else
dev2
->
queue_xmit
(
skb2
,
dev2
,
SOPRI_NORMAL
);
{
if
(
iph
->
tos
&
IPTOS_LOWDELAY
)
dev2
->
queue_xmit
(
skb2
,
dev2
,
SOPRI_INTERACTIVE
);
if
(
iph
->
tos
&
IPTOS_THROUGHPUT
)
dev2
->
queue_xmit
(
skb2
,
dev2
,
SOPRI_BACKGROUND
);
else
dev2
->
queue_xmit
(
skb2
,
dev2
,
SOPRI_NORMAL
);
}
}
}
...
...
net/inet/skbuff.c
View file @
5eb4898b
...
...
@@ -429,9 +429,12 @@ struct sk_buff *alloc_skb(unsigned int size,int priority)
extern
unsigned
long
intr_count
;
if
(
intr_count
&&
priority
!=
GFP_ATOMIC
)
{
printk
(
"alloc_skb called nonatomically from interrupt %08lx
\n
"
,
((
unsigned
long
*
)
&
size
)[
-
1
]);
priority
=
GFP_ATOMIC
;
static
int
count
=
0
;
if
(
++
count
<
5
)
{
printk
(
"alloc_skb called nonatomically from interrupt %08lx
\n
"
,
((
unsigned
long
*
)
&
size
)[
-
1
]);
priority
=
GFP_ATOMIC
;
}
}
skb
=
(
struct
sk_buff
*
)
kmalloc
(
size
,
priority
);
if
(
skb
==
NULL
)
...
...
net/inet/tcp.c
View file @
5eb4898b
...
...
@@ -12,6 +12,9 @@
* Mark Evans, <evansmp@uhura.aston.ac.uk>
* Corey Minyard <wf-rch!minyard@relay.EU.net>
* Florian La Roche, <flla@stud.uni-sb.de>
* Charles Hedrick, <hedrick@klinzhai.rutgers.edu>
* Linus Torvalds, <torvalds@cs.helsinki.fi>
* Alan Cox, <gw4pts@gw4pts.ampr.org>
*
* Fixes:
* Alan Cox : Numerous verify_area() calls
...
...
@@ -63,6 +66,7 @@
* Charles Hedrick : Window fix
* Linus : Rewrote tcp_read() and URG handling
* completely
* Gerhard Koerting: Fixed some missing timer handling
*
*
* To Fix:
...
...
@@ -1487,8 +1491,13 @@ tcp_shutdown(struct sock *sk, int how)
IPPROTO_TCP
,
sk
->
opt
,
sizeof
(
struct
tcphdr
),
sk
->
ip_tos
,
sk
->
ip_ttl
);
if
(
tmp
<
0
)
{
/* Finish anyway, treat this as a send that got lost. */
buff
->
free
=
1
;
prot
->
wfree
(
sk
,
buff
->
mem_addr
,
buff
->
mem_len
);
if
(
sk
->
state
==
TCP_ESTABLISHED
)
sk
->
state
=
TCP_FIN_WAIT1
;
else
sk
->
state
=
TCP_FIN_WAIT2
;
release_sock
(
sk
);
DPRINTF
((
DBG_TCP
,
"Unable to build header for fin.
\n
"
));
return
;
...
...
@@ -2024,6 +2033,13 @@ tcp_close(struct sock *sk, int timeout)
sizeof
(
struct
tcphdr
),
sk
->
ip_tos
,
sk
->
ip_ttl
);
if
(
tmp
<
0
)
{
kfree_skb
(
buff
,
FREE_WRITE
);
if
(
sk
->
state
==
TCP_ESTABLISHED
)
sk
->
state
=
TCP_FIN_WAIT1
;
else
sk
->
state
=
TCP_FIN_WAIT2
;
reset_timer
(
sk
,
TIME_CLOSE
,
4
*
sk
->
rto
);
if
(
timeout
)
tcp_time_wait
(
sk
);
DPRINTF
((
DBG_TCP
,
"Unable to build header for fin.
\n
"
));
release_sock
(
sk
);
return
;
...
...
@@ -2854,6 +2870,7 @@ tcp_fin(struct sock *sk, struct tcphdr *th,
case
TCP_SYN_SENT
:
case
TCP_ESTABLISHED
:
/* Contains the one that needs to be acked */
reset_timer
(
sk
,
TIME_CLOSE
,
TCP_TIMEOUT_LEN
);
sk
->
fin_seq
=
th
->
seq
+
1
;
sk
->
state
=
TCP_CLOSE_WAIT
;
if
(
th
->
rst
)
sk
->
shutdown
=
SHUTDOWN_MASK
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment