public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: dedekind1@gmail.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.de>,
	Sitsofe Wheeler <sitsofe@yahoo.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Christof Schmitt <christof.schmitt@de.ibm.com>
Subject: Re: [PULL] param sysfs oops (simple, leaky) fix, bool arrays fix
Date: Wed, 5 May 2010 15:03:41 +0930	[thread overview]
Message-ID: <201005051503.42289.rusty@rustcorp.com.au> (raw)
In-Reply-To: <1272996439.2458.0.camel@localhost.localdomain>

On Wed, 5 May 2010 03:37:19 am Artem Bityutskiy wrote:
> On Tue, 2010-05-04 at 11:53 +0930, Rusty Russell wrote:
> > On Tue, 27 Apr 2010 08:23:24 pm Artem Bityutskiy wrote:
> > > Rusty, correct me if I'm wrong, but it looks like the above memleak was
> > > introduced by e180a6b7759a99a28cbcce3547c4c80822cb6c2a, where you added
> > > the kstrdup(). So you kinda fixed the sysfs case (it still memleaks
> > > though), but at the cost of additional insmod/rmmod leak, right?
> > 
> > Yep!
> 
> Are you working/planning to work on fixing this regression?

I'm still ambivalent on it; I have patches but it's a lot of churn for not
much gain.

To fix this, we need a way to lock parameters against changing by sysfs, and
we need to use it everywhere.  Past experience has demonstrated that this will
never be maintained.  

On the other hand, the leak is trivial.

Here's a git tree if you want to look further:

The following changes since commit 05ce7bfe547c9fa967d9cab6c37867a9cb6fb3fa:
  Linus Torvalds (1):
        Merge branch 'for_linus' of git://git.kernel.org/.../jack/linux-fs-2.6

are available in the git repository at:

  git://git.kernel.org/rusty/linux-2.6-param-fixes.git master

Rusty Russell (17):
      param: move the EXPORT_SYMBOL to after the definitions.
      params: don't hand NULL values to param.set callbacks.
      param: use ops in struct kernel_param, rather than get and set fns directly
      param: silence .init.text references from param ops
      param: add a free hook to kernel_param_ops.
      param: use free hook for charp
      param: make param sections const.
      param: locking for kernel parameters
      param: add kerneldoc
      param: remove unnecessary writable charp
      param: simple locking for sysfs-writable charp parameters
      param: lock myri10ge_fw_name against sysfs changes.
      param: lock if_sdio's lbs_helper_name and lbs_fw_name against sysfs changes.
      param: update drivers/char/ipmi/ipmi_watchdog.c to new scheme
      ide: use module_param_named rather than module_param_call
      param: use module_param in drivers/message/fusion/mptbase.c
      param: update drivers/acpi/debug.c to new scheme

Sachin Sant (1):
      Add param ops struct for hvc_iucv driver.

 arch/um/drivers/hostaudio_kern.c          |   10 +
 drivers/acpi/debug.c                      |   32 +++-
 drivers/char/hvc_iucv.c                   |    9 +-
 drivers/char/ipmi/ipmi_watchdog.c         |   42 +++--
 drivers/ide/ide.c                         |   20 ++-
 drivers/input/misc/ati_remote2.c          |   26 ++-
 drivers/input/mouse/psmouse-base.c        |   14 +-
 drivers/message/fusion/mptbase.c          |    3 +-
 drivers/misc/lkdtm.c                      |    4 +-
 drivers/net/myri10ge/myri10ge.c           |   54 ++++--
 drivers/net/wireless/libertas/if_sdio.c   |   32 +++-
 drivers/net/wireless/libertas/if_usb.c    |    3 +
 drivers/net/wireless/libertas_tf/if_usb.c |    3 +
 drivers/scsi/bfa/bfad.c                   |    2 +
 drivers/staging/rtl8187se/r8180_core.c    |    6 +-
 drivers/staging/rtl8192e/r8192E_core.c    |    6 +-
 drivers/staging/rtl8192su/r8192U_core.c   |    6 +-
 drivers/usb/atm/ueagle-atm.c              |    2 +
 drivers/video/uvesafb.c                   |    7 +-
 drivers/video/vt8623fb.c                  |    2 +
 fs/nfs/callback.c                         |   11 +-
 include/linux/moduleparam.h               |  282 ++++++++++++++++++++++-------
 init/main.c                               |    8 +-
 kernel/params.c                           |  233 ++++++++++++++++--------
 net/mac80211/rate.c                       |    2 +
 net/sunrpc/xprtsock.c                     |   26 ++-
 scripts/mod/modpost.c                     |   13 ++
 27 files changed, 623 insertions(+), 235 deletions(-)

  reply	other threads:[~2010-05-05  5:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28 22:32 [PULL] param sysfs oops (simple, leaky) fix, bool arrays fix Rusty Russell
2010-04-27 10:31 ` Artem Bityutskiy
2010-04-27 10:53   ` Artem Bityutskiy
2010-05-04  2:23     ` Rusty Russell
2010-05-04 18:07       ` Artem Bityutskiy
2010-05-05  5:33         ` Rusty Russell [this message]
2010-05-05  7:25           ` Artem Bityutskiy
2010-05-05  7:44             ` Takashi Iwai
2010-05-05  8:49               ` Artem Bityutskiy
2010-05-05  9:04                 ` Artem Bityutskiy
2010-05-06  6:24                   ` Takashi Iwai
2010-05-06  2:28                 ` Rusty Russell
2010-06-22 16:50                   ` Phil Carmody
2010-06-22 23:23                     ` Rusty Russell

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=201005051503.42289.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=christof.schmitt@de.ibm.com \
    --cc=dedekind1@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sitsofe@yahoo.com \
    --cc=tiwai@suse.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox