[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <27037.1334672580@redhat.com>
Date: Tue, 17 Apr 2012 15:23:00 +0100
From: David Howells <dhowells@...hat.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: dhowells@...hat.com, Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Alexander Gordeev <agordeev@...hat.com>,
Chris Zankel <chris@...kel.net>,
David Smith <dsmith@...hat.com>,
"Frank Ch. Eigler" <fche@...hat.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Larry Woodman <lwoodman@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 3/3] cred: change keyctl_session_to_parent() to use task_work_add()
Oleg Nesterov <oleg@...hat.com> wrote:
> - int ret;
> + struct cred *cred;
> + int err;
There's no need to change ret to be err. It produces slightly less churn if
you don't.
> + err = -ENOMEM;
> + newwork = kmalloc(sizeof(struct task_work), GFP_KERNEL);
> + if (!newwork)
> + goto error_keyring;
This passes unnecessarily through kfree(newwork). Please add a new goto label
and go to that.
> -/*
> - * Replace a process's session keyring on behalf of one of its children when
> - * the target process is about to resume userspace execution.
> - */
Please don't delete the banner comment saying what the function does.
> -void key_replace_session_keyring(void)
> +void key_change_session_keyring(struct task_work *twork)
There's no particular need to change the name of the function.
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists