Received: by oss.sgi.com id ; Mon, 19 Jun 2000 17:32:58 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:57617 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Mon, 19 Jun 2000 17:32:37 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via SMTP id RAA07743 for ; Mon, 19 Jun 2000 17:27:39 -0700 (PDT) mail_from (kaos@kao2.melbourne.sgi.com) Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id KAA13452; Tue, 20 Jun 2000 10:29:59 +1000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: Donald Becker cc: Andrew Morton , "netdev@oss.sgi.com" Subject: Re: modular net drivers In-reply-to: Your message of "Mon, 19 Jun 2000 20:19:06 -0400." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 20 Jun 2000 10:29:59 +1000 Message-ID: <3292.961460999@kao2.melbourne.sgi.com> Sender: owner-netdev@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;netdev-outgoing On Mon, 19 Jun 2000 20:19:06 -0400 (EDT), Donald Becker wrote: >On Mon, 19 Jun 2000, Andrew Morton wrote: > >> As you may have noticed, Al Viro is running around the kernel getting >> rid of MOD_INC_USE_COUNT and MOD_DEC_USE_COUNT. His long-term plan >> is to remove MOD_INC_USE_COUNT and MOD_DEC_USE_COUNT completely. >> I'm looking into the changes required for the net drivers. > >Hmmm, this is curious. >Should not the "feature freeze" phase come well after the "interface freeze"? >This is pretty obviously an interface change. It is also an important bug fix. The module code has suffered from unload races ever since the kernel locking became fine grained, users can crash the kernel. >> - All 2.4-only netdrivers can have all their MOD_DEC and MOD_INC calls >> removed. All that twisty logic to keep track of the counts can be >> tossed. A single >> >> SET_NETDEVICE_OWNER(dev); > >"Twisty logic"? Most of the drivers have straight-forward use counts. >How is this new method any simpler? If anything, it seems to be more >complex without any obvious benefit. There are inherent unload races when code that lives inside a module tries to adjust the use count on that module. To the extent that the code pages can be deleted underneath the code that is executing! Module use counts need to be set before entering the module, not after the module code has started executing.