linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kay Sievers" <kay.sievers@vrfy.org>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: "David Brownell" <david-b@pacbell.net>,
	"Chuck Ebbert" <cebbert@redhat.com>,
	tilman@imap.cc, linux-kernel@vger.kernel.org, gregkh@suse.de,
	a.zummo@towertech.it
Subject: Re: 2.6.23-rc6-mm1
Date: Thu, 20 Sep 2007 09:54:57 +0200	[thread overview]
Message-ID: <3ae72650709200054u356203b9rb594f1644730071b@mail.gmail.com> (raw)
In-Reply-To: <20070919231121.e481445c.akpm@linux-foundation.org>

On 9/20/07, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Wed, 19 Sep 2007 21:43:14 -0700 David Brownell <david-b@pacbell.net> wrote:
>
> > On Wednesday 19 September 2007, Andrew Morton wrote:
> > > On Wed, 19 Sep 2007 16:44:48 -0700
> > > David Brownell <david-b@pacbell.net> wrote:
> > >
> > > > > > <4>[   21.211942] Duplicate file names "rtc" detected
> > > > >
> > > > > Nah, that's an rtc-specific problem.
> > > >
> > > > RTC-related ... but it's a procfs bug, since it's procfs which doesn't
> > > > even bother to check for duplicate names before it registers files.
> > >
> > > So you keep on claiming, but I don't think I've yet seen a description of
> > > the *reason* why two copies of this file are being created,
> >
> > Yes you did .... most recently in http://lkml.org/lkml/2007/9/19/18 is:
> >
> > > > The missing step seems to be that proc_register() doesn't bother
> > > > to check whether there's already an entry for that file.  Which
> > > > is what the appended *UNTESTED* patch does (it compiles though).
> >
> > Although maybe you meant me to parse that differently ... as in,
> > not "why is procfs doing this broken thing?" but rather "how is it
> > that procfs fault (non)handling code ended up getting used?".
> >
> > That's always seemed self-evident:  the RTC framework was creating
> > it for /dev/rtc0 (presumably, rtc-cmos), while at the same time the
> > legacy drivers/char/rtc.c was creating it for /dev/rtc.
> >
> > Workaround by configuring just one, and the problem goes away.
> > (Although it *ought* to be OK to configure both, with all the normal
> > resource exclusions kicking in to ensure only one will run.)
>
> Head still spinning.
>
> a) "rtc0" != "rtc" ??
>
> b) The kernel is trying to register two procfs files of the same name!
>    If that's a configuration error then we have a Kconfiguration bug.
>
> >
> > > and a
> > > description of why that is an OK thing for the kernel to be doing.
> >
> > It's not a wrong thing, at any rate.  This is a fairly basic task
> > in any filesystem:  mutual exclusion.  Code is allowed to rely on
> > filesystems acting correctly...
> >
>
> We're relying on procfs behaviour to prevent registration of two rtc
> devices?  That's a strange means of arbitration.   And what happens
> when CONFIG_PROC_FS=n?
>
> >
> > > > > From: Chuck Ebbert <cebbert@redhat.com>
> > > > >
> > > > > AFAICT the rtc problem is caused by misconfiguration: both the new
> > > > > and old rtc driver have been built and they are both trying to load.
> > > >
> > > > That _shouldn't_ be a problem at all; only one of them should be
> > > > able to bind to that hardware.
> > > >
> > > > The only problem I see in these messages is that procfs bug.
> > > >
> > >
> > > It's not obvious that this is only a procfs bug.  If some part of the
> > > kernel tries to add a procfs file which is already there, that's often a
> > > bug in the caller.
> >
> > Not really; procfs is supposed to not create it if it's already there!!
> > Reasonable callers will cope with "it didn't get created", and that's
> > all they should really need to do.
> >
> >
> > > Yes, procfs should have been checking for this.  But it is too late now for
> > > us to just fail out of the procfs registration code.  Because this can
> > > cause previously buggy-but-works-ok code to now fail completely.
> >
> > What do you mean by too late "now" ... just-before-2.6.23?
>
> No.
>
> What I mean is that we cannot change procfs as you propose until we have
> located and fixed all places in the kernel which can cause duplicated
> procfs names.  (Good luck with that).
>
> Because we've had this happening before, and *the driver kept working*
> (apart from, presumably, some of their procfs features which, presumably,
> nobody used much).
>
> With the change which you propose, these drivers will probably stop
> working, because they will newly find their procfs registration failed.
>
> > I'm a bit puzzled why this issue cropped up suddenly, when the
> > "two RTC drivers" configs have been behaving fine (presumably
> > failing properly, but at least not generating problem reports)
> > for some time.  One of the procfs changes must have caused this
> > trouble.
>
> I'm not sure that anything _has_ changed.  It's just that a few people have
> suddenly noticed duplicated rtc entris in /proc.  Perhaps theye were there
> for some time.
>
> > And what would an example be of buggy-but-works code, which would
> > then be broken if the procfs stopped being buggy?
> >
>
> A driver which checks the return value from procfs registration and which
> then errors out (as it should) if that registration fails.

