public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Bob Miller <rem@osdl.org>, Rusty Russell <rusty@rustcorp.com.au>
Cc: Lars Magne Ingebrigtsen <larsi@gnus.org>,
	torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.5.60 5/9] Update the Archimedes parallel port driver for new module API.
Date: Sat, 15 Feb 2003 10:04:24 +0000	[thread overview]
Message-ID: <20030215100424.A20365@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20030215003700.GA13456@doc.pdx.osdl.net>; from rem@osdl.org on Fri, Feb 14, 2003 at 04:37:00PM -0800

On Fri, Feb 14, 2003 at 04:37:00PM -0800, Bob Miller wrote:
> -static void arc_inc_use_count(void)
> +static int arc_inc_use_count(void)
>  {
> -#ifdef MODULE
> -	MOD_INC_USE_COUNT;
> -#endif
> +	return try_module_get(THIS_MODULE);
>  }

Isn't one of the points of the module system that we don't try to run
code inside a module without the module being reference counted?

The normal way this is done is to add the module structure pointer into
a structure, and run try_module_get() from code external to the module
in question.  The above method would seem to violate that.

Rusty - comments?

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


  reply	other threads:[~2003-02-15  9:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-14 23:53 [PATCH 2.5.60 5/9] Update the Archimedes parallel port driver for new module API Bob Miller
     [not found] ` <m3el6agzw0.fsf@quimbies.gnus.org>
2003-02-15  0:37   ` Bob Miller
2003-02-15 10:04     ` Russell King [this message]
2003-02-17  2:54       ` Rusty Russell
2003-02-17 17:03         ` Bob Miller

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=20030215100424.A20365@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=larsi@gnus.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rem@osdl.org \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@transmeta.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