- knfsd-fix-two-problems-that-can-cause-rmmod-nfsd-to-die.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     knfsd: Fix two problems that can cause rmmod nfsd to die

has been removed from the -mm tree.  Its filename is

     knfsd-fix-two-problems-that-can-cause-rmmod-nfsd-to-die.patch

This patch was probably dropped from -mm because
it has now been merged into a subsystem tree or
into Linus's tree, or because it was folded into
its parent patch in the -mm tree.

------------------------------------------------------
Subject: knfsd: Fix two problems that can cause rmmod nfsd to die
From: NeilBrown <neilb@xxxxxxx>


Both cause the 'entries' count in the export cache to be non-zero at module
removal time, so unregistering that cache fails and results in an oops.

1/ exp_pseudoroot (used for NFSv4 only) leaks a reference to an export
   entry.
2/ sunrpc_cache_update doesn't increment the entries count when it adds
   an entry.

Thanks to "david m.  richter" <richterd@xxxxxxxxxxxxxx> for triggering the
problem and finding one of the bugs.

Cc: "david m. richter" <richterd@xxxxxxxxxxxxxx>
Signed-off-by: Neil Brown <neilb@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/nfsd/export.c   |    4 +++-
 net/sunrpc/cache.c |    1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff -puN fs/nfsd/export.c~knfsd-fix-two-problems-that-can-cause-rmmod-nfsd-to-die fs/nfsd/export.c
--- devel/fs/nfsd/export.c~knfsd-fix-two-problems-that-can-cause-rmmod-nfsd-to-die	2006-05-22 22:34:58.000000000 -0700
+++ devel-akpm/fs/nfsd/export.c	2006-05-22 22:34:58.000000000 -0700
@@ -1066,9 +1066,11 @@ exp_pseudoroot(struct auth_domain *clp, 
 		rv = nfserr_perm;
 	else if (IS_ERR(exp))
 		rv = nfserrno(PTR_ERR(exp));
-	else
+	else {
 		rv = fh_compose(fhp, exp,
 				fsid_key->ek_dentry, NULL);
+		exp_put(exp);
+	}
 	cache_put(&fsid_key->h, &svc_expkey_cache);
 	return rv;
 }
diff -puN net/sunrpc/cache.c~knfsd-fix-two-problems-that-can-cause-rmmod-nfsd-to-die net/sunrpc/cache.c
--- devel/net/sunrpc/cache.c~knfsd-fix-two-problems-that-can-cause-rmmod-nfsd-to-die	2006-05-22 22:34:58.000000000 -0700
+++ devel-akpm/net/sunrpc/cache.c	2006-05-22 22:34:58.000000000 -0700
@@ -159,6 +159,7 @@ struct cache_head *sunrpc_cache_update(s
 		detail->update(tmp, new);
 	tmp->next = *head;
 	*head = tmp;
+	detail->entries++;
 	cache_get(tmp);
 	is_new = cache_fresh_locked(tmp, new->expiry_time);
 	cache_fresh_locked(old, 0);
_

Patches currently in -mm which might be from neilb@xxxxxxx are

origin.patch
fix-dcache-race-during-umount.patch
prune_one_dentry-tweaks.patch
remove-softlockup-from-invalidate_mapping_pages.patch
kconfig-select-things-at-the-closest-tristate-instead-of-bool.patch
make-address_space_operations-invalidatepage-return-void-reiser4.patch
md-reformat-code-in-raid1_end_write_request-to-avoid-goto.patch
md-remove-arbitrary-limit-on-chunk-size.patch
md-remove-useless-ioctl-warning.patch
md-increase-the-delay-before-marking-metadata-clean-and-make-it-configurable.patch
md-merge-raid5-and-raid6-code.patch
md-remove-nuisance-message-at-shutdown.patch
md-allow-checkpoint-of-recovery-with-version-1-superblock.patch
md-allow-checkpoint-of-recovery-with-version-1-superblock-fix.patch
md-allow-a-linear-array-to-have-drives-added-while-active.patch
md-support-stripe-offset-mode-in-raid10.patch
md-make-md_print_devices-static.patch
md-split-reshape-portion-of-raid5-sync_request-into-a-separate-function.patch
md-bitmap-fix-online-removal-of-file-backed-bitmaps.patch
md-bitmap-remove-bitmap-writeback-daemon.patch
md-bitmap-cleaner-separation-of-page-attribute-handlers-in-md-bitmap.patch
md-bitmap-use-set_bit-etc-for-bitmap-page-attributes.patch
md-bitmap-remove-unnecessary-page-reference-manipulations-from-md-bitmap-code.patch
md-bitmap-remove-dead-code-from-md-bitmap.patch
md-bitmap-tidy-up-i_writecount-handling-in-md-bitmap.patch
md-bitmap-change-md-bitmap-file-handling-to-use-bmap-to-file-blocks.patch
md-change-md-bitmap-file-handling-to-use-bmap-to-file-blocks-fix.patch
md-calculate-correct-array-size-for-raid10-in-new-offset-mode.patch
md-dm-reduce-stack-usage-with-stacked-block-devices.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux