Re: list corruption in locks_start_grace with 2.6.28-rc3

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

 



On Wed, Nov 12, 2008 at 11:15:23AM -0500, Jeff Moyer wrote:
> Hi,
> 
> I'm doing some testing which involves roughly the following:
> 
> o mount a file system on the server
> o start the nfs service
> - mount the nfs-exported file system from a client
> - perform a dd from the client
> - umount the nfs-exported file system from a client
> o stop the nfs service
> o unmount the file system on the server
> 
> After several iterations of this, varying the number of nfsd threads
> started, I get the attached backtrace.  I've reproduced it twice, now.
> 
> Let me know if I can be of further help.

Apologies for the delay, and thanks for the report.  Does the following
help?  (Untested).

--b.

commit 77b810d52cc07212c79848b98bb992f0541afefb
Author: J. Bruce Fields <bfields@xxxxxxxxxxxxxx>
Date:   Thu Nov 20 14:36:17 2008 -0600

    nfsd: clean up grace period on early exit
    
    If nfsd was shut down before the grace period ended, we could end up
    with a freed object still on grace_list.  Thanks to Jeff Moyer for
    reporting the resulting list corruption warnings.
    
    Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxxxxxx>
    Cc: Jeff Moyer <jmoyer@xxxxxxxxxx>

diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index c631a83..56b0767 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -181,6 +181,7 @@ lockd(void *vrqstp)
 	}
 	flush_signals(current);
 	cancel_delayed_work_sync(&grace_period_end);
+	locks_end_grace(&lockd_manager);
 	if (nlmsvc_ops)
 		nlmsvc_invalidate_all();
 	nlm_shutdown_hosts();
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index b0bebc5..1a052ac 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3261,6 +3261,7 @@ nfs4_state_shutdown(void)
 {
 	cancel_rearming_delayed_workqueue(laundry_wq, &laundromat_work);
 	destroy_workqueue(laundry_wq);
+	locks_end_grace(&nfsd4_manager);
 	nfs4_lock_state();
 	nfs4_release_reclaim();
 	__nfs4_state_shutdown();
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux