public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Fix for duplicate /proc entries
@ 2002-02-06  3:52 Brent Cook
  2002-02-06 18:11 ` Dave Jones
  0 siblings, 1 reply; 23+ messages in thread
From: Brent Cook @ 2002-02-06  3:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: busterb

Hello,

 I think that I have found a problem with proc_dir_entry(). It seems to
allow multiple /proc entries to be created with the same name, without
returning a NULL pointer. I asked the folks on #kernelnewbies, and they
said that perhaps this is a feature. In either case, I believe that the
following patch fixes the issue by checking if a proc entry already exists
before creating it. This mirrors the behavior of remove_proc_entry, which
checks for the presense of a proc entry before deleting it.

Thank you
 - Brent

--- linux/fs/proc/generic.bak	Tue Feb  5 10:51:30 2002
+++ linux/fs/proc/generic.c	Tue Feb  5 11:03:24 2002
@@ -418,6 +418,7 @@
 					  mode_t mode,
 					  nlink_t nlink)
 {
+	struct proc_dir_entry **p;
 	struct proc_dir_entry *ent = NULL;
 	const char *fn = name;
 	int len;
@@ -429,6 +430,12 @@
 		goto out;
 	len = strlen(fn);

+	/* check for a duplication */
+	for (p = &(*parent)->subdir; *p; p=&(*p)->next ) {
+		if (proc_match(len, fn, *p))
+			goto out;
+	}
+
 	ent = kmalloc(sizeof(struct proc_dir_entry) + len + 1, GFP_KERNEL);
 	if (!ent) goto out;


^ permalink raw reply	[flat|nested] 23+ messages in thread
* RE: Mouse interrupts: the death knell of a VP6
@ 2002-04-11  9:33 Elgar, Jeremy
  0 siblings, 0 replies; 23+ messages in thread
From: Elgar, Jeremy @ 2002-04-11  9:33 UTC (permalink / raw)
  To: linux-kernel

As another data point I also have a VP6 (2x PIII 700)
Up until Tuesday only had a serial mouse, but now has a PS/2
Never any problems before (on most 2.4.x kernels) now running 2.4.17 + Int +
XFS and haven't seen any problems after a couple of heavy desktop session ~6
hours.
But I can keep an eye out, not at the machine right now but can forward on
some info tonight if required.


Jeremy

> -----Original Message-----
> From: John Adams [mailto:johna@onevista.com]
> Sent: 10 April 2002 18:17
> To: linux-kernel-owner@vger.kernel.org; Oleg Drokin; Brent Cook
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: Mouse interrupts: the death knell of a VP6
> 
> 
> On Wednesday 10 April 2002 11:23 am, Oleg Drokin wrote:
> > Hello!
> >
> > On Wed, Apr 10, 2002 at 09:02:05AM -0500, Brent Cook wrote:
> > > I have an ABIT VP6 motherboard, using the VIA Apollo chipset and 2
> > > 700Mhz PIII's, but please don't hold that against me. The 
> system is
> > > running 2.4.19-pre6. I believe that I either have a 
> system that has
> > > trouble handling a sudden bursts of interrupts, or have 
> found a fault
> > > in mouse handling.
> >
> > Have you tried to change MPS mode to 1.1 from 1.4 (I see 
> addres message
> > timeouts in your log)?
> >
> > > I have already tried removing memory, adding memory, changing
> > > processors, video cards. The only thing that has remained 
> constant is
> > > the VP6 motherboard and the hard drive.
> >
> > My VP6 died on me recently with some funny symptoms:
> > it hangs in X when I start netscape and move mouse, or if I do
> > bk clone on kernel tree, it dies with
> > kernel BUG at /usr/src/linux-2.4.18/include/asm/smplock.h:62!
> > BUG in various places pretty soon.
> > (this BUG is only appears if 2 CPUs are present in motherboard).
> > So if your troubles began only recently, you might want to 
> try another
> > motherboard just to be sure.
> 
> I have a VP6 with 2 CPUs.  Its has both a PS/2 mouse and a 
> usb mouse.  Its 
> been up for 90 days and handled lots of mouse interrupts.  See below.
>            CPU0       CPU1       
>   0:  392228152  392338774    IO-APIC-edge  timer
>   1:     312494     312380    IO-APIC-edge  keyboard
>   2:          0          0          XT-PIC  cascade
>   3:          1          3    IO-APIC-edge  serial
>  12:   40362907   40324010    IO-APIC-edge  PS/2 Mouse
>  14:    3386577    3383180    IO-APIC-edge  ide0
>  15:     679030     672810    IO-APIC-edge  ide1
>  17:    1165246    1162993   IO-APIC-level  DC395x_TRM
>  18:   83937970   83935445   IO-APIC-level  ide2, eth0
>  19:     131956     132468   IO-APIC-level  es1371, usb-uhci, usb-uhci
> NMI:          0          0 
> LOC:  784686934  784686951 
> ERR:        191
> MIS:          0
> 
> Its running a recent kernel.  Maybe 2.4.18 is broken.  Here's 
> a uname -a
> Linux flash 2.5.0 #16 SMP Wed Jan 9 16:48:16 EST 2002 i686 unknown
> 
> johna
> -
> To unsubscribe from this list: send the line "unsubscribe 
> linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2002-06-19 18:27 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-06  3:52 Fix for duplicate /proc entries Brent Cook
2002-02-06 18:11 ` Dave Jones
2002-02-07 21:38   ` Brent Cook
2002-02-07 21:45     ` Dave Jones
2002-02-08 16:13       ` Brent Cook
2002-02-08 17:47         ` Mike Fedyk
2002-02-08 17:54           ` Alexander Viro
2002-02-08 18:12             ` Tommy Reynolds
2002-06-14 22:30       ` File permission problem with NFSv3 and 2.5.20-dj4 Brent Cook
2002-06-15 12:23         ` Dave Jones
2002-06-19 17:45           ` Brent Cook
2002-06-19 17:48             ` Dave Jones
2002-06-19 17:52             ` another sched.c error with athlon Kirk Reiser
2002-06-19 18:27               ` Adrian Bunk
2002-04-10 14:02   ` Mouse interrupts: the death knell of a VP6 Brent Cook
2002-04-10 15:23     ` Oleg Drokin
2002-04-10 16:43       ` Brent Cook
2002-04-10 16:49         ` William Park
2002-04-11  6:39           ` john slee
2002-04-10 20:55         ` Oleg Drokin
2002-04-10 17:16       ` John Adams
2002-04-10 17:52         ` Brent Cook
  -- strict thread matches above, loose matches on Subject: below --
2002-04-11  9:33 Elgar, Jeremy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox