* Re: Linux 2.4.22-pre2
2003-06-26 22:03 Linux 2.4.22-pre2 Marcelo Tosatti
@ 2003-06-26 22:54 ` J.A. Magallon
2003-06-26 23:06 ` [PATCH] gcc_check for x86 J.A. Magallon
` (9 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: J.A. Magallon @ 2003-06-26 22:54 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml
On 06.27, Marcelo Tosatti wrote:
>
> Hello,
>
> Here goes -pre2 with a big number of changes, including the new aic7xxx
> driver.
>
[...]
> Marcelo Tosatti <marcelo@freak.distro.conectiva>:
> o Changed EXTRAVERSION to -pre2
> o Cset exclude: jamagallon@able.es|ChangeSet|20030620200318|50799
>
I suppose it is the db4 change. Why did you remove it ?
--
J.A. Magallon <jamagallon@able.es> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.21-jam1 (gcc 3.3 (Mandrake Linux 9.2 3.3-2mdk))
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] gcc_check for x86
2003-06-26 22:03 Linux 2.4.22-pre2 Marcelo Tosatti
2003-06-26 22:54 ` J.A. Magallon
@ 2003-06-26 23:06 ` J.A. Magallon
2003-06-26 23:08 ` [PATCH] fix inlining with gcc3 J.A. Magallon
` (8 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: J.A. Magallon @ 2003-06-26 23:06 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml
On 06.27, Marcelo Tosatti wrote:
>
> Hello,
>
> Here goes -pre2 with a big number of changes, including the new aic7xxx
> driver.
>
> I wont accept any big changes after -pre4: I want 2.4.22 timecycle to be
> short.
>
I think this is useful and safe. Plz, can you apply for next pre ?
--- linux-2.4.21-bp1/arch/i386/Makefile.orig 2003-06-18 23:40:25.000000000 +0200
+++ linux-2.4.21-bp1/arch/i386/Makefile 2003-06-18 23:59:25.000000000 +0200
@@ -45,7 +45,7 @@
endif
ifdef CONFIG_M586MMX
-CFLAGS += -march=i586
+CFLAGS += $(call check_gcc,-march=pentium-mmx,-march=i586)
endif
ifdef CONFIG_M686
@@ -53,11 +53,11 @@
endif
ifdef CONFIG_MPENTIUMIII
-CFLAGS += -march=i686
+CFLAGS += $(call check_gcc,-march=pentium3,-march=i686)
endif
ifdef CONFIG_MPENTIUM4
-CFLAGS += -march=i686
+CFLAGS += $(call check_gcc,-march=pentium4,-march=i686)
endif
ifdef CONFIG_MK6
@@ -74,11 +74,11 @@
endif
ifdef CONFIG_MWINCHIPC6
-CFLAGS += -march=i586
+CFLAGS += $(call check_gcc,-march=winchip-c6,-march=i586)
endif
ifdef CONFIG_MWINCHIP2
-CFLAGS += -march=i586
+CFLAGS += $(call check_gcc,-march=winchip2,-march=i586)
endif
ifdef CONFIG_MWINCHIP3D
--
J.A. Magallon <jamagallon@able.es> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.21-jam1 (gcc 3.3 (Mandrake Linux 9.2 3.3-2mdk))
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] fix inlining with gcc3
2003-06-26 22:03 Linux 2.4.22-pre2 Marcelo Tosatti
2003-06-26 22:54 ` J.A. Magallon
2003-06-26 23:06 ` [PATCH] gcc_check for x86 J.A. Magallon
@ 2003-06-26 23:08 ` J.A. Magallon
2003-06-26 23:36 ` Kurt Wall
2003-06-27 10:50 ` Alan Cox
2003-06-26 23:31 ` [PATCH] kill extra printk prototype J.A. Magallon
` (7 subsequent siblings)
10 siblings, 2 replies; 19+ messages in thread
From: J.A. Magallon @ 2003-06-26 23:08 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml
On 06.27, Marcelo Tosatti wrote:
>
> Hello,
>
> Here goes -pre2 with a big number of changes, including the new aic7xxx
> driver.
>
> I wont accept any big changes after -pre4: I want 2.4.22 timecycle to be
> short.
>
This fixes inlining (really, not-inlining) with gcc3. How about next -pre ?
--- 25/include/linux/compiler.h~gcc3-inline-fix 2003-03-06 03:02:43.000000000 -0800
+++ 25-akpm/include/linux/compiler.h 2003-03-06 03:11:42.000000000 -0800
@@ -1,6 +1,13 @@
#ifndef __LINUX_COMPILER_H
#define __LINUX_COMPILER_H
+#if __GNUC__ >= 3
+#define inline __inline__ __attribute__((always_inline))
+#define inline__ __inline__ __attribute__((always_inline))
+#define __inline __inline__ __attribute__((always_inline))
+#define __inline__ __inline__ __attribute__((always_inline))
+#endif
+
/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
a mechanism by which the user can annotate likely branch directions and
expect the blocks to be reordered appropriately. Define __builtin_expect
--
J.A. Magallon <jamagallon@able.es> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.21-jam1 (gcc 3.3 (Mandrake Linux 9.2 3.3-2mdk))
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] fix inlining with gcc3
2003-06-26 23:08 ` [PATCH] fix inlining with gcc3 J.A. Magallon
@ 2003-06-26 23:36 ` Kurt Wall
2003-06-27 10:50 ` Alan Cox
1 sibling, 0 replies; 19+ messages in thread
From: Kurt Wall @ 2003-06-26 23:36 UTC (permalink / raw)
To: J.A. Magallon; +Cc: lkml
[CCs slightly trimmed]
Quoth J.A. Magallon:
[snippety]
> This fixes inlining (really, not-inlining) with gcc3. How about next -pre ?
>
> --- 25/include/linux/compiler.h~gcc3-inline-fix 2003-03-06 03:02:43.000000000 -0800
> +++ 25-akpm/include/linux/compiler.h 2003-03-06 03:11:42.000000000 -0800
> @@ -1,6 +1,13 @@
> #ifndef __LINUX_COMPILER_H
> #define __LINUX_COMPILER_H
>
> +#if __GNUC__ >= 3
> +#define inline __inline__ __attribute__((always_inline))
> +#define inline__ __inline__ __attribute__((always_inline))
> +#define __inline __inline__ __attribute__((always_inline))
> +#define __inline__ __inline__ __attribute__((always_inline))
> +#endif
> +
> /* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
> a mechanism by which the user can annotate likely branch directions and
> expect the blocks to be reordered appropriately. Define __builtin_expect
I'm willing to give this a shot. Where, or perhaps what, should I test
to evaluate best the effects, if any, of this patch?
Kurt
--
Decision maker, n.:
The person in your office who was unable to form a task force
before the music stopped.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] fix inlining with gcc3
2003-06-26 23:08 ` [PATCH] fix inlining with gcc3 J.A. Magallon
2003-06-26 23:36 ` Kurt Wall
@ 2003-06-27 10:50 ` Alan Cox
2003-06-27 14:22 ` J.A. Magallon
1 sibling, 1 reply; 19+ messages in thread
From: Alan Cox @ 2003-06-27 10:50 UTC (permalink / raw)
To: J.A. Magallon; +Cc: Marcelo Tosatti, lkml
On Gwe, 2003-06-27 at 00:08, J.A. Magallon wrote:
> This fixes inlining (really, not-inlining) with gcc3. How about next -pre ?
Benchmark that before you blindly assume its right. Gcc not inlining large
stuff actually appears to be _smarter_ than the authors of the code
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] fix inlining with gcc3
2003-06-27 10:50 ` Alan Cox
@ 2003-06-27 14:22 ` J.A. Magallon
0 siblings, 0 replies; 19+ messages in thread
From: J.A. Magallon @ 2003-06-27 14:22 UTC (permalink / raw)
To: Alan Cox; +Cc: J.A. Magallon, Marcelo Tosatti, lkml
On 06.27, Alan Cox wrote:
> On Gwe, 2003-06-27 at 00:08, J.A. Magallon wrote:
> > This fixes inlining (really, not-inlining) with gcc3. How about next -pre ?
>
> Benchmark that before you blindly assume its right. Gcc not inlining large
> stuff actually appears to be _smarter_ than the authors of the code
>
Let's be clear, I just collect patches that I think are interesting. The
original post by Andrew Morton <akpm@digeo.com> is here:
http://marc.theaimsgroup.com/?l=linux-kernel&m=104695003008386&w=2
Quoting it:
shrinks my 3.2.1-compiled kernel text by about 64 kbytes:
text data bss dec hex filename
3316138 574844 726816 4617798 467646 vmlinux-before
3249255 555436 727204 4531895 4526b7 vmlinux-after
mnm:/tmp> nm vmlinux-before|grep __constant_c_and_count_memset | wc
233 699 9553
mnm:/tmp> nm vmlinux-after|grep __constant_c_and_count_memset | wc
13 39 533
And I also remember other posts, by other author of a similar patch, that
claimed some critical functions not being inlined due to size (memcpys..).
Will try to look original info about that...
...here it is:
http://marc.theaimsgroup.com/?l=linux-kernel&m=103632312702693&w=2
--
J.A. Magallon <jamagallon@able.es> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.21-jam1 (gcc 3.3 (Mandrake Linux 9.2 3.3-2mdk))
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] kill extra printk prototype
2003-06-26 22:03 Linux 2.4.22-pre2 Marcelo Tosatti
` (2 preceding siblings ...)
2003-06-26 23:08 ` [PATCH] fix inlining with gcc3 J.A. Magallon
@ 2003-06-26 23:31 ` J.A. Magallon
2003-06-27 14:02 ` Adrian Bunk
2003-06-26 23:32 ` [PATCH] kill duplicate pci_id J.A. Magallon
` (6 subsequent siblings)
10 siblings, 1 reply; 19+ messages in thread
From: J.A. Magallon @ 2003-06-26 23:31 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml
On 06.27, Marcelo Tosatti wrote:
>
> Hello,
>
> Here goes -pre2 with a big number of changes, including the new aic7xxx
> driver.
>
> I wont accept any big changes after -pre4: I want 2.4.22 timecycle to be
> short.
>
Alredy declared in kernel.h.
--- linux/include/asm-i386/spinlock.h.orig 2002-10-15 10:12:25.000000000 +0100
+++ linux/include/asm-i386/spinlock.h 2002-10-15 10:12:35.000000000 +0100
@@ -6,9 +6,6 @@
#include <asm/page.h>
#include <linux/config.h>
-extern int printk(const char * fmt, ...)
- __attribute__ ((format (printf, 1, 2)));
-
/* It seems that people are forgetting to
* initialize their spinlocks properly, tsk tsk.
* Remember to turn this off in 2.4. -ben
--
J.A. Magallon <jamagallon@able.es> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.21-jam1 (gcc 3.3 (Mandrake Linux 9.2 3.3-2mdk))
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] kill extra printk prototype
2003-06-26 23:31 ` [PATCH] kill extra printk prototype J.A. Magallon
@ 2003-06-27 14:02 ` Adrian Bunk
0 siblings, 0 replies; 19+ messages in thread
From: Adrian Bunk @ 2003-06-27 14:02 UTC (permalink / raw)
To: J.A. Magallon; +Cc: Marcelo Tosatti, lkml
On Fri, Jun 27, 2003 at 01:31:17AM +0200, J.A. Magallon wrote:
>
> On 06.27, Marcelo Tosatti wrote:
> >
> > Hello,
> >
> > Here goes -pre2 with a big number of changes, including the new aic7xxx
> > driver.
> >
> > I wont accept any big changes after -pre4: I want 2.4.22 timecycle to be
> > short.
> >
>
> Alredy declared in kernel.h.
>...
It seems this issue is also present in 2.5.73.
Could you send such cleanup changes for inclusion into 2.5 first?
TIA
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] kill duplicate pci_id
2003-06-26 22:03 Linux 2.4.22-pre2 Marcelo Tosatti
` (3 preceding siblings ...)
2003-06-26 23:31 ` [PATCH] kill extra printk prototype J.A. Magallon
@ 2003-06-26 23:32 ` J.A. Magallon
2003-06-27 5:59 ` Linux 2.4.22-pre2 Marc-Christian Petersen
` (5 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: J.A. Magallon @ 2003-06-26 23:32 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml
On 06.27, Marcelo Tosatti wrote:
>
> Hello,
>
> Here goes -pre2 with a big number of changes, including the new aic7xxx
> driver.
>
> I wont accept any big changes after -pre4: I want 2.4.22 timecycle to be
> short.
>
--- linux-2.4.20.orig/include/linux/pci_ids.h 2003-05-30 00:43:12.000000000=
+0200
+++ linux-2.4.20/include/linux/pci_ids.h 2003-05-30 00:44:37.000000000 +020=
0
@@ -1029,7 +1029,6 @@
#define PCI_DEVICE_ID_VIA_8233A 0x3147
#define PCI_DEVICE_ID_VIA_P4X333 0x3168
#define PCI_DEVICE_ID_VIA_8235 0x3177
-#define PCI_DEVICE_ID_VIA_8377_0 0x3189
#define PCI_DEVICE_ID_VIA_8377_0 0x3189
#define PCI_DEVICE_ID_VIA_8237 0x3227
#define PCI_DEVICE_ID_VIA_86C100A 0x6100
--
J.A. Magallon <jamagallon@able.es> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.21-jam1 (gcc 3.3 (Mandrake Linux 9.2 3.3-2mdk))
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Linux 2.4.22-pre2
2003-06-26 22:03 Linux 2.4.22-pre2 Marcelo Tosatti
` (4 preceding siblings ...)
2003-06-26 23:32 ` [PATCH] kill duplicate pci_id J.A. Magallon
@ 2003-06-27 5:59 ` Marc-Christian Petersen
2003-06-27 8:44 ` Matthias Andree
` (4 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Marc-Christian Petersen @ 2003-06-27 5:59 UTC (permalink / raw)
To: Marcelo Tosatti, lkml
[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]
On Friday 27 June 2003 00:03, Marcelo Tosatti wrote:
Hi Marcelo,
> Here goes -pre2 with a big number of changes, including the new aic7xxx
> driver.
> I wont accept any big changes after -pre4: I want 2.4.22 timecycle to be
> short.
so why you don't merge this? This is now the 4th resend.
--------------------------------------------------------------------------
[PATCH 2.4.22-BK] [RESEND 3rd] Fix oom killer braindamage
Date: 21.06.2003 22:04
From: Marc-Christian Petersen <m.c.p@wolk-project.de> (Working Overloaded
Linux Kernel)
To: Marcelo Tosatti <marcelo@conectiva.com.br>
CC: linux-kernel@vger.kernel.org
Hi Marcelo,
attached patch fixes the oom killer braindamage where it tries to kill
processes again and again and again w/o any ending or successfull killing of
the selected processes in an OOM case.
The attached, very simple but effective, patch fixes it.
All the kudos go to Rik van Riel.
Patch tested and works, and also for a long time in my tree (and maybe also
others?!)
This issue is out there for several years.
Please apply it for 2.4.22-pre2, thanks.
--------------------------------------------------------------------------
ciao, Marc
[-- Attachment #2: oomkiller-braindamage-fix.patch --]
[-- Type: text/x-diff, Size: 417 bytes --]
===== mm/oom_kill.c 1.11 vs edited =====
--- 1.11/mm/oom_kill.c Fri Aug 16 10:59:46 2002
+++ edited/mm/oom_kill.c Sat Feb 22 17:31:49 2003
@@ -61,11 +61,16 @@ static int badness(struct task_struct *p
if (!p->mm)
return 0;
+
+ if (p->flags & PF_MEMDIE)
+ return 0;
+
/*
* Never kill init
*/
if (p->pid == 1)
return 0;
+
/*
* The memory size of the process is the basis for the badness.
*/
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Linux 2.4.22-pre2
2003-06-26 22:03 Linux 2.4.22-pre2 Marcelo Tosatti
` (5 preceding siblings ...)
2003-06-27 5:59 ` Linux 2.4.22-pre2 Marc-Christian Petersen
@ 2003-06-27 8:44 ` Matthias Andree
2003-06-27 17:58 ` [2.4 patch] some gcc 3.3 fixes from -ac Adrian Bunk
` (3 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Matthias Andree @ 2003-06-27 8:44 UTC (permalink / raw)
To: lkml
On Thu, 26 Jun 2003, Marcelo Tosatti wrote:
>
> Hello,
>
> Here goes -pre2 with a big number of changes, including the new aic7xxx
> driver.
>
> I wont accept any big changes after -pre4: I want 2.4.22 timecycle to be
> short.
>
> Have fun
>
>
> Summary of changes from v2.4.22-pre1 to v2.4.22-pre2
> ============================================
Please pull the new "shortlog" script from
bk://kernel.bkbits.net/torvalds/tools/
^ permalink raw reply [flat|nested] 19+ messages in thread
* [2.4 patch] some gcc 3.3 fixes from -ac
2003-06-26 22:03 Linux 2.4.22-pre2 Marcelo Tosatti
` (6 preceding siblings ...)
2003-06-27 8:44 ` Matthias Andree
@ 2003-06-27 17:58 ` Adrian Bunk
2003-06-27 18:56 ` Linux 2.4.22-pre2 Alessandro Suardi
` (2 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Adrian Bunk @ 2003-06-27 17:58 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml, Alan Cox
Hi Marcelo,
the patch below contains four trivial fixes for compile failures with
gcc 3.3 stolen from -ac.
I've tested the compilation with 2.4.22-pre2.
diffstat output:
drivers/net/irda/ma600.c | 6 +++---
drivers/net/wan/sdla_chdlc.c | 3 +--
drivers/sound/cs46xx.c | 4 ++--
net/decnet/dn_table.c | 3 +--
4 files changed, 7 insertions(+), 9 deletions(-)
Please apply
Adrian
--- linux.vanilla/drivers/net/irda/ma600.c 2002-11-29 21:27:18.000000000 +0000
+++ linux.21-ac3/drivers/net/irda/ma600.c 2003-05-29 01:40:07.000000000 +0100
@@ -51,9 +51,9 @@
#undef ASSERT(expr, func)
#define ASSERT(expr, func) \
if(!(expr)) { \
- printk( "Assertion failed! %s,%s,%s,line=%d\n",\
- #expr,__FILE__,__FUNCTION__,__LINE__); \
- ##func}
+ printk( "Assertion failed! %s,%s,%s,line=%d\n",\
+ #expr,__FILE__,__FUNCTION__,__LINE__); \
+ func}
#endif
/* convert hex value to ascii hex */
--- linux.vanilla/drivers/net/wan/sdla_chdlc.c 2002-11-29 21:27:18.000000000 +0000
+++ linux.21-ac3/drivers/net/wan/sdla_chdlc.c 2003-05-28 15:35:56.000000000 +0100
@@ -591,8 +591,7 @@
if (chdlc_set_intr_mode(card, APP_INT_ON_TIMER)){
- printk (KERN_INFO "%s:
- Failed to set interrupt triggers!\n",
+ printk (KERN_INFO "%s: Failed to set interrupt triggers!\n",
card->devname);
return -EIO;
}
--- linux.vanilla/drivers/sound/cs46xx.c 2003-06-14 00:11:37.000000000 +0100
+++ linux.21-ac3/drivers/sound/cs46xx.c 2003-06-22 13:36:11.000000000 +0100
@@ -947,8 +950,8 @@
struct InitStruct
{
- u32 long off;
- u32 long val;
+ u32 off;
+ u32 val;
} InitArray[] = { {0x00000040, 0x3fc0000f},
{0x0000004c, 0x04800000},
--- linux.vanilla/net/decnet/dn_table.c 2001-12-21 17:42:05.000000000 +0000
+++ linux.21-ac3/net/decnet/dn_table.c 2003-05-28 15:37:27.000000000 +0100
@@ -836,8 +836,7 @@
return NULL;
if (in_interrupt() && net_ratelimit()) {
- printk(KERN_DEBUG "DECnet: BUG! Attempt to create routing table
-from interrupt\n");
+ printk(KERN_DEBUG "DECnet: BUG! Attempt to create routing table from interrupt\n");
return NULL;
}
if ((t = kmalloc(sizeof(struct dn_fib_table), GFP_KERNEL)) == NULL)
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Linux 2.4.22-pre2
2003-06-26 22:03 Linux 2.4.22-pre2 Marcelo Tosatti
` (7 preceding siblings ...)
2003-06-27 17:58 ` [2.4 patch] some gcc 3.3 fixes from -ac Adrian Bunk
@ 2003-06-27 18:56 ` Alessandro Suardi
2003-06-27 23:36 ` [BUG?] do_generic_direct_write J.A. Magallon
2003-06-27 23:38 ` Linux 2.4.22-pre2 Krzysztof Halasa
10 siblings, 0 replies; 19+ messages in thread
From: Alessandro Suardi @ 2003-06-27 18:56 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml
Marcelo Tosatti wrote:
> Hello,
>
> Here goes -pre2 with a big number of changes, including the new aic7xxx
> driver.
Fixes my can't-unblank-screen problem reported with 2.4.22-pre1.
Thanks,
--alessandro
"I'm always trying to find some kind of honest emotion
and connection with the most naked human emotions.
It's a dangerous, dark path but also very exciting."
(Steve Wynn, interviewed by 'Mescalina', 2003)
^ permalink raw reply [flat|nested] 19+ messages in thread
* [BUG?] do_generic_direct_write
2003-06-26 22:03 Linux 2.4.22-pre2 Marcelo Tosatti
` (8 preceding siblings ...)
2003-06-27 18:56 ` Linux 2.4.22-pre2 Alessandro Suardi
@ 2003-06-27 23:36 ` J.A. Magallon
2003-07-04 20:55 ` J.A. Magallon
2003-06-27 23:38 ` Linux 2.4.22-pre2 Krzysztof Halasa
10 siblings, 1 reply; 19+ messages in thread
From: J.A. Magallon @ 2003-06-27 23:36 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml
On 06.27, Marcelo Tosatti wrote:
>
> Hello,
>
> Here goes -pre2 with a big number of changes, including the new aic7xxx
> driver.
>
> I wont accept any big changes after -pre4: I want 2.4.22 timecycle to be
> short.
>
Correct me if I'm wrong. I found this just by chance:
mm/filemap.c:
ssize_t
do_generic_direct_write(struct file *file,const char *buf,size_t count, loff_t *ppos)
...
if (!file->f_flags & O_DIRECT)
BUG();
This fails to trigger the BUG() just when it should. This should be:
if (!(file->f_flags & O_DIRECT))
BUG();
To check my C, I tried this:
#include <stdio.h>
#define O_D 2
int main()
{
int flags;
flags = O_D +4;
printf("%d\n",!flags & O_D);
printf("%d\n",!(flags & O_D));
flags = 1+4;
printf("%d\n",!flags & O_D);
printf("%d\n",!(flags & O_D));
return 0;
}
Output:
werewolf:~# ./kk
0
0
0
1
So it gives 0 when 'flags' != 0, not regarding if O_D is there or not....
Correct ?
One other job for the Stanford checker... ?
--
J.A. Magallon <jamagallon@able.es> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.21-jam1 (gcc 3.3 (Mandrake Linux 9.2 3.3-2mdk))
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [BUG?] do_generic_direct_write
2003-06-27 23:36 ` [BUG?] do_generic_direct_write J.A. Magallon
@ 2003-07-04 20:55 ` J.A. Magallon
0 siblings, 0 replies; 19+ messages in thread
From: J.A. Magallon @ 2003-07-04 20:55 UTC (permalink / raw)
To: J.A. Magallon; +Cc: Marcelo Tosatti, lkml
On 06.28, J.A. Magallon wrote:
>
> On 06.27, Marcelo Tosatti wrote:
> >
> > Hello,
> >
> > Here goes -pre2 with a big number of changes, including the new aic7xxx
> > driver.
> >
> > I wont accept any big changes after -pre4: I want 2.4.22 timecycle to be
> > short.
> >
>
> Correct me if I'm wrong. I found this just by chance:
>
> mm/filemap.c:
> ssize_t
> do_generic_direct_write(struct file *file,const char *buf,size_t count, loff_t *ppos)
> ...
>
> if (!file->f_flags & O_DIRECT)
> BUG();
>
> This fails to trigger the BUG() just when it should. This should be:
>
> if (!(file->f_flags & O_DIRECT))
> BUG();
Someone can confirm this / flame me , plz ?
--
J.A. Magallon <jamagallon@able.es> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.22-pre2-jam1 (gcc 3.3 (Mandrake Linux 9.2 3.3-2mdk))
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Linux 2.4.22-pre2
2003-06-26 22:03 Linux 2.4.22-pre2 Marcelo Tosatti
` (9 preceding siblings ...)
2003-06-27 23:36 ` [BUG?] do_generic_direct_write J.A. Magallon
@ 2003-06-27 23:38 ` Krzysztof Halasa
10 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Halasa @ 2003-06-27 23:38 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml
Hi,
Marcelo Tosatti <marcelo@conectiva.com.br> writes:
> Here goes -pre2 with a big number of changes, including the new aic7xxx
> driver.
>
> I wont accept any big changes after -pre4: I want 2.4.22 timecycle to be
> short.
What's wrong with the generic HDLC update then? Are you going to apply it?
ftp://ftp.pm.waw.pl/pub/linux/hdlc/hdlc-2.4.21pre7-1.14.patch
or http://ftp.pm.waw.pl/pub/linux/hdlc/hdlc-2.4.21pre7-1.14.patch
Yes, it applies to 2.4.21-pre7 and later kernels, including 2.4.22-pre2.
I hope it will require "-R" to apply it to pre3...
TIA.
--
Krzysztof Halasa
Network Administrator
^ permalink raw reply [flat|nested] 19+ messages in thread