/[linux-patches]/genpatches-2.6/tags/2.6.12-12/1003_linux-2.6.12.3.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.12-12/1003_linux-2.6.12.3.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 137 - (show annotations) (download)
Tue Aug 9 21:23:12 2005 UTC (12 years, 10 months ago) by dsd
File size: 18537 byte(s)
2.6.12-12 release
1 diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c
2 --- a/arch/ppc/kernel/time.c
3 +++ b/arch/ppc/kernel/time.c
4 @@ -89,6 +89,9 @@ unsigned long tb_to_ns_scale;
5
6 extern unsigned long wall_jiffies;
7
8 +/* used for timezone offset */
9 +static long timezone_offset;
10 +
11 DEFINE_SPINLOCK(rtc_lock);
12
13 EXPORT_SYMBOL(rtc_lock);
14 @@ -170,7 +173,7 @@ void timer_interrupt(struct pt_regs * re
15 xtime.tv_sec - last_rtc_update >= 659 &&
16 abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ &&
17 jiffies - wall_jiffies == 1) {
18 - if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0)
19 + if (ppc_md.set_rtc_time(xtime.tv_sec+1 + timezone_offset) == 0)
20 last_rtc_update = xtime.tv_sec+1;
21 else
22 /* Try again one minute later */
23 @@ -286,7 +289,7 @@ void __init time_init(void)
24 unsigned old_stamp, stamp, elapsed;
25
26 if (ppc_md.time_init != NULL)
27 - time_offset = ppc_md.time_init();
28 + timezone_offset = ppc_md.time_init();
29
30 if (__USE_RTC()) {
31 /* 601 processor: dec counts down by 128 every 128ns */
32 @@ -331,10 +334,10 @@ void __init time_init(void)
33 set_dec(tb_ticks_per_jiffy);
34
35 /* If platform provided a timezone (pmac), we correct the time */
36 - if (time_offset) {
37 - sys_tz.tz_minuteswest = -time_offset / 60;
38 + if (timezone_offset) {
39 + sys_tz.tz_minuteswest = -timezone_offset / 60;
40 sys_tz.tz_dsttime = 0;
41 - xtime.tv_sec -= time_offset;
42 + xtime.tv_sec -= timezone_offset;
43 }
44 set_normalized_timespec(&wall_to_monotonic,
45 -xtime.tv_sec, -xtime.tv_nsec);
46 diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
47 --- a/arch/um/kernel/process.c
48 +++ b/arch/um/kernel/process.c
49 @@ -130,7 +130,7 @@ int start_fork_tramp(void *thread_arg, u
50 return(arg.pid);
51 }
52
53 -static int ptrace_child(void)
54 +static int ptrace_child(void *arg)
55 {
56 int ret;
57 int pid = os_getpid(), ppid = getppid();
58 @@ -159,16 +159,20 @@ static int ptrace_child(void)
59 _exit(ret);
60 }
61
62 -static int start_ptraced_child(void)
63 +static int start_ptraced_child(void **stack_out)
64 {
65 + void *stack;
66 + unsigned long sp;
67 int pid, n, status;
68
69 - pid = fork();
70 - if(pid == 0)
71 - ptrace_child();
72 -
73 + stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC,
74 + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
75 + if(stack == MAP_FAILED)
76 + panic("check_ptrace : mmap failed, errno = %d", errno);
77 + sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *);
78 + pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL);
79 if(pid < 0)
80 - panic("check_ptrace : fork failed, errno = %d", errno);
81 + panic("check_ptrace : clone failed, errno = %d", errno);
82 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
83 if(n < 0)
84 panic("check_ptrace : wait failed, errno = %d", errno);
85 @@ -176,6 +180,7 @@ static int start_ptraced_child(void)
86 panic("check_ptrace : expected SIGSTOP, got status = %d",
87 status);
88
89 + *stack_out = stack;
90 return(pid);
91 }
92
93 @@ -183,12 +188,12 @@ static int start_ptraced_child(void)
94 * just avoid using sysemu, not panic, but only if SYSEMU features are broken.
95 * So only for SYSEMU features we test mustpanic, while normal host features
96 * must work anyway!*/
97 -static int stop_ptraced_child(int pid, int exitcode, int mustexit)
98 +static int stop_ptraced_child(int pid, void *stack, int exitcode, int mustpanic)
99 {
100 int status, n, ret = 0;
101
102 if(ptrace(PTRACE_CONT, pid, 0, 0) < 0)
103 - panic("stop_ptraced_child : ptrace failed, errno = %d", errno);
104 + panic("check_ptrace : ptrace failed, errno = %d", errno);
105 CATCH_EINTR(n = waitpid(pid, &status, 0));
106 if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) {
107 int exit_with = WEXITSTATUS(status);
108 @@ -199,13 +204,15 @@ static int stop_ptraced_child(int pid, i
109 printk("check_ptrace : child exited with exitcode %d, while "
110 "expecting %d; status 0x%x", exit_with,
111 exitcode, status);
112 - if (mustexit)
113 + if (mustpanic)
114 panic("\n");
115 else
116 printk("\n");
117 ret = -1;
118 }
119
120 + if(munmap(stack, PAGE_SIZE) < 0)
121 + panic("check_ptrace : munmap failed, errno = %d", errno);
122 return ret;
123 }
124
125 @@ -227,11 +234,12 @@ __uml_setup("nosysemu", nosysemu_cmd_par
126
127 static void __init check_sysemu(void)
128 {
129 + void *stack;
130 int pid, syscall, n, status, count=0;
131
132 printk("Checking syscall emulation patch for ptrace...");
133 sysemu_supported = 0;
134 - pid = start_ptraced_child();
135 + pid = start_ptraced_child(&stack);
136
137 if(ptrace(PTRACE_SYSEMU, pid, 0, 0) < 0)
138 goto fail;
139 @@ -249,7 +257,7 @@ static void __init check_sysemu(void)
140 panic("check_sysemu : failed to modify system "
141 "call return, errno = %d", errno);
142
143 - if (stop_ptraced_child(pid, 0, 0) < 0)
144 + if (stop_ptraced_child(pid, stack, 0, 0) < 0)
145 goto fail_stopped;
146
147 sysemu_supported = 1;
148 @@ -257,7 +265,7 @@ static void __init check_sysemu(void)
149 set_using_sysemu(!force_sysemu_disabled);
150
151 printk("Checking advanced syscall emulation patch for ptrace...");
152 - pid = start_ptraced_child();
153 + pid = start_ptraced_child(&stack);
154 while(1){
155 count++;
156 if(ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0)
157 @@ -282,7 +290,7 @@ static void __init check_sysemu(void)
158 break;
159 }
160 }
161 - if (stop_ptraced_child(pid, 0, 0) < 0)
162 + if (stop_ptraced_child(pid, stack, 0, 0) < 0)
163 goto fail_stopped;
164
165 sysemu_supported = 2;
166 @@ -293,17 +301,18 @@ static void __init check_sysemu(void)
167 return;
168
169 fail:
170 - stop_ptraced_child(pid, 1, 0);
171 + stop_ptraced_child(pid, stack, 1, 0);
172 fail_stopped:
173 printk("missing\n");
174 }
175
176 void __init check_ptrace(void)
177 {
178 + void *stack;
179 int pid, syscall, n, status;
180
181 printk("Checking that ptrace can change system call numbers...");
182 - pid = start_ptraced_child();
183 + pid = start_ptraced_child(&stack);
184
185 if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)
186 panic("check_ptrace: PTRACE_SETOPTIONS failed, errno = %d", errno);
187 @@ -330,7 +339,7 @@ void __init check_ptrace(void)
188 break;
189 }
190 }
191 - stop_ptraced_child(pid, 0, 1);
192 + stop_ptraced_child(pid, stack, 0, 1);
193 printk("OK\n");
194 check_sysemu();
195 }
196 @@ -362,10 +371,11 @@ void forward_pending_sigio(int target)
197 static inline int check_skas3_ptrace_support(void)
198 {
199 struct ptrace_faultinfo fi;
200 + void *stack;
201 int pid, n, ret = 1;
202
203 printf("Checking for the skas3 patch in the host...");
204 - pid = start_ptraced_child();
205 + pid = start_ptraced_child(&stack);
206
207 n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi);
208 if (n < 0) {
209 @@ -380,7 +390,7 @@ static inline int check_skas3_ptrace_sup
210 }
211
212 init_registers(pid);
213 - stop_ptraced_child(pid, 1, 1);
214 + stop_ptraced_child(pid, stack, 1, 1);
215
216 return(ret);
217 }
218 diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
219 --- a/drivers/acpi/pci_irq.c
220 +++ b/drivers/acpi/pci_irq.c
221 @@ -433,7 +433,7 @@ acpi_pci_irq_enable (
222 printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: no GSI",
223 pci_name(dev), ('A' + pin));
224 /* Interrupt Line values above 0xF are forbidden */
225 - if (dev->irq >= 0 && (dev->irq <= 0xF)) {
226 + if (dev->irq > 0 && (dev->irq <= 0xF)) {
227 printk(" - using IRQ %d\n", dev->irq);
228 acpi_register_gsi(dev->irq, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW);
229 return_VALUE(0);
230 diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
231 --- a/drivers/char/tpm/tpm.c
232 +++ b/drivers/char/tpm/tpm.c
233 @@ -32,12 +32,6 @@
234
235 #define TPM_BUFSIZE 2048
236
237 -/* PCI configuration addresses */
238 -#define PCI_GEN_PMCON_1 0xA0
239 -#define PCI_GEN1_DEC 0xE4
240 -#define PCI_LPC_EN 0xE6
241 -#define PCI_GEN2_DEC 0xEC
242 -
243 static LIST_HEAD(tpm_chip_list);
244 static DEFINE_SPINLOCK(driver_lock);
245 static int dev_mask[32];
246 @@ -61,72 +55,6 @@ void tpm_time_expired(unsigned long ptr)
247 EXPORT_SYMBOL_GPL(tpm_time_expired);
248
249 /*
250 - * Initialize the LPC bus and enable the TPM ports
251 - */
252 -int tpm_lpc_bus_init(struct pci_dev *pci_dev, u16 base)
253 -{
254 - u32 lpcenable, tmp;
255 - int is_lpcm = 0;
256 -
257 - switch (pci_dev->vendor) {
258 - case PCI_VENDOR_ID_INTEL:
259 - switch (pci_dev->device) {
260 - case PCI_DEVICE_ID_INTEL_82801CA_12:
261 - case PCI_DEVICE_ID_INTEL_82801DB_12:
262 - is_lpcm = 1;
263 - break;
264 - }
265 - /* init ICH (enable LPC) */
266 - pci_read_config_dword(pci_dev, PCI_GEN1_DEC, &lpcenable);
267 - lpcenable |= 0x20000000;
268 - pci_write_config_dword(pci_dev, PCI_GEN1_DEC, lpcenable);
269 -
270 - if (is_lpcm) {
271 - pci_read_config_dword(pci_dev, PCI_GEN1_DEC,
272 - &lpcenable);
273 - if ((lpcenable & 0x20000000) == 0) {
274 - dev_err(&pci_dev->dev,
275 - "cannot enable LPC\n");
276 - return -ENODEV;
277 - }
278 - }
279 -
280 - /* initialize TPM registers */
281 - pci_read_config_dword(pci_dev, PCI_GEN2_DEC, &tmp);
282 -
283 - if (!is_lpcm)
284 - tmp = (tmp & 0xFFFF0000) | (base & 0xFFF0);
285 - else
286 - tmp =
287 - (tmp & 0xFFFF0000) | (base & 0xFFF0) |
288 - 0x00000001;
289 -
290 - pci_write_config_dword(pci_dev, PCI_GEN2_DEC, tmp);
291 -
292 - if (is_lpcm) {
293 - pci_read_config_dword(pci_dev, PCI_GEN_PMCON_1,
294 - &tmp);
295 - tmp |= 0x00000004; /* enable CLKRUN */
296 - pci_write_config_dword(pci_dev, PCI_GEN_PMCON_1,
297 - tmp);
298 - }
299 - tpm_write_index(0x0D, 0x55); /* unlock 4F */
300 - tpm_write_index(0x0A, 0x00); /* int disable */
301 - tpm_write_index(0x08, base); /* base addr lo */
302 - tpm_write_index(0x09, (base & 0xFF00) >> 8); /* base addr hi */
303 - tpm_write_index(0x0D, 0xAA); /* lock 4F */
304 - break;
305 - case PCI_VENDOR_ID_AMD:
306 - /* nothing yet */
307 - break;
308 - }
309 -
310 - return 0;
311 -}
312 -
313 -EXPORT_SYMBOL_GPL(tpm_lpc_bus_init);
314 -
315 -/*
316 * Internal kernel interface to transmit TPM commands
317 */
318 static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf,
319 @@ -590,10 +518,6 @@ int tpm_pm_resume(struct pci_dev *pci_de
320 if (chip == NULL)
321 return -ENODEV;
322
323 - spin_lock(&driver_lock);
324 - tpm_lpc_bus_init(pci_dev, chip->vendor->base);
325 - spin_unlock(&driver_lock);
326 -
327 return 0;
328 }
329
330 diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
331 --- a/drivers/char/tpm/tpm.h
332 +++ b/drivers/char/tpm/tpm.h
333 @@ -79,8 +79,6 @@ static inline void tpm_write_index(int i
334 }
335
336 extern void tpm_time_expired(unsigned long);
337 -extern int tpm_lpc_bus_init(struct pci_dev *, u16);
338 -
339 extern int tpm_register_hardware(struct pci_dev *,
340 struct tpm_vendor_specific *);
341 extern int tpm_open(struct inode *, struct file *);
342 diff --git a/drivers/char/tpm/tpm_atmel.c b/drivers/char/tpm/tpm_atmel.c
343 --- a/drivers/char/tpm/tpm_atmel.c
344 +++ b/drivers/char/tpm/tpm_atmel.c
345 @@ -22,7 +22,10 @@
346 #include "tpm.h"
347
348 /* Atmel definitions */
349 -#define TPM_ATML_BASE 0x400
350 +enum tpm_atmel_addr {
351 + TPM_ATMEL_BASE_ADDR_LO = 0x08,
352 + TPM_ATMEL_BASE_ADDR_HI = 0x09
353 +};
354
355 /* write status bits */
356 #define ATML_STATUS_ABORT 0x01
357 @@ -127,7 +130,6 @@ static struct tpm_vendor_specific tpm_at
358 .cancel = tpm_atml_cancel,
359 .req_complete_mask = ATML_STATUS_BUSY | ATML_STATUS_DATA_AVAIL,
360 .req_complete_val = ATML_STATUS_DATA_AVAIL,
361 - .base = TPM_ATML_BASE,
362 .miscdev = { .fops = &atmel_ops, },
363 };
364
365 @@ -136,14 +138,16 @@ static int __devinit tpm_atml_init(struc
366 {
367 u8 version[4];
368 int rc = 0;
369 + int lo, hi;
370
371 if (pci_enable_device(pci_dev))
372 return -EIO;
373
374 - if (tpm_lpc_bus_init(pci_dev, TPM_ATML_BASE)) {
375 - rc = -ENODEV;
376 - goto out_err;
377 - }
378 + lo = tpm_read_index( TPM_ATMEL_BASE_ADDR_LO );
379 + hi = tpm_read_index( TPM_ATMEL_BASE_ADDR_HI );
380 +
381 + tpm_atmel.base = (hi<<8)|lo;
382 + dev_dbg( &pci_dev->dev, "Operating with base: 0x%x\n", tpm_atmel.base);
383
384 /* verify that it is an Atmel part */
385 if (tpm_read_index(4) != 'A' || tpm_read_index(5) != 'T'
386 diff --git a/drivers/char/tpm/tpm_nsc.c b/drivers/char/tpm/tpm_nsc.c
387 --- a/drivers/char/tpm/tpm_nsc.c
388 +++ b/drivers/char/tpm/tpm_nsc.c
389 @@ -24,6 +24,10 @@
390 /* National definitions */
391 #define TPM_NSC_BASE 0x360
392 #define TPM_NSC_IRQ 0x07
393 +#define TPM_NSC_BASE0_HI 0x60
394 +#define TPM_NSC_BASE0_LO 0x61
395 +#define TPM_NSC_BASE1_HI 0x62
396 +#define TPM_NSC_BASE1_LO 0x63
397
398 #define NSC_LDN_INDEX 0x07
399 #define NSC_SID_INDEX 0x20
400 @@ -234,7 +238,6 @@ static struct tpm_vendor_specific tpm_ns
401 .cancel = tpm_nsc_cancel,
402 .req_complete_mask = NSC_STATUS_OBF,
403 .req_complete_val = NSC_STATUS_OBF,
404 - .base = TPM_NSC_BASE,
405 .miscdev = { .fops = &nsc_ops, },
406
407 };
408 @@ -243,15 +246,16 @@ static int __devinit tpm_nsc_init(struct
409 const struct pci_device_id *pci_id)
410 {
411 int rc = 0;
412 + int lo, hi;
413 +
414 + hi = tpm_read_index(TPM_NSC_BASE0_HI);
415 + lo = tpm_read_index(TPM_NSC_BASE0_LO);
416 +
417 + tpm_nsc.base = (hi<<8) | lo;
418
419 if (pci_enable_device(pci_dev))
420 return -EIO;
421
422 - if (tpm_lpc_bus_init(pci_dev, TPM_NSC_BASE)) {
423 - rc = -ENODEV;
424 - goto out_err;
425 - }
426 -
427 /* verify that it is a National part (SID) */
428 if (tpm_read_index(NSC_SID_INDEX) != 0xEF) {
429 rc = -ENODEV;
430 diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c
431 --- a/drivers/char/tty_ioctl.c
432 +++ b/drivers/char/tty_ioctl.c
433 @@ -476,11 +476,11 @@ int n_tty_ioctl(struct tty_struct * tty,
434 ld = tty_ldisc_ref(tty);
435 switch (arg) {
436 case TCIFLUSH:
437 - if (ld->flush_buffer)
438 + if (ld && ld->flush_buffer)
439 ld->flush_buffer(tty);
440 break;
441 case TCIOFLUSH:
442 - if (ld->flush_buffer)
443 + if (ld && ld->flush_buffer)
444 ld->flush_buffer(tty);
445 /* fall through */
446 case TCOFLUSH:
447 diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
448 --- a/drivers/media/video/cx88/cx88-video.c
449 +++ b/drivers/media/video/cx88/cx88-video.c
450 @@ -261,7 +261,7 @@ static struct cx88_ctrl cx8800_ctls[] =
451 .default_value = 0,
452 .type = V4L2_CTRL_TYPE_INTEGER,
453 },
454 - .off = 0,
455 + .off = 128,
456 .reg = MO_HUE,
457 .mask = 0x00ff,
458 .shift = 0,
459 diff --git a/drivers/net/hamradio/Kconfig b/drivers/net/hamradio/Kconfig
460 --- a/drivers/net/hamradio/Kconfig
461 +++ b/drivers/net/hamradio/Kconfig
462 @@ -17,7 +17,7 @@ config MKISS
463
464 config 6PACK
465 tristate "Serial port 6PACK driver"
466 - depends on AX25 && BROKEN_ON_SMP
467 + depends on AX25
468 ---help---
469 6pack is a transmission protocol for the data exchange between your
470 PC and your TNC (the Terminal Node Controller acts as a kind of
471 diff --git a/drivers/net/shaper.c b/drivers/net/shaper.c
472 --- a/drivers/net/shaper.c
473 +++ b/drivers/net/shaper.c
474 @@ -135,10 +135,8 @@ static int shaper_start_xmit(struct sk_b
475 {
476 struct shaper *shaper = dev->priv;
477 struct sk_buff *ptr;
478 -
479 - if (down_trylock(&shaper->sem))
480 - return -1;
481
482 + spin_lock(&shaper->lock);
483 ptr=shaper->sendq.prev;
484
485 /*
486 @@ -232,7 +230,7 @@ static int shaper_start_xmit(struct sk_b
487 shaper->stats.collisions++;
488 }
489 shaper_kick(shaper);
490 - up(&shaper->sem);
491 + spin_unlock(&shaper->lock);
492 return 0;
493 }
494
495 @@ -271,11 +269,9 @@ static void shaper_timer(unsigned long d
496 {
497 struct shaper *shaper = (struct shaper *)data;
498
499 - if (!down_trylock(&shaper->sem)) {
500 - shaper_kick(shaper);
501 - up(&shaper->sem);
502 - } else
503 - mod_timer(&shaper->timer, jiffies);
504 + spin_lock(&shaper->lock);
505 + shaper_kick(shaper);
506 + spin_unlock(&shaper->lock);
507 }
508
509 /*
510 @@ -332,21 +328,6 @@ static void shaper_kick(struct shaper *s
511
512
513 /*
514 - * Flush the shaper queues on a closedown
515 - */
516 -
517 -static void shaper_flush(struct shaper *shaper)
518 -{
519 - struct sk_buff *skb;
520 -
521 - down(&shaper->sem);
522 - while((skb=skb_dequeue(&shaper->sendq))!=NULL)
523 - dev_kfree_skb(skb);
524 - shaper_kick(shaper);
525 - up(&shaper->sem);
526 -}
527 -
528 -/*
529 * Bring the interface up. We just disallow this until a
530 * bind.
531 */
532 @@ -375,7 +356,15 @@ static int shaper_open(struct net_device
533 static int shaper_close(struct net_device *dev)
534 {
535 struct shaper *shaper=dev->priv;
536 - shaper_flush(shaper);
537 + struct sk_buff *skb;
538 +
539 + while ((skb = skb_dequeue(&shaper->sendq)) != NULL)
540 + dev_kfree_skb(skb);
541 +
542 + spin_lock_bh(&shaper->lock);
543 + shaper_kick(shaper);
544 + spin_unlock_bh(&shaper->lock);
545 +
546 del_timer_sync(&shaper->timer);
547 return 0;
548 }
549 @@ -576,6 +565,7 @@ static void shaper_init_priv(struct net_
550 init_timer(&sh->timer);
551 sh->timer.function=shaper_timer;
552 sh->timer.data=(unsigned long)sh;
553 + spin_lock_init(&sh->lock);
554 }
555
556 /*
557 diff --git a/fs/char_dev.c b/fs/char_dev.c
558 --- a/fs/char_dev.c
559 +++ b/fs/char_dev.c
560 @@ -139,7 +139,7 @@ __unregister_chrdev_region(unsigned majo
561 struct char_device_struct *cd = NULL, **cp;
562 int i = major_to_index(major);
563
564 - up(&chrdevs_lock);
565 + down(&chrdevs_lock);
566 for (cp = &chrdevs[i]; *cp; cp = &(*cp)->next)
567 if ((*cp)->major == major &&
568 (*cp)->baseminor == baseminor &&
569 diff --git a/include/linux/if_shaper.h b/include/linux/if_shaper.h
570 --- a/include/linux/if_shaper.h
571 +++ b/include/linux/if_shaper.h
572 @@ -23,7 +23,7 @@ struct shaper
573 __u32 shapeclock;
574 unsigned long recovery; /* Time we can next clock a packet out on
575 an empty queue */
576 - struct semaphore sem;
577 + spinlock_t lock;
578 struct net_device_stats stats;
579 struct net_device *dev;
580 int (*hard_start_xmit) (struct sk_buff *skb,
581 diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
582 --- a/net/ipv4/ip_output.c
583 +++ b/net/ipv4/ip_output.c
584 @@ -111,7 +111,6 @@ static int ip_dev_loopback_xmit(struct s
585 #ifdef CONFIG_NETFILTER_DEBUG
586 nf_debug_ip_loopback_xmit(newskb);
587 #endif
588 - nf_reset(newskb);
589 netif_rx(newskb);
590 return 0;
591 }
592 @@ -196,8 +195,6 @@ static inline int ip_finish_output2(stru
593 nf_debug_ip_finish_output2(skb);
594 #endif /*CONFIG_NETFILTER_DEBUG*/
595
596 - nf_reset(skb);
597 -
598 if (hh) {
599 int hh_alen;
600
601 diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c
602 --- a/net/ipv4/netfilter/ip_conntrack_standalone.c
603 +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c
604 @@ -432,6 +432,13 @@ static unsigned int ip_conntrack_defrag(
605 const struct net_device *out,
606 int (*okfn)(struct sk_buff *))
607 {
608 +#if !defined(CONFIG_IP_NF_NAT) && !defined(CONFIG_IP_NF_NAT_MODULE)
609 + /* Previously seen (loopback)? Ignore. Do this before
610 + fragment check. */
611 + if ((*pskb)->nfct)
612 + return NF_ACCEPT;
613 +#endif
614 +
615 /* Gather fragments. */
616 if ((*pskb)->nh.iph->frag_off & htons(IP_MF|IP_OFFSET)) {
617 *pskb = ip_ct_gather_frags(*pskb,
618 diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
619 --- a/net/packet/af_packet.c
620 +++ b/net/packet/af_packet.c
621 @@ -274,6 +274,9 @@ static int packet_rcv_spkt(struct sk_buf
622 dst_release(skb->dst);
623 skb->dst = NULL;
624
625 + /* drop conntrack reference */
626 + nf_reset(skb);
627 +
628 spkt = (struct sockaddr_pkt*)skb->cb;
629
630 skb_push(skb, skb->data-skb->mac.raw);
631 @@ -517,6 +520,9 @@ static int packet_rcv(struct sk_buff *sk
632 dst_release(skb->dst);
633 skb->dst = NULL;
634
635 + /* drop conntrack reference */
636 + nf_reset(skb);
637 +
638 spin_lock(&sk->sk_receive_queue.lock);
639 po->stats.tp_packets++;
640 __skb_queue_tail(&sk->sk_receive_queue, skb);

  ViewVC Help
Powered by ViewVC 1.1.20