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]
Date:   Mon, 22 Jan 2018 07:55:59 -0800
From:   Tejun Heo <tj@...nel.org>
To:     Xiongwei Song <sxwjean@...com>
Cc:     guro@...com, longman@...hat.com, davem@...emloft.net,
        akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
        sxwjean@...il.com
Subject: Re: [PATCH] cgroup: remove incorrect check on the return value of
 css_alloc

Hello,

On Mon, Jan 22, 2018 at 09:38:51PM +0800, Xiongwei Song wrote:
> The function css_alloc never return NULL, it may return normal pointer or

It's a calling a controller implemented method.  I'd much rather keep
the extra protection.

> error codes that made by ERR_PTR, so !css is always false, we need use
> IS_ERR to check it, and if this is true, we should use ERR_CAST handle it.

It's of the same type.  Why would it need casting?

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