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
d0b87be0
Commit
d0b87be0
authored
May 01, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://cifs.bkbits.net/linux-2.5cifs
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
20b5050b
1230e437
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
84 additions
and
110 deletions
+84
-110
arch/alpha/kernel/systbls.S
arch/alpha/kernel/systbls.S
+10
-0
arch/ppc64/kernel/signal.c
arch/ppc64/kernel/signal.c
+1
-0
arch/ppc64/kernel/signal32.c
arch/ppc64/kernel/signal32.c
+2
-2
drivers/cdrom/mcdx.c
drivers/cdrom/mcdx.c
+39
-54
include/asm-alpha/unistd.h
include/asm-alpha/unistd.h
+12
-1
include/linux/string.h
include/linux/string.h
+1
-0
net/core/neighbour.c
net/core/neighbour.c
+1
-1
net/core/rtnetlink.c
net/core/rtnetlink.c
+2
-2
net/ipv4/route.c
net/ipv4/route.c
+3
-3
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_ipv4.c
+7
-41
net/ipv6/af_inet6.c
net/ipv6/af_inet6.c
+1
-1
net/ipv6/ndisc.c
net/ipv6/ndisc.c
+1
-1
net/netlink/af_netlink.c
net/netlink/af_netlink.c
+4
-4
No files found.
arch/alpha/kernel/systbls.S
View file @
d0b87be0
...
...
@@ -447,6 +447,16 @@ sys_call_table:
.
quad
sys_stat64
/*
425
*/
.
quad
sys_lstat64
.
quad
sys_fstat64
.
quad
sys_ni_syscall
/*
sys_vserver
*/
.
quad
sys_ni_syscall
/*
sys_mbind
*/
.
quad
sys_ni_syscall
/*
sys_get_mempolicy
*/
.
quad
sys_ni_syscall
/*
sys_set_mempolicy
*/
.
quad
sys_mq_open
.
quad
sys_mq_unlink
.
quad
sys_mq_timedsend
.
quad
sys_mq_timedreceive
/*
435
*/
.
quad
sys_mq_notify
.
quad
sys_mq_getsetattr
.
size
sys_call_table
,
.
-
sys_call_table
.
type
sys_call_table
,
@
object
...
...
arch/ppc64/kernel/signal.c
View file @
d0b87be0
...
...
@@ -430,6 +430,7 @@ static void setup_rt_frame(int signr, struct k_sigaction *ka, siginfo_t *info,
regs
->
gpr
[
1
]
=
newsp
;
err
|=
get_user
(
regs
->
gpr
[
2
],
&
funct_desc_ptr
->
toc
);
regs
->
gpr
[
3
]
=
signr
;
regs
->
result
=
0
;
if
(
ka
->
sa
.
sa_flags
&
SA_SIGINFO
)
{
err
|=
get_user
(
regs
->
gpr
[
4
],
(
unsigned
long
*
)
&
frame
->
pinfo
);
err
|=
get_user
(
regs
->
gpr
[
5
],
(
unsigned
long
*
)
&
frame
->
puc
);
...
...
arch/ppc64/kernel/signal32.c
View file @
d0b87be0
...
...
@@ -676,6 +676,7 @@ static void handle_rt_signal32(unsigned long sig, struct k_sigaction *ka,
regs
->
nip
=
(
unsigned
long
)
ka
->
sa
.
sa_handler
;
regs
->
link
=
(
unsigned
long
)
frame
->
tramp
;
regs
->
trap
=
0
;
regs
->
result
=
0
;
return
;
...
...
@@ -784,7 +785,6 @@ long sys32_rt_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
*/
sys32_sigaltstack
((
u32
)(
u64
)
&
rt_sf
->
uc
.
uc_stack
,
0
,
0
,
0
,
0
,
0
,
regs
);
regs
->
result
&=
0xFFFFFFFF
;
ret
=
regs
->
result
;
return
ret
;
...
...
@@ -841,6 +841,7 @@ static void handle_signal32(unsigned long sig, struct k_sigaction *ka,
regs
->
nip
=
(
unsigned
long
)
ka
->
sa
.
sa_handler
;
regs
->
link
=
(
unsigned
long
)
frame
->
mctx
.
tramp
;
regs
->
trap
=
0
;
regs
->
result
=
0
;
return
;
...
...
@@ -885,7 +886,6 @@ long sys32_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
||
restore_user_regs
(
regs
,
sr
,
1
))
goto
badframe
;
regs
->
result
&=
0xFFFFFFFF
;
ret
=
regs
->
result
;
return
ret
;
...
...
drivers/cdrom/mcdx.c
View file @
d0b87be0
...
...
@@ -81,10 +81,6 @@ static const char *mcdx_c_version
#define mcdx_drive_map mcdx
#include "mcdx.h"
#if BITS_PER_LONG != 32
# error FIXME: this driver only works on 32-bit platforms
#endif
#ifndef HZ
#error HZ not defined
#endif
...
...
@@ -189,12 +185,12 @@ struct s_drive_stuff {
#endif
/* AK2 */
/* adds and odds */
void
*
wreg_data
;
/* w data */
void
*
wreg_reset
;
/* w hardware reset */
void
*
wreg_hcon
;
/* w hardware conf */
void
*
wreg_chn
;
/* w channel */
void
*
rreg_data
;
/* r data */
void
*
rreg_status
;
/* r status */
unsigned
wreg_data
;
/* w data */
unsigned
wreg_reset
;
/* w hardware reset */
unsigned
wreg_hcon
;
/* w hardware conf */
unsigned
wreg_chn
;
/* w channel */
unsigned
rreg_data
;
/* r data */
unsigned
rreg_status
;
/* r status */
int
irq
;
/* irq used by this drive */
int
present
;
/* drive present and its capabilities */
...
...
@@ -274,7 +270,7 @@ static void log2msf(unsigned int, struct cdrom_msf0 *);
static
unsigned
int
msf2log
(
const
struct
cdrom_msf0
*
);
static
unsigned
int
uint2bcd
(
unsigned
int
);
static
unsigned
int
bcd2uint
(
unsigned
char
);
static
char
*
port
(
int
*
);
static
unsigned
port
(
int
*
);
static
int
irq
(
int
*
);
static
void
mcdx_delay
(
struct
s_drive_stuff
*
,
long
jifs
);
static
int
mcdx_transfer
(
struct
s_drive_stuff
*
,
char
*
buf
,
int
sector
,
...
...
@@ -868,7 +864,7 @@ static irqreturn_t mcdx_intr(int irq, void *dev_id, struct pt_regs *regs)
#endif
/* AK2 */
/* get the interrupt status */
b
=
inb
(
(
unsigned
int
)
stuffp
->
rreg_status
);
b
=
inb
(
stuffp
->
rreg_status
);
stuffp
->
introk
=
~
b
&
MCDX_RBIT_DTEN
;
/* NOTE: We only should get interrupts if the data we
...
...
@@ -882,7 +878,7 @@ static irqreturn_t mcdx_intr(int irq, void *dev_id, struct pt_regs *regs)
xtrace
(
IRQ
,
"intr() irq %d hw status 0x%02x
\n
"
,
irq
,
b
);
if
(
~
b
&
MCDX_RBIT_STEN
)
{
xinfo
(
"intr() irq %d status 0x%02x
\n
"
,
irq
,
inb
(
(
unsigned
int
)
stuffp
->
rreg_data
));
irq
,
inb
(
stuffp
->
rreg_data
));
}
else
{
xinfo
(
"intr() irq %d ambiguous hw status
\n
"
,
irq
);
}
...
...
@@ -945,7 +941,7 @@ static int mcdx_talk(struct s_drive_stuff *stuffp,
char
*
bp
=
(
char
*
)
buffer
;
size_t
sz
=
size
;
outsb
(
(
unsigned
int
)
stuffp
->
wreg_data
,
cmd
,
cmdlen
);
outsb
(
stuffp
->
wreg_data
,
cmd
,
cmdlen
);
xtrace
(
TALK
,
"talk() command sent
\n
"
);
/* get the status byte */
...
...
@@ -1049,8 +1045,7 @@ void __exit mcdx_exit(void)
continue
;
}
put_disk
(
stuffp
->
disk
);
release_region
((
unsigned
long
)
stuffp
->
wreg_data
,
MCDX_IO_SIZE
);
release_region
(
stuffp
->
wreg_data
,
MCDX_IO_SIZE
);
free_irq
(
stuffp
->
irq
,
NULL
);
if
(
stuffp
->
toc
)
{
xtrace
(
MALLOC
,
"cleanup_module() free toc @ %p
\n
"
,
...
...
@@ -1116,8 +1111,7 @@ int __init mcdx_init_drive(int drive)
/* setup our irq and i/o addresses */
stuffp
->
irq
=
irq
(
mcdx_drive_map
[
drive
]);
stuffp
->
wreg_data
=
stuffp
->
rreg_data
=
port
(
mcdx_drive_map
[
drive
]);
stuffp
->
wreg_data
=
stuffp
->
rreg_data
=
port
(
mcdx_drive_map
[
drive
]);
stuffp
->
wreg_reset
=
stuffp
->
rreg_status
=
stuffp
->
wreg_data
+
1
;
stuffp
->
wreg_hcon
=
stuffp
->
wreg_reset
+
1
;
stuffp
->
wreg_chn
=
stuffp
->
wreg_hcon
+
1
;
...
...
@@ -1127,10 +1121,9 @@ int __init mcdx_init_drive(int drive)
init_waitqueue_head
(
&
stuffp
->
sleepq
);
/* check if i/o addresses are available */
if
(
!
request_region
((
unsigned
int
)
stuffp
->
wreg_data
,
MCDX_IO_SIZE
,
"mcdx"
))
{
xwarn
(
"0x%3p,%d: Init failed. "
"I/O ports (0x%3p..0x%3p) already in use.
\n
"
,
if
(
!
request_region
(
stuffp
->
wreg_data
,
MCDX_IO_SIZE
,
"mcdx"
))
{
xwarn
(
"0x%03x,%d: Init failed. "
"I/O ports (0x%03x..0x%03x) already in use.
\n
"
,
stuffp
->
wreg_data
,
stuffp
->
irq
,
stuffp
->
wreg_data
,
stuffp
->
wreg_data
+
MCDX_IO_SIZE
-
1
);
...
...
@@ -1141,7 +1134,7 @@ int __init mcdx_init_drive(int drive)
return
0
;
/* next drive */
}
xtrace
(
INIT
,
"init() i/o port is available at 0x%
3p
\n
"
,
xtrace
(
INIT
,
"init() i/o port is available at 0x%
03x
\n
"
stuffp
->
wreg_data
);
xtrace
(
INIT
,
"init() hardware reset
\n
"
);
mcdx_reset
(
stuffp
,
HARD
,
1
);
...
...
@@ -1149,9 +1142,8 @@ int __init mcdx_init_drive(int drive)
xtrace
(
INIT
,
"init() get version
\n
"
);
if
(
-
1
==
mcdx_requestversion
(
stuffp
,
&
version
,
4
))
{
/* failed, next drive */
release_region
((
unsigned
long
)
stuffp
->
wreg_data
,
MCDX_IO_SIZE
);
xwarn
(
"%s=0x%3p,%d: Init failed. Can't get version.
\n
"
,
release_region
(
stuffp
->
wreg_data
,
MCDX_IO_SIZE
);
xwarn
(
"%s=0x%03x,%d: Init failed. Can't get version.
\n
"
,
MCDX
,
stuffp
->
wreg_data
,
stuffp
->
irq
);
xtrace
(
MALLOC
,
"init() free stuffp @ %p
\n
"
,
stuffp
);
kfree
(
stuffp
);
...
...
@@ -1181,9 +1173,8 @@ int __init mcdx_init_drive(int drive)
stuffp
->
playcmd
=
READ1X
;
if
(
!
stuffp
->
present
)
{
release_region
((
unsigned
long
)
stuffp
->
wreg_data
,
MCDX_IO_SIZE
);
xwarn
(
"%s=0x%3p,%d: Init failed. No Mitsumi CD-ROM?.
\n
"
,
release_region
(
stuffp
->
wreg_data
,
MCDX_IO_SIZE
);
xwarn
(
"%s=0x%03x,%d: Init failed. No Mitsumi CD-ROM?.
\n
"
,
MCDX
,
stuffp
->
wreg_data
,
stuffp
->
irq
);
kfree
(
stuffp
);
put_disk
(
disk
);
...
...
@@ -1192,8 +1183,7 @@ int __init mcdx_init_drive(int drive)
xtrace
(
INIT
,
"init() register blkdev
\n
"
);
if
(
register_blkdev
(
MAJOR_NR
,
"mcdx"
))
{
release_region
((
unsigned
long
)
stuffp
->
wreg_data
,
MCDX_IO_SIZE
);
release_region
(
stuffp
->
wreg_data
,
MCDX_IO_SIZE
);
kfree
(
stuffp
);
put_disk
(
disk
);
return
1
;
...
...
@@ -1202,8 +1192,7 @@ int __init mcdx_init_drive(int drive)
mcdx_queue
=
blk_init_queue
(
do_mcdx_request
,
&
mcdx_lock
);
if
(
!
mcdx_queue
)
{
unregister_blkdev
(
MAJOR_NR
,
"mcdx"
);
release_region
((
unsigned
long
)
stuffp
->
wreg_data
,
MCDX_IO_SIZE
);
release_region
(
stuffp
->
wreg_data
,
MCDX_IO_SIZE
);
kfree
(
stuffp
);
put_disk
(
disk
);
return
1
;
...
...
@@ -1212,9 +1201,8 @@ int __init mcdx_init_drive(int drive)
xtrace
(
INIT
,
"init() subscribe irq and i/o
\n
"
);
mcdx_irq_map
[
stuffp
->
irq
]
=
stuffp
;
if
(
request_irq
(
stuffp
->
irq
,
mcdx_intr
,
SA_INTERRUPT
,
"mcdx"
,
NULL
))
{
release_region
((
unsigned
long
)
stuffp
->
wreg_data
,
MCDX_IO_SIZE
);
xwarn
(
"%s=0x%3p,%d: Init failed. Can't get irq (%d).
\n
"
,
release_region
(
stuffp
->
wreg_data
,
MCDX_IO_SIZE
);
xwarn
(
"%s=0x%03x,%d: Init failed. Can't get irq (%d).
\n
"
,
MCDX
,
stuffp
->
wreg_data
,
stuffp
->
irq
,
stuffp
->
irq
);
stuffp
->
irq
=
0
;
blk_cleanup_queue
(
mcdx_queue
);
...
...
@@ -1228,13 +1216,13 @@ int __init mcdx_init_drive(int drive)
int
i
;
mcdx_delay
(
stuffp
,
HZ
/
2
);
for
(
i
=
100
;
i
;
i
--
)
(
void
)
inb
(
(
unsigned
int
)
stuffp
->
rreg_status
);
(
void
)
inb
(
stuffp
->
rreg_status
);
}
#if WE_KNOW_WHY
/* irq 11 -> channel register */
outb
(
0x50
,
(
unsigned
int
)
stuffp
->
wreg_chn
);
outb
(
0x50
,
stuffp
->
wreg_chn
);
#endif
xtrace
(
INIT
,
"init() set non dma but irq mode
\n
"
);
...
...
@@ -1252,15 +1240,14 @@ int __init mcdx_init_drive(int drive)
disk
->
flags
=
GENHD_FL_CD
;
stuffp
->
disk
=
disk
;
sprintf
(
msg
,
" mcdx: Mitsumi CD-ROM installed at 0x%
3p
, irq %d."
sprintf
(
msg
,
" mcdx: Mitsumi CD-ROM installed at 0x%
03x
, irq %d."
" (Firmware version %c %x)
\n
"
,
stuffp
->
wreg_data
,
stuffp
->
irq
,
version
.
code
,
version
.
ver
);
mcdx_stuffp
[
drive
]
=
stuffp
;
xtrace
(
INIT
,
"init() mcdx_stuffp[%d] = %p
\n
"
,
drive
,
stuffp
);
if
(
register_cdrom
(
&
stuffp
->
info
)
!=
0
)
{
printk
(
"Cannot register Mitsumi CD-ROM!
\n
"
);
release_region
((
unsigned
long
)
stuffp
->
wreg_data
,
MCDX_IO_SIZE
);
release_region
(
stuffp
->
wreg_data
,
MCDX_IO_SIZE
);
free_irq
(
stuffp
->
irq
,
NULL
);
kfree
(
stuffp
);
put_disk
(
disk
);
...
...
@@ -1413,19 +1400,17 @@ static int mcdx_xfer(struct s_drive_stuff *stuffp,
const
int
HEAD
=
CD_FRAMESIZE_RAW
-
CD_XA_TAIL
-
CD_FRAMESIZE
;
insb
((
unsigned
int
)
stuffp
->
rreg_data
,
p
,
HEAD
);
insb
(
stuffp
->
rreg_data
,
p
,
HEAD
);
}
/* now actually read the data */
insb
(
(
unsigned
int
)
stuffp
->
rreg_data
,
p
,
512
);
insb
(
stuffp
->
rreg_data
,
p
,
512
);
/* test if it's the last sector of a block,
* if so, we have to handle XA special */
if
((
3
==
(
stuffp
->
pending
&
3
))
&&
stuffp
->
xa
)
{
char
dummy
[
CD_XA_TAIL
];
insb
((
unsigned
int
)
stuffp
->
rreg_data
,
&
dummy
[
0
],
CD_XA_TAIL
);
insb
(
stuffp
->
rreg_data
,
&
dummy
[
0
],
CD_XA_TAIL
);
}
if
(
stuffp
->
pending
==
sector
)
{
...
...
@@ -1493,7 +1478,7 @@ static int mcdx_xfer(struct s_drive_stuff *stuffp,
stuffp
->
busy
=
1
;
/* Now really issue the request command */
outsb
(
(
unsigned
int
)
stuffp
->
wreg_data
,
cmd
,
sizeof
cmd
);
outsb
(
stuffp
->
wreg_data
,
cmd
,
sizeof
cmd
);
}
#ifdef AK2
...
...
@@ -1514,9 +1499,9 @@ static int mcdx_xfer(struct s_drive_stuff *stuffp,
/* Access to elements of the mcdx_drive_map members */
static
char
*
port
(
int
*
ip
)
static
unsigned
port
(
int
*
ip
)
{
return
(
char
*
)
ip
[
0
];
return
ip
[
0
];
}
static
int
irq
(
int
*
ip
)
{
...
...
@@ -1682,7 +1667,7 @@ mcdx_playmsf(struct s_drive_stuff *stuffp, const struct cdrom_msf *msf)
"%02x:%02x:%02x -- %02x:%02x:%02x
\n
"
,
cmd
[
0
],
cmd
[
1
],
cmd
[
2
],
cmd
[
3
],
cmd
[
4
],
cmd
[
5
],
cmd
[
6
]);
outsb
(
(
unsigned
int
)
stuffp
->
wreg_data
,
cmd
,
sizeof
cmd
);
outsb
(
stuffp
->
wreg_data
,
cmd
,
sizeof
cmd
);
if
(
-
1
==
mcdx_getval
(
stuffp
,
3
*
HZ
,
0
,
NULL
))
{
xwarn
(
"playmsf() timeout
\n
"
);
...
...
@@ -1910,8 +1895,8 @@ static int mcdx_requestversion(struct s_drive_stuff *stuffp, struct s_version *v
static
int
mcdx_reset
(
struct
s_drive_stuff
*
stuffp
,
enum
resetmodes
mode
,
int
tries
)
{
if
(
mode
==
HARD
)
{
outb
(
0
,
(
unsigned
int
)
stuffp
->
wreg_chn
);
/* no dma, no irq -> hardware */
outb
(
0
,
(
unsigned
int
)
stuffp
->
wreg_reset
);
/* hw reset */
outb
(
0
,
stuffp
->
wreg_chn
);
/* no dma, no irq -> hardware */
outb
(
0
,
stuffp
->
wreg_reset
);
/* hw reset */
return
0
;
}
else
return
mcdx_talk
(
stuffp
,
"
\x60
"
,
1
,
NULL
,
1
,
5
*
HZ
,
tries
);
...
...
@@ -1945,13 +1930,13 @@ mcdx_getval(struct s_drive_stuff *stuffp, int to, int delay, char *buf)
if
(
!
buf
)
buf
=
&
c
;
while
(
inb
(
(
unsigned
int
)
stuffp
->
rreg_status
)
&
MCDX_RBIT_STEN
)
{
while
(
inb
(
stuffp
->
rreg_status
)
&
MCDX_RBIT_STEN
)
{
if
(
time_after
(
jiffies
,
timeout
))
return
-
1
;
mcdx_delay
(
stuffp
,
delay
);
}
*
buf
=
(
unsigned
char
)
inb
(
(
unsigned
int
)
stuffp
->
rreg_data
)
&
0xff
;
*
buf
=
(
unsigned
char
)
inb
(
stuffp
->
rreg_data
)
&
0xff
;
return
0
;
}
...
...
include/asm-alpha/unistd.h
View file @
d0b87be0
...
...
@@ -363,7 +363,18 @@
#define __NR_stat64 425
#define __NR_lstat64 426
#define __NR_fstat64 427
#define NR_SYSCALLS 428
#define __NR_vserver 428
#define __NR_mbind 429
#define __NR_get_mempolicy 430
#define __NR_set_mempolicy 431
#define __NR_mq_open 432
#define __NR_mq_unlink 433
#define __NR_mq_timedsend 434
#define __NR_mq_timedreceive 435
#define __NR_mq_notify 436
#define __NR_mq_getsetattr 437
#define NR_SYSCALLS 438
#if defined(__GNUC__)
...
...
include/linux/string.h
View file @
d0b87be0
...
...
@@ -5,6 +5,7 @@
#ifdef __KERNEL__
#include <linux/compiler.h>
/* for inline */
#include <linux/types.h>
/* for size_t */
#include <linux/stddef.h>
/* for NULL */
...
...
net/core/neighbour.c
View file @
d0b87be0
...
...
@@ -1479,7 +1479,7 @@ static void neigh_app_notify(struct neighbour *n)
#ifdef CONFIG_SYSCTL
struct
neigh_sysctl_table
{
st
atic
st
ruct
neigh_sysctl_table
{
struct
ctl_table_header
*
sysctl_header
;
ctl_table
neigh_vars
[
17
];
ctl_table
neigh_dev
[
2
];
...
...
net/core/rtnetlink.c
View file @
d0b87be0
...
...
@@ -280,7 +280,7 @@ static int do_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
return
err
;
}
int
rtnetlink_dump_all
(
struct
sk_buff
*
skb
,
struct
netlink_callback
*
cb
)
static
int
rtnetlink_dump_all
(
struct
sk_buff
*
skb
,
struct
netlink_callback
*
cb
)
{
int
idx
;
int
s_idx
=
cb
->
family
;
...
...
@@ -553,7 +553,7 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi
return
NOTIFY_DONE
;
}
struct
notifier_block
rtnetlink_dev_notifier
=
{
st
atic
st
ruct
notifier_block
rtnetlink_dev_notifier
=
{
.
notifier_call
=
rtnetlink_event
,
};
...
...
net/ipv4/route.c
View file @
d0b87be0
...
...
@@ -144,7 +144,7 @@ static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu);
static
int
rt_garbage_collect
(
void
);
struct
dst_ops
ipv4_dst_ops
=
{
st
atic
st
ruct
dst_ops
ipv4_dst_ops
=
{
.
family
=
AF_INET
,
.
protocol
=
__constant_htons
(
ETH_P_IP
),
.
gc
=
rt_garbage_collect
,
...
...
@@ -1525,7 +1525,7 @@ static int ip_route_input_mc(struct sk_buff *skb, u32 daddr, u32 saddr,
* 2. IP spoofing attempts are filtered with 100% of guarantee.
*/
int
ip_route_input_slow
(
struct
sk_buff
*
skb
,
u32
daddr
,
u32
saddr
,
static
int
ip_route_input_slow
(
struct
sk_buff
*
skb
,
u32
daddr
,
u32
saddr
,
u8
tos
,
struct
net_device
*
dev
)
{
struct
fib_result
res
;
...
...
@@ -1910,7 +1910,7 @@ int ip_route_input(struct sk_buff *skb, u32 daddr, u32 saddr,
* Major route resolver routine.
*/
int
ip_route_output_slow
(
struct
rtable
**
rp
,
const
struct
flowi
*
oldflp
)
static
int
ip_route_output_slow
(
struct
rtable
**
rp
,
const
struct
flowi
*
oldflp
)
{
u32
tos
=
oldflp
->
fl4_tos
&
(
IPTOS_RT_MASK
|
RTO_ONLINK
);
struct
flowi
fl
=
{
.
nl_u
=
{
.
ip4_u
=
...
...
net/ipv4/tcp_ipv4.c
View file @
d0b87be0
...
...
@@ -2137,46 +2137,6 @@ static inline struct tcp_tw_bucket *tw_next(struct tcp_tw_bucket *tw)
hlist_entry
(
tw
->
tw_node
.
next
,
typeof
(
*
tw
),
tw_node
)
:
NULL
;
}
static
void
*
listening_get_first
(
struct
seq_file
*
seq
)
{
struct
tcp_iter_state
*
st
=
seq
->
private
;
void
*
rc
=
NULL
;
for
(
st
->
bucket
=
0
;
st
->
bucket
<
TCP_LHTABLE_SIZE
;
++
st
->
bucket
)
{
struct
open_request
*
req
;
struct
tcp_opt
*
tp
;
struct
sock
*
sk
=
sk_head
(
&
tcp_listening_hash
[
st
->
bucket
]);
if
(
!
sk
)
continue
;
if
(
sk
->
sk_family
==
st
->
family
)
{
rc
=
sk
;
goto
out
;
}
tp
=
tcp_sk
(
sk
);
read_lock_bh
(
&
tp
->
syn_wait_lock
);
if
(
tp
->
listen_opt
&&
tp
->
listen_opt
->
qlen
)
{
st
->
uid
=
sock_i_uid
(
sk
);
st
->
syn_wait_sk
=
sk
;
st
->
state
=
TCP_SEQ_STATE_OPENREQ
;
for
(
st
->
sbucket
=
0
;
st
->
sbucket
<
TCP_SYNQ_HSIZE
;
++
st
->
sbucket
)
{
for
(
req
=
tp
->
listen_opt
->
syn_table
[
st
->
sbucket
];
req
;
req
=
req
->
dl_next
)
{
if
(
req
->
class
->
family
!=
st
->
family
)
continue
;
rc
=
req
;
goto
out
;
}
}
st
->
state
=
TCP_SEQ_STATE_LISTENING
;
}
read_unlock_bh
(
&
tp
->
syn_wait_lock
);
}
out:
return
rc
;
}
static
void
*
listening_get_next
(
struct
seq_file
*
seq
,
void
*
cur
)
{
struct
tcp_opt
*
tp
;
...
...
@@ -2184,6 +2144,12 @@ static void *listening_get_next(struct seq_file *seq, void *cur)
struct
sock
*
sk
=
cur
;
struct
tcp_iter_state
*
st
=
seq
->
private
;
if
(
!
sk
)
{
st
->
bucket
=
0
;
sk
=
sk_head
(
&
tcp_listening_hash
[
0
]);
goto
get_sk
;
}
++
st
->
num
;
if
(
st
->
state
==
TCP_SEQ_STATE_OPENREQ
)
{
...
...
@@ -2237,7 +2203,7 @@ static void *listening_get_next(struct seq_file *seq, void *cur)
static
void
*
listening_get_idx
(
struct
seq_file
*
seq
,
loff_t
*
pos
)
{
void
*
rc
=
listening_get_
first
(
seq
);
void
*
rc
=
listening_get_
next
(
seq
,
NULL
);
while
(
rc
&&
*
pos
)
{
rc
=
listening_get_next
(
seq
,
rc
);
...
...
net/ipv6/af_inet6.c
View file @
d0b87be0
...
...
@@ -539,7 +539,7 @@ struct proto_ops inet6_dgram_ops = {
.
sendpage
=
sock_no_sendpage
,
};
struct
net_proto_family
inet6_family_ops
=
{
st
atic
st
ruct
net_proto_family
inet6_family_ops
=
{
.
family
=
PF_INET6
,
.
create
=
inet6_create
,
.
owner
=
THIS_MODULE
,
...
...
net/ipv6/ndisc.c
View file @
d0b87be0
...
...
@@ -1418,7 +1418,7 @@ static int ndisc_netdev_event(struct notifier_block *this, unsigned long event,
return
NOTIFY_DONE
;
}
struct
notifier_block
ndisc_netdev_notifier
=
{
st
atic
st
ruct
notifier_block
ndisc_netdev_notifier
=
{
.
notifier_call
=
ndisc_netdev_event
,
};
...
...
net/netlink/af_netlink.c
View file @
d0b87be0
...
...
@@ -809,7 +809,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
return
err
?
:
copied
;
}
void
netlink_data_ready
(
struct
sock
*
sk
,
int
len
)
static
void
netlink_data_ready
(
struct
sock
*
sk
,
int
len
)
{
struct
netlink_opt
*
nlk
=
nlk_sk
(
sk
);
...
...
@@ -1126,7 +1126,7 @@ static int netlink_seq_show(struct seq_file *seq, void *v)
return
0
;
}
struct
seq_operations
netlink_seq_ops
=
{
st
atic
st
ruct
seq_operations
netlink_seq_ops
=
{
.
start
=
netlink_seq_start
,
.
next
=
netlink_seq_next
,
.
stop
=
netlink_seq_stop
,
...
...
@@ -1159,7 +1159,7 @@ int netlink_unregister_notifier(struct notifier_block *nb)
return
notifier_chain_unregister
(
&
netlink_chain
,
nb
);
}
struct
proto_ops
netlink_ops
=
{
st
atic
st
ruct
proto_ops
netlink_ops
=
{
.
family
=
PF_NETLINK
,
.
owner
=
THIS_MODULE
,
.
release
=
netlink_release
,
...
...
@@ -1180,7 +1180,7 @@ struct proto_ops netlink_ops = {
.
sendpage
=
sock_no_sendpage
,
};
struct
net_proto_family
netlink_family_ops
=
{
st
atic
st
ruct
net_proto_family
netlink_family_ops
=
{
.
family
=
PF_NETLINK
,
.
create
=
netlink_create
,
.
owner
=
THIS_MODULE
,
/* for consistency 8) */
...
...
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