Messages in this thread Patch in this message | | | Subject | Re: [PATCH 1/1] SELinux: memory leak in selinux_sb_copy_data() | From | Gerald Schaefer <> | Date | Fri, 17 Jun 2005 17:47:29 +0200 |
| |
On Fri, 2005-06-17 at 15:18 +0200, Gerald Schaefer wrote: > [PATCH 1/1] SELinux: memory leak in selinux_sb_copy_data() > There is a memory leak during mount when SELinux is active and mount options > are specified. > > Signed-off-by: Gerald Schaefer <geraldsc@de.ibm.com> > --- > > diff -pruN linux-2.6-git/security/selinux/hooks.c linux-2.6-git_xxx/security/selinux/hooks.c > --- linux-2.6-git/security/selinux/hooks.c 2005-06-16 20:01:03.000000000 +0200 > +++ linux-2.6-git_xxx/security/selinux/hooks.c 2005-06-17 14:38:08.000000000 +0200 > @@ -1945,6 +1945,7 @@ static int selinux_sb_copy_data(struct f > } while (*in_end++); > > copy_page(in_save, nosec_save); > + free_page((unsigned long)nosec); > out: > return rc; > } >
Sorry, there was a whitespace accident and the above patch would not apply. Here is the fixed version:
diff -pruN linux-2.6-git/security/selinux/hooks.c linux-2.6-git_xxx/security/selinux/hooks.c --- linux-2.6-git/security/selinux/hooks.c 2005-06-16 20:01:03.000000000 +0200 +++ linux-2.6-git_xxx/security/selinux/hooks.c 2005-06-17 14:38:08.000000000 +0200 @@ -1945,6 +1945,7 @@ static int selinux_sb_copy_data(struct f } while (*in_end++); copy_page(in_save, nosec_save); + free_page((unsigned long)nosec); out: return rc; }
- 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/
| |