Re: [BUG] 2.6.24-rc5: 'sysctl table check failed' when turning on printer

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Frans Pop <elendil@...>, <linux-kernel@...>
Date: Sunday, January 6, 2008 - 4:35 pm

Ingo Molnar <mingo@elte.hu> writes:


Yes, and the particular warning that is triggering this is
the first time I have seen it.  I didn't know we had any
sysctl users that were buggy in attempting to create the
same file twice.


This sounds like we have a leak or a reference counting bug that
is registering the sysctl field twice.

My hunch is something is going wrong when loading or unloading
the module.

I only see the single instance of the string "timeslice" in
the kernel.  So it doesn't look like there are multiple
modules registering the same sysctl just a logic bug.

I took a quick look at drivers/char/ppdev.c but I don't
recognize the idiom so I can't spot where we are doing something
wrong. 

Looking in drivers/parport/procfs.c
parport_proc_register and parport_proc_unregister look fine adding a
sysctl entry when registering and removing it when unregistering.

Similarly looking in drivers/parport/share.c
parport_register_device and parport_unregister_device look fine.

The logic in ppdev though looks odd.  But not so odd I can
say it is broken or immediately recommend a fix.

The net result where we only have a file in /proc/sys when
you have opened the parallel port and run the right ioctl
is most definitely weird.

I took a quick skim through the git logs and it doesn't look like
anyone has done anything significant to ppdev.c in years.  So I don't
expect there is anyone who knows what that code is doing off their
head.

Currently the error handling appears robust it should
not prevent the printer from being used.

So it looks like my warnings have uncovered yet another
ancient sysctl usage bug.

If someone else doesn't figure out what is going wrong before
I get to it.  I will try and take a look and see if I can figure
out what is going wrong in ppdev.c.

Short of two programs coming in and simultaneously trying to claim
the parallel port and there being not exclusion in ppdev.c I don't
have a clue what could cause the reported error.

Eric

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [BUG] 2.6.24-rc5: 'sysctl table check failed' when turni..., Eric W. Biederman, (Sun Jan 6, 4:35 pm)