Isn't that all caused by the rtc driver registering itself without
checking if it is able to grab the device? Wouldn't moving the
request_resource() before doing any device registration do the magic?

Kay

  reply	other threads:[~2007-09-20  7:55 UTC|newest]

Thread overview: 227+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-18  8:18 2.6.23-rc6-mm1 Andrew Morton
2007-09-18  8:24 ` 2.6.23-rc6-mm1 Andrew Morton
2007-09-18  9:13 ` 2.6.23-rc6-mm1 Kamalesh Babulal
2007-09-18  9:27   ` 2.6.23-rc6-mm1 Andrew Morton
2007-09-18  9:34     ` 2.6.23-rc6-mm1 Satyam Sharma
2007-09-18 19:17       ` 2.6.23-rc6-mm1 Greg KH
2007-09-22  9:21         ` 2.6.23-rc6-mm1 Satyam Sharma
2007-09-25  5:35           ` 2.6.23-rc6-mm1 Greg KH
2007-09-18  9:34   ` 2.6.23-rc6-mm1 Andy Whitcroft
2007-09-18 10:02     ` 2.6.23-rc6-mm1 Benjamin Herrenschmidt
2007-09-18 12:07       ` 2.6.23-rc6-mm1 Kamalesh Babulal
2007-09-18 16:53         ` 2.6.23-rc6-mm1 Andrew Morton
2007-09-18 19:16         ` 2.6.23-rc6-mm1 Greg KH
2007-09-18 21:35           ` 2.6.23-rc6-mm1 Benjamin Herrenschmidt
2007-09-18 15:07 ` 2.6.23-rc6-mm1 Valdis.Kletnieks
2007-09-18 15:50   ` 2.6.23-rc6-mm1 Sam Ravnborg
2007-09-18 15:27 ` 2.6.23-rc6-mm1 Miles Lane
2007-09-18 15:39   ` 2.6.23-rc6-mm1 Miles Lane
2007-09-18 15:52   ` 2.6.23-rc6-mm1 Sam Ravnborg
2007-09-18 19:17   ` 2.6.23-rc6-mm1 Sam Ravnborg
2007-09-18 19:42     ` 2.6.23-rc6-mm1 Miles Lane
2007-09-18 20:26       ` 2.6.23-rc6-mm1 Sam Ravnborg
2007-09-18 22:38         ` 2.6.23-rc6-mm1 Gabriel C
2007-09-18 22:48           ` 2.6.23-rc6-mm1 Gabriel C
2007-09-19 19:33             ` 2.6.23-rc6-mm1 Sam Ravnborg
2007-09-19 20:36               ` 2.6.23-rc6-mm1 Gabriel C
2007-09-19 20:43                 ` 2.6.23-rc6-mm1 Sam Ravnborg
2007-09-19 18:48           ` 2.6.23-rc6-mm1 Sam Ravnborg
2007-09-18 15:43 ` modpost errors ( Re: 2.6.23-rc6-mm1) Gabriel C
2007-09-18 15:56   ` Sam Ravnborg
2007-09-18 16:37     ` [v4l-dvb-maintainer] " mkrufky
2007-09-18 22:06       ` Mauro Carvalho Chehab
2007-09-18 16:20 ` 2.6.23-rc6-mm1: Build failure on ppc64 drivers/net/ehea/ehea_main.c Mel Gorman
2007-09-18 16:41   ` Mel Gorman
2007-09-18 19:08   ` David Miller
2007-09-18 17:18 ` 2.6.23-rc6-mm1 (watchdog) Randy Dunlap
2007-09-18 17:41   ` Randy Dunlap
2007-09-18 17:20 ` 2.6.23-rc6-mm1 Miles Lane
2007-09-18 18:05   ` 2.6.23-rc6-mm1 Mel Gorman
2007-09-18 17:44 ` 2.6.23-rc6-mm1 Mel Gorman
2007-09-19 16:29   ` 2.6.23-rc6-mm1: kgdb support on ppc64 utterly broken Mel Gorman
2007-09-22  8:41   ` 2.6.23-rc6-mm1 Satyam Sharma
2007-09-24 11:14     ` 2.6.23-rc6-mm1 Mel Gorman
2007-09-18 19:32 ` 2.6.23-rc6-mm1 - Mostly working, with a kbuild oddity Valdis.Kletnieks
2007-09-18 20:32   ` Sam Ravnborg
2007-09-18 22:03     ` Valdis.Kletnieks
2007-09-19  7:34       ` Sam Ravnborg
2007-09-19 15:53         ` Valdis.Kletnieks
2007-09-19 17:39           ` Sam Ravnborg
2007-09-18 20:21 ` 2.6.23-rc6-mm1: failure to boot on HP nx6325 Rafael J. Wysocki
2007-09-18 20:54   ` Rafael J. Wysocki
2007-09-18 21:37     ` 2.6.23-rc6-mm1: failure to boot on HP nx6325, no sound when booted, USB-related WARNING Rafael J. Wysocki
2007-09-19  7:06       ` Thomas Gleixner
2007-09-19 17:44         ` Rafael J. Wysocki
2007-09-19 19:21           ` Thomas Gleixner
2007-09-20  0:06             ` Rafael J. Wysocki
2007-09-20  6:18               ` Thomas Gleixner
2007-09-20 13:29                 ` Rafael J. Wysocki
2007-09-20 13:43                   ` Thomas Gleixner
2007-09-20 14:12                     ` Rafael J. Wysocki
2007-09-20 13:53                       ` Thomas Gleixner
2007-09-20 14:47                         ` Rafael J. Wysocki
2007-09-20 14:50                           ` Thomas Gleixner
2007-09-20 15:49                             ` Thomas Gleixner
2007-09-20 20:39                               ` Rafael J. Wysocki
2007-09-20 21:08                                 ` Thomas Gleixner
2007-09-20 21:35                                   ` Linus Torvalds
2007-09-20 21:54                                     ` Rafael J. Wysocki
2007-09-20 22:01                                       ` Thomas Gleixner
2007-09-20 21:55                                     ` Linus Torvalds
2007-09-20 22:05                                       ` Thomas Gleixner
2007-09-20 22:30                                         ` Rafael J. Wysocki
2007-09-21 12:59                                           ` Thomas Gleixner
2007-09-21 14:20                                             ` Rafael J. Wysocki
2007-09-21 16:27                                               ` Thomas Gleixner
2007-09-21 19:20                                                 ` Rafael J. Wysocki
2007-09-21 19:16                                                   ` Thomas Gleixner
2007-09-21 19:37                                                     ` Rafael J. Wysocki
2007-09-20 23:35                                       ` Len Brown
2007-09-21  7:56                                         ` Thomas Gleixner
2007-09-21  9:25                                           ` Rafael J. Wysocki
2007-09-21  4:51                                       ` Paul Mackerras
2007-09-21  8:06                                         ` Thomas Gleixner
2007-10-11 21:19                                           ` Pavel Machek
2007-09-20 21:45                                   ` Rafael J. Wysocki
2007-09-20 21:53                                     ` Thomas Gleixner
2007-09-20 22:35                                       ` Rafael J. Wysocki
2007-09-21  9:24                                       ` Rafael J. Wysocki
2007-09-20 20:42                       ` Rafael J. Wysocki
2007-09-18 20:54 ` 2.6.23-rc6-mm1 sparc build error Mathieu Desnoyers
2007-09-18 21:05   ` Andrew Morton
2007-09-20 12:53     ` Guennadi Liakhovetski
2007-09-21 13:51       ` Mathieu Desnoyers
2007-09-18 21:45 ` 2.6.23-rc6-mm1: atomic counter underflow Mariusz Kozlowski
2007-09-19  8:27   ` Cornelia Huck
2007-09-19 16:43     ` Mariusz Kozlowski
2007-09-19 18:02       ` Cornelia Huck
2007-09-20  7:42         ` kobject: Temporarily save k_name on cleanup for debug message Cornelia Huck
2007-09-20  7:43         ` Cornelia Huck
2007-09-20 17:26           ` Mariusz Kozlowski
2007-09-20 13:35         ` 2.6.23-rc6-mm1: atomic counter underflow Cornelia Huck
2007-09-20 16:30           ` Pierre Ossman
2007-09-20 17:27           ` Mariusz Kozlowski
2007-09-19  9:28 ` 2.6.23-rc6-mm1 -- powerpc link failure Andy Whitcroft
2007-09-19 16:36   ` Segher Boessenkool
2007-09-19 16:52     ` Andy Whitcroft
2007-09-19 17:44   ` Sam Ravnborg
2007-09-25 13:40     ` Andy Whitcroft
2007-09-19  9:36 ` 2.6.23-rc6-mm1 -- powerpc pSeries_log_error panic in rtas_call/early_enable_eeh Andy Whitcroft
2007-09-19 11:43 ` X-freeze after clflush changes [Was: 2.6.23-rc6-mm1] Jiri Slaby
2007-09-19 11:53   ` Jiri Slaby
2007-09-19 14:59     ` Jiri Slaby
2007-09-19 19:10       ` Andrew Morton
2007-09-19 19:24         ` Andi Kleen
2007-09-19 19:46           ` Jiri Slaby
2007-09-19 19:54             ` Andi Kleen
2007-09-19 19:57               ` Jiri Slaby
2007-09-19 20:01                 ` Jiri Slaby
2007-09-19 21:42                   ` Andrew Morton
2007-09-19 20:32                 ` Valdis.Kletnieks
2007-09-19 20:47                   ` Jiri Slaby
2007-09-20 13:17                     ` Valdis.Kletnieks
2007-09-20 22:24                       ` Dave Airlie
2007-09-20  1:51                 ` Dave Airlie
2007-09-20  7:24                   ` Jiri Slaby
2007-09-20  7:33                     ` Dave Airlie
2007-09-20  9:24                       ` Zhenyu Wang
2007-09-20 22:10                         ` Jiri Slaby
2007-09-21  1:27                           ` Zhenyu Wang
2007-09-20  0:18           ` Dave Airlie
2007-09-20  1:42           ` Dave Airlie
2007-09-20  2:24             ` Andrew Morton
2007-09-20  7:19               ` Jiri Slaby
2007-09-20 22:06             ` Matt Mackall
2007-09-20 23:03               ` Andi Kleen
2007-09-20 23:31                 ` Matt Mackall
2007-09-20 23:44                   ` Andi Kleen
2007-09-21 17:18                     ` Valdis.Kletnieks
2007-09-21  7:07                   ` Jiri Slaby
2007-09-21 17:16               ` Valdis.Kletnieks
2007-09-21 17:30                 ` Jiri Slaby
2007-09-21 17:54                   ` Valdis.Kletnieks
2007-09-21 19:33                   ` Valdis.Kletnieks
2007-09-21 19:38                     ` Jiri Slaby
2007-09-21 19:43                       ` Jiri Slaby
2007-09-24  3:25                         ` Valdis.Kletnieks
2007-09-24  6:06                           ` Jiri Slaby
2007-09-24  7:37                             ` Valdis.Kletnieks
2007-09-24  8:10                               ` Jiri Slaby
2007-09-19 16:43 ` 2.6.23-rc6-mm1 -- mkfs stuck in 'D' Andy Whitcroft
2007-09-19 20:03   ` Hugh Dickins
2007-09-19 20:44     ` Peter Zijlstra
2007-09-20 11:31       ` Hugh Dickins
2007-09-20 12:15         ` Peter Zijlstra
     [not found]         ` <20070922015509.GA5332@mail.ustc.edu.cn>
