Re: [PATCH][RFC] sigurg/sigio cleanup for 2.5.31

Chris Wright (chris@wirex.com)
Fri, 16 Aug 2002 00:06:29 -0700


* James Morris (jmorris@intercode.com.au) wrote:
> @@ -95,15 +96,14 @@
> prev = &odn->dn_next;
> }
>
> - error = security_ops->file_set_fowner(filp);
> + lock_kernel();
> + error = f_setown(filp, current->pid);
> + unlock_kernel();
> if (error) {
> write_unlock(&dn_lock);
> return error;
> }

This propagates a leak which John Levon found in current mainline. Needs a
kmem_cache_free(dn_cache, dn) before returning. You may consider goto
for common unlock/return path. Is BKL best way to protect f_owner?

cheers,
-chris

-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net
-
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/