2009-07-23 14:45:45

by Stefan Bader

[permalink] [raw]
Subject: [PATCH] jfs: Fix early release of acl in jfs_get_acl

Commit 073aaa1b142461d91f83da66db1184d7c1b1edea "helpers for acl
caching + switch to those" introduced new helper functions for
acl handling but seems to have introduced a regression for jfs as the
acl is released before returning it to the caller, instead of
leaving this for the caller to do.
This causes the acl object to be used after freeing it, leading
to kernel panics in completely different places.

Thanks to Christophe Dumez for reporting and bisecting into this.

Reported-by: Christophe Dumez <[email protected]>
Tested-by: Christophe Dumez <[email protected]>
Signed-off-by: Stefan Bader <[email protected]>
Acked-by: Andy Whitcroft <[email protected]>
---
fs/jfs/acl.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)


Attachments:
0001-jfs-Fix-early-release-of-acl-in-jfs_get_acl.patch (1.40 kB)

2009-07-23 16:16:39

by Dave Kleikamp

[permalink] [raw]
Subject: Re: [PATCH] jfs: Fix early release of acl in jfs_get_acl

On Thu, 2009-07-23 at 16:45 +0200, Stefan Bader wrote:
> Commit 073aaa1b142461d91f83da66db1184d7c1b1edea "helpers for acl
> caching + switch to those" introduced new helper functions for
> acl handling but seems to have introduced a regression for jfs as the
> acl is released before returning it to the caller, instead of
> leaving this for the caller to do.
> This causes the acl object to be used after freeing it, leading
> to kernel panics in completely different places.

This looks good. Thanks much! I'll get it upstream as soon as
possible.

> Thanks to Christophe Dumez for reporting and bisecting into this.
>
> Reported-by: Christophe Dumez <[email protected]>
> Tested-by: Christophe Dumez <[email protected]>
> Signed-off-by: Stefan Bader <[email protected]>
> Acked-by: Andy Whitcroft <[email protected]>
> ---
> fs/jfs/acl.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)

Thanks,
Shaggy
--
David Kleikamp
IBM Linux Technology Center