Hello! On Nov 29, 2007, at 2:08 PM, J. Bruce Fields wrote:
On Thu, Nov 29, 2007 at 01:46:04PM -0500, Oleg Drokin wrote:Thanks for the fix! Looks right to me. Yes, somehow I missed this oneHello! Per our discussion, I am resending this patch that fixes a leak in nlmsvc_testlock. It is addition to another leak fixing patch you already have. Without the patch, there is a leakage of nlmblock structure refcount that holds a reference nlmfile structure, that holds a reference to struct file, when async GETFL is used (-EINPROGRESS return from file_ops->lock()), and also in some error caseswhen you sent it privately. Applied and pushed out to git://linux-nfs.org/~bfields/linux.git nfs-server-stable and I'll submit it for 2.6.25.
After playing around that code a bit more, I figured out the leak was not completely fixed by that first patch, the case where there is conflicting
lock passed in by callback still leaks block reference.This simple incremental fix (against your current tree) takes care of that.
Signed-off-by: Oleg Drokin <green@xxxxxxxxxxxxxx> I guess there is no way to safely include patches in messages in apple mail, so the patch is still attached.
Attachment:
nlmblock-leak_fix-2-incr.diff
Description: Binary data