On Nov 29, 2007, at 12:46 PM, Oleg Drokin wrote:
Hello!
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 cases.
Bye,
Oleg
<nlmblock-leak_fix-1.diff>
> @@ -502,15 +509,19 @@
> }
> else {
> nlmsvc_unlink_block(block);
> - return nlm_granted;
> + ret = nlm_granted;
> + goto out;
> }
Do we really need to release block with 'goto out' here?
nlmsvc_unlink_block() is doing it internally in the following
call chain:
nlmsvc_unlink_block
nlmsvc_remove_block
nlmsvc_release_block
And on a last reference 'block' will be freed in nlmsvc_free_block.
Are you sure we have an extra reference here and won't go through
nlmsvc_free_block?
Felix
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html