aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-02-02 08:31:55 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-02 08:31:55 -0500
commitae2c27a78f1df5b0967069cd3b916cff1eb044c8 (patch)
treee67f1012e76185bac2e78bb04caa68ed1f7dc2a2
parenta608ab9cb6a5050394498b2520c6e7c162f4e2cf (diff)
parente34efe3b100d0fbdf053128956c3dd0bc68754d6 (diff)
Merge ../linux-2.6
-rw-r--r--Documentation/sysrq.txt66
-rw-r--r--MAINTAINERS8
-rw-r--r--arch/i386/boot/compressed/relocs.c2
-rw-r--r--arch/i386/mach-default/setup.c2
-rw-r--r--arch/sparc/kernel/smp.c8
-rw-r--r--arch/sparc/kernel/sun4d_smp.c2
-rw-r--r--drivers/char/sysrq.c20
-rw-r--r--drivers/ide/ide.c8
-rw-r--r--drivers/ide/pci/via82cxxx.c2
-rw-r--r--drivers/kvm/vmx.c2
-rw-r--r--drivers/net/hamradio/Kconfig6
-rw-r--r--drivers/pci/quirks.c8
-rw-r--r--drivers/pci/search.c10
-rw-r--r--fs/nfsd/nfsfh.c2
-rw-r--r--fs/proc/base.c12
-rw-r--r--include/asm-frv/Kbuild6
-rw-r--r--include/asm-frv/page.h4
-rw-r--r--include/asm-frv/ptrace.h4
-rw-r--r--include/asm-frv/termios.h2
-rw-r--r--include/asm-um/pgtable.h9
-rw-r--r--include/linux/efi.h2
-rw-r--r--kernel/fork.c2
-rw-r--r--mm/page_alloc.c3
-rw-r--r--net/ipv4/netfilter/ip_conntrack_sip.c10
-rw-r--r--net/ipv6/addrconf.c4
-rw-r--r--net/ipv6/ndisc.c7
-rw-r--r--net/netfilter/Kconfig2
-rw-r--r--net/netfilter/nf_conntrack_sip.c10
-rw-r--r--net/netfilter/xt_connbytes.c29
-rw-r--r--net/sctp/sm_sideeffect.c6
30 files changed, 154 insertions, 104 deletions
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt
index e0188a23fd5..61613166981 100644
--- a/Documentation/sysrq.txt
+++ b/Documentation/sysrq.txt
@@ -1,6 +1,6 @@
1Linux Magic System Request Key Hacks 1Linux Magic System Request Key Hacks
2Documentation for sysrq.c version 1.15 2Documentation for sysrq.c
3Last update: $Date: 2001/01/28 10:15:59 $ 3Last update: 2007-JAN-06
4 4
5* What is the magic SysRq key? 5* What is the magic SysRq key?
6~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -35,7 +35,7 @@ You can set the value in the file by the following command:
35 35
36Note that the value of /proc/sys/kernel/sysrq influences only the invocation 36Note that the value of /proc/sys/kernel/sysrq influences only the invocation
37via a keyboard. Invocation of any operation via /proc/sysrq-trigger is always 37via a keyboard. Invocation of any operation via /proc/sysrq-trigger is always
38allowed. 38allowed (by a user with admin privileges).
39 39
40* How do I use the magic SysRq key? 40* How do I use the magic SysRq key?
41~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 41~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -58,7 +58,7 @@ On PowerPC - Press 'ALT - Print Screen (or F13) - <command key>,
58On other - If you know of the key combos for other architectures, please 58On other - If you know of the key combos for other architectures, please
59 let me know so I can add them to this section. 59 let me know so I can add them to this section.
60 60
61On all - write a character to /proc/sysrq-trigger. eg: 61On all - write a character to /proc/sysrq-trigger. e.g.:
62 62
63 echo t > /proc/sysrq-trigger 63 echo t > /proc/sysrq-trigger
64 64
@@ -74,6 +74,8 @@ On all - write a character to /proc/sysrq-trigger. eg:
74 74
75'c' - Will perform a kexec reboot in order to take a crashdump. 75'c' - Will perform a kexec reboot in order to take a crashdump.
76 76
77'd' - Shows all locks that are held.
78
77'o' - Will shut your system off (if configured and supported). 79'o' - Will shut your system off (if configured and supported).
78 80
79's' - Will attempt to sync all mounted filesystems. 81's' - Will attempt to sync all mounted filesystems.
@@ -87,38 +89,43 @@ On all - write a character to /proc/sysrq-trigger. eg:
87 89
88'm' - Will dump current memory info to your console. 90'm' - Will dump current memory info to your console.
89 91
92'n' - Used to make RT tasks nice-able
93
90'v' - Dumps Voyager SMP processor info to your console. 94'v' - Dumps Voyager SMP processor info to your console.
91 95
96'w' - Dumps tasks that are in uninterruptable (blocked) state.
97
98'x' - Used by xmon interface on ppc/powerpc platforms.
99
92'0'-'9' - Sets the console log level, controlling which kernel messages 100'0'-'9' - Sets the console log level, controlling which kernel messages
93 will be printed to your console. ('0', for example would make 101 will be printed to your console. ('0', for example would make
94 it so that only emergency messages like PANICs or OOPSes would 102 it so that only emergency messages like PANICs or OOPSes would
95 make it to your console.) 103 make it to your console.)
96 104
97'f' - Will call oom_kill to kill a memory hog process 105'f' - Will call oom_kill to kill a memory hog process.
98 106
99'e' - Send a SIGTERM to all processes, except for init. 107'e' - Send a SIGTERM to all processes, except for init.
100 108
101'i' - Send a SIGKILL to all processes, except for init. 109'g' - Used by kgdb on ppc platforms.
102 110
103'l' - Send a SIGKILL to all processes, INCLUDING init. (Your system 111'i' - Send a SIGKILL to all processes, except for init.
104 will be non-functional after this.)
105 112
106'h' - Will display help ( actually any other key than those listed 113'h' - Will display help (actually any other key than those listed
107 above will display help. but 'h' is easy to remember :-) 114 above will display help. but 'h' is easy to remember :-)
108 115
109* Okay, so what can I use them for? 116* Okay, so what can I use them for?
110~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 117~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111Well, un'R'aw is very handy when your X server or a svgalib program crashes. 118Well, un'R'aw is very handy when your X server or a svgalib program crashes.
112 119
113sa'K' (Secure Access Key) is useful when you want to be sure there are no 120sa'K' (Secure Access Key) is useful when you want to be sure there is no
114trojan program is running at console and which could grab your password 121trojan program running at console which could grab your password
115when you would try to login. It will kill all programs on given console 122when you would try to login. It will kill all programs on given console,
116and thus letting you make sure that the login prompt you see is actually 123thus letting you make sure that the login prompt you see is actually
117the one from init, not some trojan program. 124the one from init, not some trojan program.
118IMPORTANT: In its true form it is not a true SAK like the one in a :IMPORTANT 125IMPORTANT: In its true form it is not a true SAK like the one in a :IMPORTANT
119IMPORTANT: c2 compliant system, and it should not be mistaken as :IMPORTANT 126IMPORTANT: c2 compliant system, and it should not be mistaken as :IMPORTANT
120IMPORTANT: such. :IMPORTANT 127IMPORTANT: such. :IMPORTANT
121 It seems other find it useful as (System Attention Key) which is 128 It seems others find it useful as (System Attention Key) which is
122useful when you want to exit a program that will not let you switch consoles. 129useful when you want to exit a program that will not let you switch consoles.
123(For example, X or a svgalib program.) 130(For example, X or a svgalib program.)
124 131
@@ -139,8 +146,8 @@ OK or Done message...)
139Again, the unmount (remount read-only) hasn't taken place until you see the 146Again, the unmount (remount read-only) hasn't taken place until you see the
140"OK" and "Done" message appear on the screen. 147"OK" and "Done" message appear on the screen.
141 148
142The loglevel'0'-'9' is useful when your console is being flooded with 149The loglevels '0'-'9' are useful when your console is being flooded with
143kernel messages you do not want to see. Setting '0' will prevent all but 150kernel messages you do not want to see. Selecting '0' will prevent all but
144the most urgent kernel messages from reaching your console. (They will 151the most urgent kernel messages from reaching your console. (They will
145still be logged if syslogd/klogd are alive, though.) 152still be logged if syslogd/klogd are alive, though.)
146 153
@@ -152,7 +159,7 @@ processes.
152~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 159~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153That happens to me, also. I've found that tapping shift, alt, and control 160That happens to me, also. I've found that tapping shift, alt, and control
154on both sides of the keyboard, and hitting an invalid sysrq sequence again 161on both sides of the keyboard, and hitting an invalid sysrq sequence again
155will fix the problem. (ie, something like alt-sysrq-z). Switching to another 162will fix the problem. (i.e., something like alt-sysrq-z). Switching to another
156virtual console (ALT+Fn) and then back again should also help. 163virtual console (ALT+Fn) and then back again should also help.
157 164
158* I hit SysRq, but nothing seems to happen, what's wrong? 165* I hit SysRq, but nothing seems to happen, what's wrong?
@@ -174,11 +181,11 @@ handler function you will use, B) a help_msg string, that will print when SysRQ
174prints help, and C) an action_msg string, that will print right before your 181prints help, and C) an action_msg string, that will print right before your
175handler is called. Your handler must conform to the prototype in 'sysrq.h'. 182handler is called. Your handler must conform to the prototype in 'sysrq.h'.
176 183
177After the sysrq_key_op is created, you can call the macro 184After the sysrq_key_op is created, you can call the kernel function
178register_sysrq_key(int key, struct sysrq_key_op *op_p) that is defined in 185register_sysrq_key(int key, struct sysrq_key_op *op_p); this will
179sysrq.h, this will register the operation pointed to by 'op_p' at table 186register the operation pointed to by 'op_p' at table key 'key',
180key 'key', if that slot in the table is blank. At module unload time, you must 187if that slot in the table is blank. At module unload time, you must call
181call the macro unregister_sysrq_key(int key, struct sysrq_key_op *op_p), which 188the function unregister_sysrq_key(int key, struct sysrq_key_op *op_p), which
182will remove the key op pointed to by 'op_p' from the key 'key', if and only if 189will remove the key op pointed to by 'op_p' from the key 'key', if and only if
183it is currently registered in that slot. This is in case the slot has been 190it is currently registered in that slot. This is in case the slot has been
184overwritten since you registered it. 191overwritten since you registered it.
@@ -186,15 +193,12 @@ overwritten since you registered it.
186The Magic SysRQ system works by registering key operations against a key op 193The Magic SysRQ system works by registering key operations against a key op
187lookup table, which is defined in 'drivers/char/sysrq.c'. This key table has 194lookup table, which is defined in 'drivers/char/sysrq.c'. This key table has
188a number of operations registered into it at compile time, but is mutable, 195a number of operations registered into it at compile time, but is mutable,
189and 4 functions are exported for interface to it: __sysrq_lock_table, 196and 2 functions are exported for interface to it:
190__sysrq_unlock_table, __sysrq_get_key_op, and __sysrq_put_key_op. The 197 register_sysrq_key and unregister_sysrq_key.
191functions __sysrq_swap_key_ops and __sysrq_swap_key_ops_nolock are defined 198Of course, never ever leave an invalid pointer in the table. I.e., when
192in the header itself, and the REGISTER and UNREGISTER macros are built from 199your module that called register_sysrq_key() exits, it must call
193these. More complex (and dangerous!) manipulations of the table are possible 200unregister_sysrq_key() to clean up the sysrq key table entry that it used.
194using these functions, but you must be careful to always lock the table before 201Null pointers in the table are always safe. :)
195you read or write from it, and to unlock it again when you are done. (And of
196course, to never ever leave an invalid pointer in the table). Null pointers in
197the table are always safe :)
198 202
199If for some reason you feel the need to call the handle_sysrq function from 203If for some reason you feel the need to call the handle_sysrq function from
200within a function called by handle_sysrq, you must be aware that you are in 204within a function called by handle_sysrq, you must be aware that you are in
diff --git a/MAINTAINERS b/MAINTAINERS
index 1446cc41c12..465e083237a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -598,8 +598,6 @@ W: http://linux-atm.sourceforge.net
598S: Maintained 598S: Maintained
599 599
600ATMEL MACB ETHERNET DRIVER 600ATMEL MACB ETHERNET DRIVER
601P: Atmel AVR32 Support Team
602M: avr32@atmel.com
603P: Haavard Skinnemoen 601P: Haavard Skinnemoen
604M: hskinnemoen@atmel.com 602M: hskinnemoen@atmel.com
605S: Supported 603S: Supported
@@ -620,8 +618,6 @@ T: git kernel.org:/pub/scm/linux/kernel/git/dwmw2/audit-2.6.git
620S: Maintained 618S: Maintained
621 619
622AVR32 ARCHITECTURE 620AVR32 ARCHITECTURE
623P: Atmel AVR32 Support Team
624M: avr32@atmel.com
625P: Haavard Skinnemoen 621P: Haavard Skinnemoen
626M: hskinnemoen@atmel.com 622M: hskinnemoen@atmel.com
627W: http://www.atmel.com/products/AVR32/ 623W: http://www.atmel.com/products/AVR32/
@@ -630,8 +626,6 @@ W: http://avrfreaks.net/
630S: Supported 626S: Supported
631 627
632AVR32/AT32AP MACHINE SUPPORT 628AVR32/AT32AP MACHINE SUPPORT
633P: Atmel AVR32 Support Team
634M: avr32@atmel.com
635P: Haavard Skinnemoen 629P: Haavard Skinnemoen
636M: hskinnemoen@atmel.com 630M: hskinnemoen@atmel.com
637S: Supported 631S: Supported
@@ -2288,7 +2282,7 @@ P: Jozsef Kadlecsik
2288P: Patrick McHardy 2282P: Patrick McHardy
2289M: kaber@trash.net 2283M: kaber@trash.net
2290L: netfilter-devel@lists.netfilter.org 2284L: netfilter-devel@lists.netfilter.org
2291L: netfilter@lists.netfilter.org 2285L: netfilter@lists.netfilter.org (subscribers-only)
2292L: coreteam@netfilter.org 2286L: coreteam@netfilter.org
2293W: http://www.netfilter.org/ 2287W: http://www.netfilter.org/
2294W: http://www.iptables.org/ 2288W: http://www.iptables.org/
diff --git a/arch/i386/boot/compressed/relocs.c b/arch/i386/boot/compressed/relocs.c
index 468da89153c..881951ca03e 100644
--- a/arch/i386/boot/compressed/relocs.c
+++ b/arch/i386/boot/compressed/relocs.c
@@ -43,6 +43,8 @@ static int is_safe_abs_reloc(const char* sym_name)
43 /* Match found */ 43 /* Match found */
44 return 1; 44 return 1;
45 } 45 }
46 if (strncmp(sym_name, "__crc_", 6) == 0)
47 return 1;
46 return 0; 48 return 0;
47} 49}
48 50
diff --git a/arch/i386/mach-default/setup.c b/arch/i386/mach-default/setup.c
index c511705c386..cc2f519b2f7 100644
--- a/arch/i386/mach-default/setup.c
+++ b/arch/i386/mach-default/setup.c
@@ -102,7 +102,7 @@ void __init time_init_hook(void)
102 * along the MCA bus. Use this to hook into that chain if you will need 102 * along the MCA bus. Use this to hook into that chain if you will need
103 * it. 103 * it.
104 **/ 104 **/
105void __init mca_nmi_hook(void) 105void mca_nmi_hook(void)
106{ 106{
107 /* If I recall correctly, there's a whole bunch of other things that 107 /* If I recall correctly, there's a whole bunch of other things that
108 * we can do to check for NMI problems, but that's all I know about 108 * we can do to check for NMI problems, but that's all I know about
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c
index 276f22881d0..6b5f26b0fb7 100644
--- a/arch/sparc/kernel/smp.c
+++ b/arch/sparc/kernel/smp.c
@@ -292,8 +292,8 @@ int setup_profiling_timer(unsigned int multiplier)
292 292
293void __init smp_prepare_cpus(unsigned int max_cpus) 293void __init smp_prepare_cpus(unsigned int max_cpus)
294{ 294{
295 extern void smp4m_boot_cpus(void); 295 extern void __init smp4m_boot_cpus(void);
296 extern void smp4d_boot_cpus(void); 296 extern void __init smp4d_boot_cpus(void);
297 int i, cpuid, extra; 297 int i, cpuid, extra;
298 298
299 printk("Entering SMP Mode...\n"); 299 printk("Entering SMP Mode...\n");
@@ -375,8 +375,8 @@ void __init smp_prepare_boot_cpu(void)
375 375
376int __cpuinit __cpu_up(unsigned int cpu) 376int __cpuinit __cpu_up(unsigned int cpu)
377{ 377{
378 extern int smp4m_boot_one_cpu(int); 378 extern int __cpuinit smp4m_boot_one_cpu(int);
379 extern int smp4d_boot_one_cpu(int); 379 extern int __cpuinit smp4d_boot_one_cpu(int);
380 int ret=0; 380 int ret=0;
381 381
382 switch(sparc_cpu_model) { 382 switch(sparc_cpu_model) {
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c
index c80ea61e8ba..c69de5d4863 100644
--- a/arch/sparc/kernel/sun4d_smp.c
+++ b/arch/sparc/kernel/sun4d_smp.c
@@ -164,7 +164,7 @@ void __init smp4d_boot_cpus(void)
164 local_flush_cache_all(); 164 local_flush_cache_all();
165} 165}
166 166
167int smp4d_boot_one_cpu(int i) 167int __cpuinit smp4d_boot_one_cpu(int i)
168{ 168{
169 extern unsigned long sun4d_cpu_startup; 169 extern unsigned long sun4d_cpu_startup;
170 unsigned long *entry = &sun4d_cpu_startup; 170 unsigned long *entry = &sun4d_cpu_startup;
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 13935235e06..7fd3cd5ddf2 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -215,7 +215,7 @@ static void sysrq_handle_showstate_blocked(int key, struct tty_struct *tty)
215} 215}
216static struct sysrq_key_op sysrq_showstate_blocked_op = { 216static struct sysrq_key_op sysrq_showstate_blocked_op = {
217 .handler = sysrq_handle_showstate_blocked, 217 .handler = sysrq_handle_showstate_blocked,
218 .help_msg = "showBlockedTasks", 218 .help_msg = "shoW-blocked-tasks",
219 .action_msg = "Show Blocked State", 219 .action_msg = "Show Blocked State",
220 .enable_mask = SYSRQ_ENABLE_DUMP, 220 .enable_mask = SYSRQ_ENABLE_DUMP,
221}; 221};
@@ -315,15 +315,16 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
315 &sysrq_loglevel_op, /* 9 */ 315 &sysrq_loglevel_op, /* 9 */
316 316
317 /* 317 /*
318 * Don't use for system provided sysrqs, it is handled specially on 318 * a: Don't use for system provided sysrqs, it is handled specially on
319 * sparc and will never arrive 319 * sparc and will never arrive.
320 */ 320 */
321 NULL, /* a */ 321 NULL, /* a */
322 &sysrq_reboot_op, /* b */ 322 &sysrq_reboot_op, /* b */
323 &sysrq_crashdump_op, /* c */ 323 &sysrq_crashdump_op, /* c & ibm_emac driver debug */
324 &sysrq_showlocks_op, /* d */ 324 &sysrq_showlocks_op, /* d */
325 &sysrq_term_op, /* e */ 325 &sysrq_term_op, /* e */
326 &sysrq_moom_op, /* f */ 326 &sysrq_moom_op, /* f */
327 /* g: May be registered by ppc for kgdb */
327 NULL, /* g */ 328 NULL, /* g */
328 NULL, /* h */ 329 NULL, /* h */
329 &sysrq_kill_op, /* i */ 330 &sysrq_kill_op, /* i */
@@ -332,18 +333,19 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
332 NULL, /* l */ 333 NULL, /* l */
333 &sysrq_showmem_op, /* m */ 334 &sysrq_showmem_op, /* m */
334 &sysrq_unrt_op, /* n */ 335 &sysrq_unrt_op, /* n */
335 /* This will often be registered as 'Off' at init time */ 336 /* o: This will often be registered as 'Off' at init time */
336 NULL, /* o */ 337 NULL, /* o */
337 &sysrq_showregs_op, /* p */ 338 &sysrq_showregs_op, /* p */
338 NULL, /* q */ 339 NULL, /* q */
339 &sysrq_unraw_op, /* r */ 340 &sysrq_unraw_op, /* r */
340 &sysrq_sync_op, /* s */ 341 &sysrq_sync_op, /* s */
341 &sysrq_showstate_op, /* t */ 342 &sysrq_showstate_op, /* t */
342 &sysrq_mountro_op, /* u */ 343 &sysrq_mountro_op, /* u */
343 /* May be assigned at init time by SMP VOYAGER */ 344 /* v: May be registered at init time by SMP VOYAGER */
344 NULL, /* v */ 345 NULL, /* v */
345 NULL, /* w */ 346 &sysrq_showstate_blocked_op, /* w */
346 &sysrq_showstate_blocked_op, /* x */ 347 /* x: May be registered on ppc/powerpc for xmon */
348 NULL, /* x */
347 NULL, /* y */ 349 NULL, /* y */
348 NULL /* z */ 350 NULL /* z */
349}; 351};
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 3b334af0c7b..6c9bd5165bd 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1781,9 +1781,9 @@ done:
1781 return 1; 1781 return 1;
1782} 1782}
1783 1783
1784extern void pnpide_init(void); 1784extern void __init pnpide_init(void);
1785extern void pnpide_exit(void); 1785extern void __exit pnpide_exit(void);
1786extern void h8300_ide_init(void); 1786extern void __init h8300_ide_init(void);
1787 1787
1788/* 1788/*
1789 * probe_for_hwifs() finds/initializes "known" IDE interfaces 1789 * probe_for_hwifs() finds/initializes "known" IDE interfaces
@@ -2088,7 +2088,7 @@ int __init init_module (void)
2088 return ide_init(); 2088 return ide_init();
2089} 2089}
2090 2090
2091void cleanup_module (void) 2091void __exit cleanup_module (void)
2092{ 2092{
2093 int index; 2093 int index;
2094 2094
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index a98b4d38b9d..6fb6e50b823 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -78,7 +78,7 @@ static struct via_isa_bridge {
78 u8 rev_max; 78 u8 rev_max;
79 u16 flags; 79 u16 flags;
80} via_isa_bridges[] = { 80} via_isa_bridges[] = {
81 { "cx7000", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 81 { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
82 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 82 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
83 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 83 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
84 { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 84 { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 27f2751c3ba..54c35c0b318 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1116,6 +1116,8 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu)
1116 1116
1117 if (rdmsr_safe(index, &data_low, &data_high) < 0) 1117 if (rdmsr_safe(index, &data_low, &data_high) < 0)
1118 continue; 1118 continue;
1119 if (wrmsr_safe(index, data_low, data_high) < 0)
1120 continue;
1119 data = data_low | ((u64)data_high << 32); 1121 data = data_low | ((u64)data_high << 32);
1120 vcpu->host_msrs[j].index = index; 1122 vcpu->host_msrs[j].index = index;
1121 vcpu->host_msrs[j].reserved = 0; 1123 vcpu->host_msrs[j].reserved = 0;
diff --git a/drivers/net/hamradio/Kconfig b/drivers/net/hamradio/Kconfig
index 896aa02000d..feb0ada7a02 100644
--- a/drivers/net/hamradio/Kconfig
+++ b/drivers/net/hamradio/Kconfig
@@ -113,7 +113,7 @@ config SCC_TRXECHO
113 113
114config BAYCOM_SER_FDX 114config BAYCOM_SER_FDX
115 tristate "BAYCOM ser12 fullduplex driver for AX.25" 115 tristate "BAYCOM ser12 fullduplex driver for AX.25"
116 depends on AX25 116 depends on AX25 && !S390
117 select CRC_CCITT 117 select CRC_CCITT
118 ---help--- 118 ---help---
119 This is one of two drivers for Baycom style simple amateur radio 119 This is one of two drivers for Baycom style simple amateur radio
@@ -133,7 +133,7 @@ config BAYCOM_SER_FDX
133 133
134config BAYCOM_SER_HDX 134config BAYCOM_SER_HDX
135 tristate "BAYCOM ser12 halfduplex driver for AX.25" 135 tristate "BAYCOM ser12 halfduplex driver for AX.25"
136 depends on AX25 136 depends on AX25 && !S390
137 select CRC_CCITT 137 select CRC_CCITT
138 ---help--- 138 ---help---
139 This is one of two drivers for Baycom style simple amateur radio 139 This is one of two drivers for Baycom style simple amateur radio
@@ -181,7 +181,7 @@ config BAYCOM_EPP
181 181
182config YAM 182config YAM
183 tristate "YAM driver for AX.25" 183 tristate "YAM driver for AX.25"
184 depends on AX25 184 depends on AX25 && !S390
185 help 185 help
186 The YAM is a modem for packet radio which connects to the serial 186 The YAM is a modem for packet radio which connects to the serial
187 port and includes some of the functions of a Terminal Node 187 port and includes some of the functions of a Terminal Node
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 16945c2ba2c..dcc0c1ab95e 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -661,9 +661,11 @@ static void quirk_via_bridge(struct pci_dev *dev)
661 /* See what bridge we have and find the device ranges */ 661 /* See what bridge we have and find the device ranges */
662 switch (dev->device) { 662 switch (dev->device) {
663 case PCI_DEVICE_ID_VIA_82C686: 663 case PCI_DEVICE_ID_VIA_82C686:
664 /* 82C686 is special */ 664 /* The VT82C686 is special, it attaches to PCI and can have
665 via_vlink_dev_lo = 7; 665 any device number. All its subdevices are functions of
666 via_vlink_dev_hi = 7; 666 that single device. */
667 via_vlink_dev_lo = PCI_SLOT(dev->devfn);
668 via_vlink_dev_hi = PCI_SLOT(dev->devfn);
667 break; 669 break;
668 case PCI_DEVICE_ID_VIA_8237: 670 case PCI_DEVICE_ID_VIA_8237:
669 case PCI_DEVICE_ID_VIA_8237A: 671 case PCI_DEVICE_ID_VIA_8237A:
diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index fab381ed853..b2653c4afe9 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -200,11 +200,8 @@ static struct pci_dev * pci_find_subsys(unsigned int vendor,
200 * can cause some machines to crash. So here we detect and flag that 200 * can cause some machines to crash. So here we detect and flag that
201 * situation and bail out early. 201 * situation and bail out early.
202 */ 202 */
203 if (unlikely(list_empty(&pci_devices))) { 203 if (unlikely(list_empty(&pci_devices)))
204 printk(KERN_INFO "pci_find_subsys() called while pci_devices "
205 "is still empty\n");
206 return NULL; 204 return NULL;
207 }
208 down_read(&pci_bus_sem); 205 down_read(&pci_bus_sem);
209 n = from ? from->global_list.next : pci_devices.next; 206 n = from ? from->global_list.next : pci_devices.next;
210 207
@@ -278,11 +275,8 @@ pci_get_subsys(unsigned int vendor, unsigned int device,
278 * can cause some machines to crash. So here we detect and flag that 275 * can cause some machines to crash. So here we detect and flag that
279 * situation and bail out early. 276 * situation and bail out early.
280 */ 277 */
281 if (unlikely(list_empty(&pci_devices))) { 278 if (unlikely(list_empty(&pci_devices)))
282 printk(KERN_NOTICE "pci_get_subsys() called while pci_devices "
283 "is still empty\n");
284 return NULL; 279 return NULL;
285 }
286 down_read(&pci_bus_sem); 280 down_read(&pci_bus_sem);
287 n = from ? from->global_list.next : pci_devices.next; 281 n = from ? from->global_list.next : pci_devices.next;
288 282
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index 98338a569dc..c59d6fbb7a6 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -269,7 +269,7 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access)
269 "acc=%x, error=%d\n", 269 "acc=%x, error=%d\n",
270 dentry->d_parent->d_name.name, 270 dentry->d_parent->d_name.name,
271 dentry->d_name.name, 271 dentry->d_name.name,
272 access, (error >> 24)); 272 access, ntohl(error));
273 } 273 }
274out: 274out:
275 if (exp && !IS_ERR(exp)) 275 if (exp && !IS_ERR(exp))
diff --git a/fs/proc/base.c b/fs/proc/base.c
index ff7a6685060..1a979ea3b37 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2328,13 +2328,23 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi
2328{ 2328{
2329 struct dentry *dentry = filp->f_path.dentry; 2329 struct dentry *dentry = filp->f_path.dentry;
2330 struct inode *inode = dentry->d_inode; 2330 struct inode *inode = dentry->d_inode;
2331 struct task_struct *leader = get_proc_task(inode); 2331 struct task_struct *leader = NULL;
2332 struct task_struct *task; 2332 struct task_struct *task;
2333 int retval = -ENOENT; 2333 int retval = -ENOENT;
2334 ino_t ino; 2334 ino_t ino;
2335 int tid; 2335 int tid;
2336 unsigned long pos = filp->f_pos; /* avoiding "long long" filp->f_pos */ 2336 unsigned long pos = filp->f_pos; /* avoiding "long long" filp->f_pos */
2337 2337
2338 task = get_proc_task(inode);
2339 if (!task)
2340 goto out_no_task;
2341 rcu_read_lock();
2342 if (pid_alive(task)) {
2343 leader = task->group_leader;
2344 get_task_struct(leader);
2345 }
2346 rcu_read_unlock();
2347 put_task_struct(task);
2338 if (!leader) 2348 if (!leader)
2339 goto out_no_task; 2349 goto out_no_task;
2340 retval = 0; 2350 retval = 0;
diff --git a/include/asm-frv/Kbuild b/include/asm-frv/Kbuild
index c68e1680da0..966a9836d55 100644
--- a/include/asm-frv/Kbuild
+++ b/include/asm-frv/Kbuild
@@ -1 +1,7 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2
3header-y += registers.h
4
5unifdef-y += termios.h
6unifdef-y += ptrace.h
7unifdef-y += page.h
diff --git a/include/asm-frv/page.h b/include/asm-frv/page.h
index 134cc0cdf6c..213d92fd652 100644
--- a/include/asm-frv/page.h
+++ b/include/asm-frv/page.h
@@ -76,8 +76,6 @@ extern unsigned long max_pfn;
76 76
77#endif /* __ASSEMBLY__ */ 77#endif /* __ASSEMBLY__ */
78 78
79#endif /* __KERNEL__ */
80
81#ifdef CONFIG_CONTIGUOUS_PAGE_ALLOC 79#ifdef CONFIG_CONTIGUOUS_PAGE_ALLOC
82#define WANT_PAGE_VIRTUAL 1 80#define WANT_PAGE_VIRTUAL 1
83#endif 81#endif
@@ -85,4 +83,6 @@ extern unsigned long max_pfn;
85#include <asm-generic/memory_model.h> 83#include <asm-generic/memory_model.h>
86#include <asm-generic/page.h> 84#include <asm-generic/page.h>
87 85
86#endif /* __KERNEL__ */
87
88#endif /* _ASM_PAGE_H */ 88#endif /* _ASM_PAGE_H */
diff --git a/include/asm-frv/ptrace.h b/include/asm-frv/ptrace.h
index 9a2241b8eb1..cf6934012b6 100644
--- a/include/asm-frv/ptrace.h
+++ b/include/asm-frv/ptrace.h
@@ -12,9 +12,11 @@
12#define _ASM_PTRACE_H 12#define _ASM_PTRACE_H
13 13
14#include <asm/registers.h> 14#include <asm/registers.h>
15#ifdef __KERNEL__
15#include <asm/irq_regs.h> 16#include <asm/irq_regs.h>
16 17
17#define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0) 18#define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0)
19#endif
18 20
19 21
20#define PT_PSR 0 22#define PT_PSR 0
@@ -60,6 +62,7 @@
60#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ 62#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */
61#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ 63#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */
62 64
65#ifdef __KERNEL__
63#ifndef __ASSEMBLY__ 66#ifndef __ASSEMBLY__
64 67
65/* 68/*
@@ -74,6 +77,7 @@ register struct pt_regs *__frame asm("gr28");
74extern unsigned long user_stack(const struct pt_regs *); 77extern unsigned long user_stack(const struct pt_regs *);
75extern void show_regs(struct pt_regs *); 78extern void show_regs(struct pt_regs *);
76#define profile_pc(regs) ((regs)->pc) 79#define profile_pc(regs) ((regs)->pc)
80#endif
77 81
78#endif /* !__ASSEMBLY__ */ 82#endif /* !__ASSEMBLY__ */
79#endif /* _ASM_PTRACE_H */ 83#endif /* _ASM_PTRACE_H */
diff --git a/include/asm-frv/termios.h b/include/asm-frv/termios.h
index b4a664e7f55..8840cf95e8d 100644
--- a/include/asm-frv/termios.h
+++ b/include/asm-frv/termios.h
@@ -69,6 +69,8 @@ struct termio {
69#define N_SYNC_PPP 14 69#define N_SYNC_PPP 14
70#define N_HCI 15 /* Bluetooth HCI UART */ 70#define N_HCI 15 /* Bluetooth HCI UART */
71 71
72#ifdef __KERNEL__
72#include <asm-generic/termios.h> 73#include <asm-generic/termios.h>
74#endif
73 75
74#endif /* _ASM_TERMIOS_H */ 76#endif /* _ASM_TERMIOS_H */
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h
index 188f7262177..e57ff136ee5 100644
--- a/include/asm-um/pgtable.h
+++ b/include/asm-um/pgtable.h
@@ -408,6 +408,15 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
408 408
409#include <asm-generic/pgtable-nopud.h> 409#include <asm-generic/pgtable-nopud.h>
410 410
411#ifdef CONFIG_HIGHMEM
412/* Clear a kernel PTE and flush it from the TLB */
413#define kpte_clear_flush(ptep, vaddr) \
414do { \
415 pte_clear(&init_mm, vaddr, ptep); \
416 __flush_tlb_one(vaddr); \
417} while (0)
418#endif
419
411#endif 420#endif
412#endif 421#endif
413 422
diff --git a/include/linux/efi.h b/include/linux/efi.h
index df1c91855f0..f8ebd7c1ddb 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -301,7 +301,7 @@ extern int __init efi_uart_console_only (void);
301extern void efi_initialize_iomem_resources(struct resource *code_resource, 301extern void efi_initialize_iomem_resources(struct resource *code_resource,
302 struct resource *data_resource); 302 struct resource *data_resource);
303extern unsigned long efi_get_time(void); 303extern unsigned long efi_get_time(void);
304extern int __init efi_set_rtc_mmss(unsigned long nowtime); 304extern int efi_set_rtc_mmss(unsigned long nowtime);
305extern int is_available_memory(efi_memory_desc_t * md); 305extern int is_available_memory(efi_memory_desc_t * md);
306extern struct efi_memory_map memmap; 306extern struct efi_memory_map memmap;
307 307
diff --git a/kernel/fork.c b/kernel/fork.c
index fc723e595cd..d57118da73f 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1313,7 +1313,7 @@ noinline struct pt_regs * __devinit __attribute__((weak)) idle_regs(struct pt_re
1313 return regs; 1313 return regs;
1314} 1314}
1315 1315
1316struct task_struct * __devinit fork_idle(int cpu) 1316struct task_struct * __cpuinit fork_idle(int cpu)
1317{ 1317{
1318 struct task_struct *task; 1318 struct task_struct *task;
1319 struct pt_regs regs; 1319 struct pt_regs regs;
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index fc5b5442e94..2c606cc922a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -989,8 +989,7 @@ int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
989 int classzone_idx, int alloc_flags) 989 int classzone_idx, int alloc_flags)
990{ 990{
991 /* free_pages my go negative - that's OK */ 991 /* free_pages my go negative - that's OK */
992 unsigned long min = mark; 992 long min = mark, free_pages = z->free_pages - (1 << order) + 1;
993 long free_pages = z->free_pages - (1 << order) + 1;
994 int o; 993 int o;
995 994
996 if (alloc_flags & ALLOC_HIGH) 995 if (alloc_flags & ALLOC_HIGH)
diff --git a/net/ipv4/netfilter/ip_conntrack_sip.c b/net/ipv4/netfilter/ip_conntrack_sip.c
index 3a26d63eed8..11c588a10e6 100644
--- a/net/ipv4/netfilter/ip_conntrack_sip.c
+++ b/net/ipv4/netfilter/ip_conntrack_sip.c
@@ -283,10 +283,16 @@ static int skp_epaddr_len(const char *dptr, const char *limit, int *shift)
283{ 283{
284 int s = *shift; 284 int s = *shift;
285 285
286 for (; dptr <= limit && *dptr != '@'; dptr++) 286 /* Search for @, but stop at the end of the line.
287 * We are inside a sip: URI, so we don't need to worry about
288 * continuation lines. */
289 while (dptr <= limit &&
290 *dptr != '@' && *dptr != '\r' && *dptr != '\n') {
287 (*shift)++; 291 (*shift)++;
292 dptr++;
293 }
288 294
289 if (*dptr == '@') { 295 if (dptr <= limit && *dptr == '@') {
290 dptr++; 296 dptr++;
291 (*shift)++; 297 (*shift)++;
292 } else 298 } else
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 2a7e4618f52..e3854696988 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3393,7 +3393,7 @@ static void inline ipv6_store_devconf(struct ipv6_devconf *cnf,
3393#ifdef CONFIG_IPV6_ROUTER_PREF 3393#ifdef CONFIG_IPV6_ROUTER_PREF
3394 array[DEVCONF_ACCEPT_RA_RTR_PREF] = cnf->accept_ra_rtr_pref; 3394 array[DEVCONF_ACCEPT_RA_RTR_PREF] = cnf->accept_ra_rtr_pref;
3395 array[DEVCONF_RTR_PROBE_INTERVAL] = cnf->rtr_probe_interval; 3395 array[DEVCONF_RTR_PROBE_INTERVAL] = cnf->rtr_probe_interval;
3396#ifdef CONFIV_IPV6_ROUTE_INFO 3396#ifdef CONFIG_IPV6_ROUTE_INFO
3397 array[DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN] = cnf->accept_ra_rt_info_max_plen; 3397 array[DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN] = cnf->accept_ra_rt_info_max_plen;
3398#endif 3398#endif
3399#endif 3399#endif
@@ -3898,7 +3898,7 @@ static struct addrconf_sysctl_table
3898 .proc_handler = &proc_dointvec_jiffies, 3898 .proc_handler = &proc_dointvec_jiffies,
3899 .strategy = &sysctl_jiffies, 3899 .strategy = &sysctl_jiffies,
3900 }, 3900 },
3901#ifdef CONFIV_IPV6_ROUTE_INFO 3901#ifdef CONFIG_IPV6_ROUTE_INFO
3902 { 3902 {
3903 .ctl_name = NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN, 3903 .ctl_name = NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN,
3904 .procname = "accept_ra_rt_info_max_plen", 3904 .procname = "accept_ra_rt_info_max_plen",
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 6a9f616de37..39bb658f3c4 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1413,6 +1413,13 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
1413 return; 1413 return;
1414 } 1414 }
1415 1415
1416 if (!ipv6_addr_equal(&skb->nh.ipv6h->daddr, target) &&
1417 !(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) {
1418 ND_PRINTK2(KERN_WARNING
1419 "ICMPv6 Redirect: target address is not link-local.\n");
1420 return;
1421 }
1422
1416 ndisc_flow_init(&fl, NDISC_REDIRECT, &saddr_buf, &skb->nh.ipv6h->saddr, 1423 ndisc_flow_init(&fl, NDISC_REDIRECT, &saddr_buf, &skb->nh.ipv6h->saddr,
1417 dev->ifindex); 1424 dev->ifindex);
1418 1425
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index cd10e44db01..2a2bcb303bf 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -628,7 +628,7 @@ config NETFILTER_XT_MATCH_TCPMSS
628 628
629config NETFILTER_XT_MATCH_HASHLIMIT 629config NETFILTER_XT_MATCH_HASHLIMIT
630 tristate '"hashlimit" match support' 630 tristate '"hashlimit" match support'
631 depends on NETFILTER_XTABLES 631 depends on NETFILTER_XTABLES && (IP6_NF_IPTABLES || IP6_NF_IPTABLES=n)
632 help 632 help
633 This option adds a `hashlimit' match. 633 This option adds a `hashlimit' match.
634 634
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index eb2a2411f97..9dec1153467 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -303,10 +303,16 @@ static int skp_epaddr_len(struct nf_conn *ct, const char *dptr,
303{ 303{
304 int s = *shift; 304 int s = *shift;
305 305
306 for (; dptr <= limit && *dptr != '@'; dptr++) 306 /* Search for @, but stop at the end of the line.
307 * We are inside a sip: URI, so we don't need to worry about
308 * continuation lines. */
309 while (dptr <= limit &&
310 *dptr != '@' && *dptr != '\r' && *dptr != '\n') {
307 (*shift)++; 311 (*shift)++;
312 dptr++;
313 }
308 314
309 if (*dptr == '@') { 315 if (dptr <= limit && *dptr == '@') {
310 dptr++; 316 dptr++;
311 (*shift)++; 317 (*shift)++;
312 } else 318 } else
diff --git a/net/netfilter/xt_connbytes.c b/net/netfilter/xt_connbytes.c
index d93cb096a67..5e32dfa2668 100644
--- a/net/netfilter/xt_connbytes.c
+++ b/net/netfilter/xt_connbytes.c
@@ -52,6 +52,8 @@ match(const struct sk_buff *skb,
52{ 52{
53 const struct xt_connbytes_info *sinfo = matchinfo; 53 const struct xt_connbytes_info *sinfo = matchinfo;
54 u_int64_t what = 0; /* initialize to make gcc happy */ 54 u_int64_t what = 0; /* initialize to make gcc happy */
55 u_int64_t bytes = 0;
56 u_int64_t pkts = 0;
55 const struct ip_conntrack_counter *counters; 57 const struct ip_conntrack_counter *counters;
56 58
57 if (!(counters = nf_ct_get_counters(skb))) 59 if (!(counters = nf_ct_get_counters(skb)))
@@ -89,29 +91,22 @@ match(const struct sk_buff *skb,
89 case XT_CONNBYTES_AVGPKT: 91 case XT_CONNBYTES_AVGPKT:
90 switch (sinfo->direction) { 92 switch (sinfo->direction) {
91 case XT_CONNBYTES_DIR_ORIGINAL: 93 case XT_CONNBYTES_DIR_ORIGINAL:
92 what = div64_64(counters[IP_CT_DIR_ORIGINAL].bytes, 94 bytes = counters[IP_CT_DIR_ORIGINAL].bytes;
93 counters[IP_CT_DIR_ORIGINAL].packets); 95 pkts = counters[IP_CT_DIR_ORIGINAL].packets;
94 break; 96 break;
95 case XT_CONNBYTES_DIR_REPLY: 97 case XT_CONNBYTES_DIR_REPLY:
96 what = div64_64(counters[IP_CT_DIR_REPLY].bytes, 98 bytes = counters[IP_CT_DIR_REPLY].bytes;
97 counters[IP_CT_DIR_REPLY].packets); 99 pkts = counters[IP_CT_DIR_REPLY].packets;
98 break; 100 break;
99 case XT_CONNBYTES_DIR_BOTH: 101 case XT_CONNBYTES_DIR_BOTH:
100 { 102 bytes = counters[IP_CT_DIR_ORIGINAL].bytes +
101 u_int64_t bytes; 103 counters[IP_CT_DIR_REPLY].bytes;
102 u_int64_t pkts; 104 pkts = counters[IP_CT_DIR_ORIGINAL].packets +
103 bytes = counters[IP_CT_DIR_ORIGINAL].bytes + 105 counters[IP_CT_DIR_REPLY].packets;
104 counters[IP_CT_DIR_REPLY].bytes;
105 pkts = counters[IP_CT_DIR_ORIGINAL].packets+
106 counters[IP_CT_DIR_REPLY].packets;
107
108 /* FIXME_THEORETICAL: what to do if sum
109 * overflows ? */
110
111 what = div64_64(bytes, pkts);
112 }
113 break; 106 break;
114 } 107 }
108 if (pkts != 0)
109 what = div64_64(bytes, pkts);
115 break; 110 break;
116 } 111 }
117 112
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index 8bd30976cde..6db77d1329f 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -621,7 +621,13 @@ static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds,
621 /* The receiver of the HEARTBEAT ACK should also perform an 621 /* The receiver of the HEARTBEAT ACK should also perform an
622 * RTT measurement for that destination transport address 622 * RTT measurement for that destination transport address
623 * using the time value carried in the HEARTBEAT ACK chunk. 623 * using the time value carried in the HEARTBEAT ACK chunk.
624 * If the transport's rto_pending variable has been cleared,
625 * it was most likely due to a retransmit. However, we want
626 * to re-enable it to properly update the rto.
624 */ 627 */
628 if (t->rto_pending == 0)
629 t->rto_pending = 1;
630
625 hbinfo = (sctp_sender_hb_info_t *) chunk->skb->data; 631 hbinfo = (sctp_sender_hb_info_t *) chunk->skb->data;
626 sctp_transport_update_rto(t, (jiffies - hbinfo->sent_at)); 632 sctp_transport_update_rto(t, (jiffies - hbinfo->sent_at));
627 633