lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160823144812.GA2088@redhat.com>
Date:   Tue, 23 Aug 2016 16:48:13 +0200
From:   Oleg Nesterov <oleg@...hat.com>
To:     Mateusz Guzik <mguzik@...hat.com>
Cc:     Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
        Richard Guy Briggs <rgb@...hat.com>, ebiederm@...ssion.com,
        sgrubb@...hat.com, pmoore@...hat.com, eparis@...hat.com,
        luto@...capital.net, linux-audit@...hat.com,
        linux-kernel@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCHv2 1/2] mm: introduce get_task_exe_file

On 08/23, Mateusz Guzik wrote:
>
> +struct file *get_task_exe_file(struct task_struct *task)
> +{
> +	struct file *exe_file = NULL;
> +	struct mm_struct *mm;
> +
> +	task_lock(task);
> +	mm = task->mm;
> +	if (mm) {
> +		if (!(task->flags & PF_KTHREAD))
> +			exe_file = get_mm_exe_file(mm);
> +	}
> +	task_unlock(task);
> +	return exe_file;
> +}

I can't believe I am going to comment the coding style but I can't resist ;)

	if (mm && !(task->flags & PF_KTHREAD)))
		exe_file = get_mm_exe_file(mm);

looks a bit simpler to me. But this is purely cosmetic and subjective,
both patches look good to me.

Acked-by: Oleg Nesterov <oleg@...hat.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