2007-09-22  1:55           ` Fengguang Wu
2007-09-22 13:16             ` Peter Zijlstra
     [not found]               ` <20070923012049.GA6010@mail.ustc.edu.cn>
2007-09-23  1:20                 ` Fengguang Wu
2007-09-23 13:02                   ` Peter Zijlstra
     [not found]                     ` <20070924030109.GA5892@mail.ustc.edu.cn>
2007-09-24  3:01                       ` Fengguang Wu
2007-09-24  7:35                         ` Peter Zijlstra
     [not found]                           ` <20070924081207.GA2266@mail.ustc.edu.cn>
2007-09-24  8:12                             ` Fengguang Wu
2007-09-23 14:19             ` 2.6.23-rc6-mm1 -- ipg.c don't compile on i386 with CONFIG_HIGHMEM64G trem
2007-09-19 23:02 ` 2.6.23-rc6-mm1 Tilman Schmidt
2007-09-19 23:24   ` 2.6.23-rc6-mm1 Andrew Morton
2007-09-19 23:28     ` 2.6.23-rc6-mm1 Chuck Ebbert
2007-09-19 23:55       ` 2.6.23-rc6-mm1 Tilman Schmidt
2007-09-20 19:10         ` 2.6.23-rc6-mm1 Tilman Schmidt
2007-09-19 23:44     ` 2.6.23-rc6-mm1 David Brownell
2007-09-20  0:06       ` 2.6.23-rc6-mm1 Andrew Morton
2007-09-20  4:43         ` 2.6.23-rc6-mm1 David Brownell
2007-09-20  6:11           ` 2.6.23-rc6-mm1 Andrew Morton
2007-09-20  7:54             ` Kay Sievers [this message]
2007-09-20 16:15               ` 2.6.23-rc6-mm1 David Brownell
2007-09-20  8:51             ` 2.6.23-rc6-mm1 Alessandro Zummo
2007-09-20 17:36             ` 2.6.23-rc6-mm1 David Brownell
2007-09-20 19:20   ` 2.6.23-rc6-mm1 Tilman Schmidt
2007-09-20 20:25     ` 2.6.23-rc6-mm1 Andrew Morton
2007-09-21  0:53       ` 2.6.23-rc6-mm1 Tilman Schmidt
2007-09-19 23:58 ` 2.6.23-rc6-mm1 Joseph Fannin
2007-09-20  0:09   ` 2.6.23-rc6-mm1 Andrew Morton
     [not found]     ` <f86d6cc00709200721h6e8f7cf8xa2264e9d1f88883b@mail.gmail.com>
     [not found]       ` <f86d6cc00709200912j37a3218boa882a044c0610779@mail.gmail.com>
2007-09-20 19:44         ` 2.6.23-rc6-mm1 Andrew Morton
2007-09-21  2:04         ` 2.6.23-rc6-mm1 Joseph Fannin
2007-09-21  2:04         ` [PATCH] make mv643xx_eth.c build again Joseph Fannin
2007-09-20  8:41 ` 2.6.23-rc6-mm1 - make access to tasks nsproxy ligther (fix) Cedric Le Goater
2007-09-20  8:59   ` Pavel Emelyanov
2007-09-20  9:12     ` Cedric Le Goater
2007-09-20 17:08       ` Cedric Le Goater
2007-09-24  4:00         ` Serge E. Hallyn
2007-09-20 13:13 ` 2.6.23-rc6-mm1: Build failure on ppc64 drivers/ata/pata_scc.c Mel Gorman
2007-09-20 14:09   ` Alan Cox
2007-09-20 15:14     ` Mel Gorman
2007-09-20 15:45     ` Kamalesh Babulal
2007-09-22  2:50     ` Satyam Sharma
2007-09-24 11:01       ` Mel Gorman
2007-09-26  3:39       ` Jeff Garzik
2007-09-20 13:25 ` Build failure on ppc64 drivers/block/ps3disk.c Mel Gorman
2007-09-20 13:32   ` Jens Axboe
2007-09-20 13:37   ` 2.6.23-rc6-mm1: Build failures on ppc64_defconfig Satyam Sharma
2007-09-22  6:50     ` Satyam Sharma
2007-09-22  6:51     ` Satyam Sharma
2007-09-22  6:54     ` Satyam Sharma
2007-09-24 11:12       ` Mel Gorman
2007-09-22  7:25     ` Satyam Sharma
2007-09-22  7:40     ` [PATCH -mm] pasemi_mac: Build fix after recent netdev stats changes Satyam Sharma
2007-09-21  2:05 ` [PATCH] Remove broken netfilter binary sysctls from bridging code Joseph Fannin
2007-09-21  4:21   ` Eric W. Biederman
2007-09-24 16:55     ` Patrick McHardy
2007-09-24 20:14       ` Stephen Hemminger
2007-09-25  4:07         ` Patrick McHardy
2007-09-25 16:12           ` Stephen Hemminger
2007-09-25 16:22             ` Patrick McHardy
2007-09-25 14:03       ` Eric W. Biederman
2007-09-25 14:26         ` Patrick McHardy
2007-09-25 16:38           ` Eric W. Biederman
2007-09-22  7:54 ` [PATCH -mm] mv643xx_eth: Remove redundant multiple initialization Satyam Sharma
2007-09-22  7:55 ` [PATCH -mm] iseries_veth: Kill unused variable Satyam Sharma
     [not found] ` <20070923014214.GA16766@mail.ustc.edu.cn>
