Received: by oss.sgi.com id ; Tue, 20 Jun 2000 20:11:23 -0700 Received: from host.dsl.speakeasy.net ([216.254.93.178]:19703 "EHLO vaio.greennet") by oss.sgi.com with ESMTP id ; Tue, 20 Jun 2000 20:11:17 -0700 Received: from localhost (becker@localhost) by vaio.greennet (8.9.3/8.8.7) with ESMTP id XAA00738; Tue, 20 Jun 2000 23:12:36 -0400 Date: Tue, 20 Jun 2000 23:12:36 -0400 (EDT) From: Donald Becker X-Sender: becker@vaio.greennet To: Andrew Morton cc: "netdev@oss.sgi.com" Subject: Re: modular net drivers, take 2 In-Reply-To: <395017F3.516165AD@uow.edu.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-netdev@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;netdev-outgoing 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@scyld.com Scyld Computing Corporation http://www.scyld.com 410 Severn Ave. Suite 210 Annapolis MD 21403