netdev
[Top] [All Lists]

Re: modular net drivers, take 2

To: Andrew Morton <andrewm@xxxxxxxxxx>
Subject: Re: modular net drivers, take 2
From: Donald Becker <becker@xxxxxxxxx>
Date: Tue, 20 Jun 2000 23:12:36 -0400 (EDT)
Cc: "netdev@xxxxxxxxxxx" <netdev@xxxxxxxxxxx>
In-reply-to: <395017F3.516165AD@uow.edu.au>
Sender: owner-netdev@xxxxxxxxxxx
On Wed, 21 Jun 2000, Andrew Morton wrote:

> In this example, both dev->ioctl() and dev->get_stats() are called while
> the module refcount is zero.   So they're as risky as open(); these code
> paths need to be audited for races wrt kmalloc->schedule()
> opportunities.

Hmmm, now this is an important point.

I just "know" that ioctl() and get_stats() should be "simple" functions that
shouldn't do call any kernel function, except for perhaps printk().  This is
not documented in the skeleton driver, or elsewhere.

I'm guessing that the documentation should advise locking the module if any
operation is done in get_stats() or private_ioctl() that might result in a
reschedule.

Donald Becker                           becker@xxxxxxxxx
Scyld Computing Corporation             http://www.scyld.com
410 Severn Ave. Suite 210               Annapolis MD 21403



<Prev in Thread] Current Thread [Next in Thread>