2007-09-23  1:42   ` [BUG 2.6.23-rc6-mm1] NMI Watchdog detected LOCKUP on CPU 0 Fengguang Wu
2007-09-23  4:22     ` Andrew Morton
     [not found]       ` <20070923053040.GA5820@mail.ustc.edu.cn>
2007-09-23  5:30         ` Fengguang Wu
2007-09-23  5:35           ` Andrew Morton
     [not found]             ` <20070923055303.GA14899@mail.ustc.edu.cn>
2007-09-23  5:53               ` Fengguang Wu
     [not found]   ` <20070923015217.GA5956@mail.ustc.edu.cn>
2007-09-23  1:52     ` Fengguang Wu
2007-09-23  3:01 ` [-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int WANG Cong
2007-09-23 22:13   ` roel
2007-09-24  2:38     ` WANG Cong
2007-09-24  2:50     ` [Resend][-mm " WANG Cong
2007-09-24  7:09     ` [-mm " Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ae72650709200054u356203b9rb594f1644730071b@mail.gmail.com \
    --to=kay.sievers@vrfy.org \
    --cc=a.zummo@towertech.it \
    --cc=akpm@linux-foundation.org \
    --cc=cebbert@redhat.com \
    --cc=david-b@pacbell.net \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tilman@imap.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).