From: Ingo Molnar <mingo@elte.hu>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>,
Kay Sievers <kay.sievers@vrfy.org>,
"Luck, Tony" <tony.luck@intel.com>, Greg KH <gregkh@suse.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Sergei Trofimovich <slyich@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linux PM mailing list <linux-pm@vger.kernel.org>,
Borislav Petkov <bp@amd64.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"prasad@linux.vnet.ibm.com" <prasad@linux.vnet.ibm.com>,
Ming Lei <tom.leiming@gmail.com>,
Djalal Harouni <tixxdz@opendz.org>,
Borislav Petkov <borislav.petkov@amd.com>,
Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
Andi Kleen <ak@linux.intel.com>,
"gouders@et.bocholt.fh-gelsenkirchen.de"
<gouders@et.bocholt.fh-gelsenkirchen.de>,
Marcos Souza <marcos.mage@gmail.com>,
"justinmattock@gmail.com" <justinmattock@gmail.com>,
Jeff Chua <jeff.chua.linux@gmail.com>
Subject: Re: [PATCH] mce: fix warning messages about static struct mce_device
Date: Thu, 19 Jan 2012 20:38:20 +0100 [thread overview]
Message-ID: <20120119193820.GA28362@elte.hu> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1201191007541.1447-100000@iolanthe.rowland.org>
* Alan Stern <stern@rowland.harvard.edu> wrote:
> Or to put it another way, even though no code takes references
> to these device structures (can you really guarantee that even
> now?), [...]
That's a good question. Do these devices get exposed to
user-space access via sysfs somehow, where such an extra
reference could materialize?
> [...] how do you prevent references being taken in future
> versions of the kernel? Calling memset while there still are
> outstanding references very definitely _is_ a bug.
Unless there's a reference i missed the 'refcounting' here is
very simple and does not exist at all.
IMHO you should not impose complexity and abstraction on code
just because. Now i don't care much about the extra pointer, but
the [NR_CPUS] array was doubly ugly (and Greg promised to fix
that, so no problems from me).
So the conclusion is that the reasons stated here don't really
apply. The one i mentioned *does* apply: the original bug was
due to sloppy life time rules of this driver buffer, and that
came back to bite us. Making it dynamic solves that kind of
problem. In that sense the warning is fine too.
Thanks,
Ingo
next prev parent reply other threads:[~2012-01-19 19:39 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-16 22:40 [PATCH] mce: fix warning messages about static struct mce_device Greg KH
2012-01-17 0:14 ` Djalal Harouni
2012-01-17 0:15 ` Greg KH
2012-01-17 0:21 ` Linus Torvalds
2012-01-17 1:00 ` Greg KH
2012-01-17 8:38 ` Ingo Molnar
2012-01-17 15:51 ` Greg KH
2012-01-17 16:28 ` Greg KH
2012-01-18 9:31 ` Ingo Molnar
2012-01-18 14:42 ` Greg KH
2012-01-18 15:51 ` Alan Stern
2012-01-18 17:28 ` Luck, Tony
2012-01-18 17:54 ` Srivatsa S. Bhat
2012-01-18 18:10 ` Alan Stern
2012-01-18 18:50 ` Kay Sievers
2012-01-18 19:00 ` Luck, Tony
2012-01-18 19:31 ` Srivatsa S. Bhat
2012-01-19 12:32 ` Ingo Molnar
2012-01-19 13:29 ` Srivatsa S. Bhat
2012-01-19 15:13 ` Alan Stern
2012-01-19 19:38 ` Ingo Molnar [this message]
2012-01-19 20:52 ` Alan Stern
2012-01-19 12:28 ` Ingo Molnar
2012-01-26 23:49 ` MCE: convert static array of pointers to per-cpu variables Greg KH
2012-01-27 13:14 ` Srivatsa S. Bhat
2012-01-17 12:36 ` [PATCH] mce: fix warning messages about static struct mce_device Srivatsa S. Bhat
2012-01-17 15:52 ` Greg KH
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=20120119193820.GA28362@elte.hu \
--to=mingo@elte.hu \
--cc=ak@linux.intel.com \
--cc=borislav.petkov@amd.com \
--cc=bp@amd64.org \
--cc=gouders@et.bocholt.fh-gelsenkirchen.de \
--cc=gregkh@suse.de \
--cc=jeff.chua.linux@gmail.com \
--cc=justinmattock@gmail.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=marcos.mage@gmail.com \
--cc=prasad@linux.vnet.ibm.com \
--cc=rjw@sisk.pl \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=slyich@gmail.com \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
--cc=stern@rowland.harvard.edu \
--cc=tglx@linutronix.de \
--cc=tixxdz@opendz.org \
--cc=tom.leiming@gmail.com \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.