mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: Tigran Aivazian <tigran@veritas.com>
Cc: Dave Jones <davej@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: RFC: changes to microcode update driver.
Date: Wed, 8 Oct 2003 12:07:49 +0200	[thread overview]
Message-ID: <16259.57845.729645.108852@gargle.gargle.HOWL> (raw)
In-Reply-To: <Pine.LNX.4.44.0310080953550.1126-100000@einstein31.homenet>

Tigran Aivazian writes:
 > The patch was almost ready (together with Intel's changes) but I 
 > discovered that microcode module (or in fact ANY module that is loaded 
 > first on my system, 2.6.0-test6) is not unloadable, i.e. usage count stays 
 > at 1 even though nothing is using it. I am not aware of this general 

Maybe unrelated, but 2.6.0-test6 has a bug in drivers/char/misc.c's
module autoloading code, which causes device open() failures, and
subsequent unloading failures due to the usage count being 1 too high.

I posted the fix below, and Linus included it in a recent -bk snapshot.

/Mikael

diff -ruN linux-2.6.0-test6/drivers/char/misc.c linux-2.6.0-test6.char-misc-fix/drivers/char/misc.c
--- linux-2.6.0-test6/drivers/char/misc.c	2003-09-28 12:19:40.000000000 +0200
+++ linux-2.6.0-test6.char-misc-fix/drivers/char/misc.c	2003-10-04 14:55:45.000000000 +0200
@@ -157,12 +157,11 @@
 		list_for_each_entry(c, &misc_list, list) {
 			if (c->minor == minor) {
 				new_fops = fops_get(c->fops);
-				if (!new_fops)
-					goto fail;
 				break;
 			}
 		}
-		goto fail;
+		if (!new_fops)
+			goto fail;
 	}
 
 	err = 0;

  reply	other threads:[~2003-10-08 10:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-07 10:58 Tigran Aivazian
2003-10-07 11:02 ` Tigran Aivazian
2003-10-07 13:34 ` Giacomo A. Catenazzi
2003-10-07 13:48   ` Tigran Aivazian
2003-10-07 13:54 ` Dave Jones
2003-10-08  8:59   ` Tigran Aivazian
2003-10-08 10:07     ` Mikael Pettersson [this message]
2003-10-08 19:43 ` Jamie Lokier
2003-10-07 13:56 Nakajima, Jun
2003-10-07 15:56 ` Maciej Zenczykowski
2003-10-07 16:03   ` Tigran Aivazian

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=16259.57845.729645.108852@gargle.gargle.HOWL \
    --to=mikpe@csd.uu.se \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tigran@veritas.com \
    /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

all inboxes | Powered by JetHome®