Hello!

On Jan 28, 2008, at 3:17 PM, Chuck Lever wrote:
@@ -501,25 +501,29 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file,
                        block, block->b_flags, block->b_fl);
                if (block->b_flags & B_TIMED_OUT) {
                        nlmsvc_unlink_block(block);
-                       return nlm_lck_denied;
+                       ret = nlm_lck_denied;
+                       goto out;
Aren't we also leaking the memory pointed to by block->b_fl that nlmsvc_testlock just allocated?

When last reference on a block goes away, nlmsvc_free_block is called that frees block->b_fl, so we are good here, I think.

nlmsvc_unlink_block() already invokes nlmsvc_release_block() in some cases. So now sometimes we have a double release.

It in fact always calls release_block, but this is not a free function, this is sort of refput function instead. We got one reference on a block (from lookup_block/create_block) that we release after out label, and one that i consumed by a list membership. When we unlink a block from a list, we drop that reference too.

Bye,
    Oleg
-
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to