From: Xiongwei Song <sxwjean@me.com>
To: Tejun Heo <tj@kernel.org>
Cc: guro@fb.com, longman@redhat.com, davem@davemloft.net,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
sxwjean@gmail.com
Subject: Re: [PATCH] cgroup: remove incorrect check on the return value of css_alloc
Date: Tue, 23 Jan 2018 07:21:36 +0800 [thread overview]
Message-ID: <352F18C3-8039-4636-84EB-58FE457CA455@me.com> (raw)
In-Reply-To: <20180122155559.GC1096857@devbig577.frc2.facebook.com>
> On 22 Jan 2018, at 11:55 PM, Tejun Heo <tj@kernel.org> wrote:
>
> 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?
Okay, Thanks for your comment.
Apologies for the noise.
Thanks
Xiongwei
>
> Thanks.
>
> --
> tejun
prev parent reply other threads:[~2018-01-22 23:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 13:38 Xiongwei Song
2018-01-22 15:55 ` Tejun Heo
2018-01-22 23:21 ` Xiongwei Song [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=352F18C3-8039-4636-84EB-58FE457CA455@me.com \
--to=sxwjean@me.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=guro@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=sxwjean@gmail.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®