kernel-ark/net
Bruce Allan f35279d3f7 [PATCH] sunrpc: cache_register can use wrong module reference
When registering an RPC cache, cache_register() always sets the owner as the
sunrpc module.  However, there are RPC caches owned by other modules.  With
the incorrect owner setting, the real owning module can be removed potentially
with an open reference to the cache from userspace.

For example, if one were to stop the nfs server and unmount the nfsd
filesystem, the nfsd module could be removed eventhough rpc.idmapd had
references to the idtoname and nametoid caches (i.e.
/proc/net/rpc/nfs4.<cachename>/channel is still open).  This resulted in a
system panic on one of our machines when attempting to restart the nfs
services after reloading the nfsd module.

The following patch adds a 'struct module *owner' field in struct
cache_detail.  The owner is further assigned to the struct proc_dir_entry
in cache_register() so that the module cannot be unloaded while user-space
daemons have an open reference on the associated file under /proc.

Signed-off-by: Bruce Allan <bwa@us.ibm.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 16:57:25 -07:00
..
802 [NET]: net/802: more endian annotations 2005-08-29 16:10:54 -07:00
8021q
appletalk
atm [ATM]: net/atm/ioctl.c should #include "common.h" 2005-09-05 18:04:28 -07:00
ax25
bluetooth
bridge [NET]: use __read_mostly on kmem_cache_t , DEFINE_SNMP_STAT pointers 2005-08-29 16:11:18 -07:00
core Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2005-09-06 00:47:18 -07:00
dccp [CCID3]: Call sk->sk_write_space(sk) when receiving a feedback packet 2005-08-29 16:13:46 -07:00
decnet [DECNET]: Tidy send side socket SKB allocation. 2005-09-01 17:43:45 -07:00
econet
ethernet
ieee80211 [IEEE80211]: Use correct size_t printf format string in ieee80211_rx.c 2005-09-05 23:19:49 -07:00
ipv4 [TCP]: Fix TCP_OFF() bug check introduced by previous change. 2005-09-05 18:55:48 -07:00
ipv6 [IPV6]: Repair Incoming Interface Handling for Raw Socket. 2005-09-01 17:44:49 -07:00
ipx
irda [IRDA]: IrDA prototype fixes 2005-09-05 18:08:11 -07:00
key
lapb
llc
netfilter [NETFILTER] remove bogus hand-coded htonll() from nenetlink_queue 2005-09-05 18:09:08 -07:00
netlink
netrom
packet
rose
rxrpc
sched [LIB]: Make TEXTSEARCH_BM plain tristate like the others 2005-08-29 16:11:11 -07:00
sctp [SCTP]: net/sctp/sysctl.c should #include <net/sctp/sctp.h> 2005-09-05 18:07:42 -07:00
sunrpc [PATCH] sunrpc: cache_register can use wrong module reference 2005-09-07 16:57:25 -07:00
unix
wanrouter
x25
xfrm [NET]: use __read_mostly on kmem_cache_t , DEFINE_SNMP_STAT pointers 2005-08-29 16:11:18 -07:00
compat.c
Kconfig /spare/repo/netdev-2.6 branch 'master' 2005-09-01 18:02:01 -04:00
Makefile /spare/repo/netdev-2.6 branch 'master' 2005-09-01 18:02:01 -04:00
nonet.c
socket.c [NET]: use __read_mostly on kmem_cache_t , DEFINE_SNMP_STAT pointers 2005-08-29 16:11:18 -07:00
sysctl_net.c
TUNABLE