Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286064
b: refs/heads/master
c: 4043cde
h: refs/heads/master
v: v3
  • Loading branch information
Eric Paris authored and Al Viro committed Jan 17, 2012
1 parent 873641b commit 4c1a503
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 633b45454503489209b0d9a45f9e3cd1b852c614
refs/heads/master: 4043cde8ecf7f7d880eb1133c201a3d392fd68c3
28 changes: 13 additions & 15 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,19 @@ static int do_getname(const char __user *filename, char *page)

static char *getname_flags(const char __user *filename, int flags, int *empty)
{
char *tmp, *result;

result = ERR_PTR(-ENOMEM);
tmp = __getname();
if (tmp) {
int retval = do_getname(filename, tmp);

result = tmp;
if (retval < 0) {
if (retval == -ENOENT && empty)
*empty = 1;
if (retval != -ENOENT || !(flags & LOOKUP_EMPTY)) {
__putname(tmp);
result = ERR_PTR(retval);
}
char *result = __getname();
int retval;

if (!result)
return ERR_PTR(-ENOMEM);

retval = do_getname(filename, result);
if (retval < 0) {
if (retval == -ENOENT && empty)
*empty = 1;
if (retval != -ENOENT || !(flags & LOOKUP_EMPTY)) {
__putname(result);
return ERR_PTR(retval);
}
}
audit_getname(result);
Expand Down
3 changes: 0 additions & 3 deletions trunk/kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1913,9 +1913,6 @@ void __audit_getname(const char *name)
struct audit_context *context = current->audit_context;
struct audit_names *n;

if (IS_ERR(name) || !name)
return;

if (!context->in_syscall) {
#if AUDIT_DEBUG == 2
printk(KERN_ERR "%s:%d(:%d): ignoring getname(%p)\n",
Expand Down

0 comments on commit 4c1a503

Please sign in to comment.