LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Simon Arlott <simon@arlott.org>
To: Duncan Sands <duncan.sands@math.u-psud.fr>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] usbatm: Allow sub-drivers to handle calls to atm_proc_read.
Date: Wed, 31 Jan 2007 17:50:24 +0000 [thread overview]
Message-ID: <45C0D6E0.2090707@simon.arlott.org.uk> (raw)
In-Reply-To: <200701311548.13076.duncan.sands@math.u-psud.fr>
[-- Attachment #1: Type: text/plain, Size: 1534 bytes --]
On 31/01/07 14:48, Duncan Sands wrote:
>> usbatm only outputs basic information via the per-device /proc/net/atm/ file,
>> this patch allows the device specific USB ATM drivers to replace the
>> atm_proc_read function with their own.
>
> I'm still meditating on this. The reason I didn't do this originally is
> because of potential problems with modem disconnection and/or module
> unloading (the cxacru module can be unloaded at any time - it's the usbatm
> module that can't be unloaded when a connection is open - so you've got to
> be careful that no-one can call into cxacru after or while it's being
> destroyed). I think it will be OK as long as usbatm calls unbind after
> shutting down the ATM layer (since otherwise your read method could be
> called after you've freed your cxacru private data) which is not the case
> right now, but should be easy to arrange. Horrible things may happen
> if proc_read can still be running after atm_dev_deregister has returned,
> but, if so, horrible things can already happen right now. I don't understand
> why this is impossible; maybe it is possible. The worst that will happen
> (given that none of the proc_read methods sleeps) is that freed memory will
> be accessed and the contents spat out in the proc file (if proc_read sleeps,
> that could result in trying to run code inside a destroyed module).
>
> Ciao,
>
> Duncan.
Couldn't the cxacru instance pointer to the proc_read function be set to NULL before unloading?
--
Simon Arlott
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 829 bytes --]
next prev parent reply other threads:[~2007-01-31 18:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-30 21:21 Simon Arlott
2007-01-31 14:48 ` Duncan Sands
2007-01-31 17:50 ` Simon Arlott [this message]
2007-01-31 18:04 ` Duncan Sands
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=45C0D6E0.2090707@simon.arlott.org.uk \
--to=simon@arlott.org \
--cc=99d904aa15c87e3aea1hcjbh0000q9ju@thunder.lp0.eu \
--cc=duncan.sands@math.u-psud.fr \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH 1/3] usbatm: Allow sub-drivers to handle calls to atm_proc_read.' \
/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
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).