lkml.org 
[lkml]   [2002]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RFC] sigurg/sigio cleanup for 2.5.31
* 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/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.132 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site