Fix for an SMP locking bug in NFS code

From: Matt Chapman (matthewc@cse.unsw.edu.au)
Date: Tue May 22 2001 - 08:11:40 EST


Linus,

I've already run this by Trond so I'm sending this patch without
further ado. It adds a lock_kernel around a call into NLM code,
and removes an extraneous (really) lock_kernel in sys_fcntl64.

In more detail:

There's no lock_kernel around the F_SETLK case in fcntl, but
some of the NLM code which gets called in the NFS case needs
to be protected by locks (in particular, nlmclnt_block fiddles
with the global list nlm_blocked). We decided that, to protect
the RPC code as well, the best place to put a lock would be
around the call to nlmclnt_proc in nfs_lock.

There is, on the other hand, a lock_kernel in fcntl64, and
analysis shows that if it's not needed in fcntl - which it
shouldn't be, if the filesystems do any necessary locking -
then it's not needed in fcntl64 either (the code is essentially
identical).

Cheers,
Matt



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 23 2001 - 21:00:45 EST