Received: by 10.223.176.46 with SMTP id f43csp3484530wra; Mon, 22 Jan 2018 15:22:29 -0800 (PST) X-Google-Smtp-Source: AH8x224Rd914n8oQxVYCdR/MqzFP9kNXAOKgvr4uJ+WhbQDrA8GN6j1H2uh6E+DVck6Cu7Gy3ROl X-Received: by 10.107.136.86 with SMTP id k83mr920138iod.128.1516663349225; Mon, 22 Jan 2018 15:22:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516663349; cv=none; d=google.com; s=arc-20160816; b=AJs1WopPiCnCWP11TbWlZaMMKFY0EnE9Cs4InCSWcXpqwz4kI9CdK/F2yA7xWJ0Of/ TXbY/LmWOF/mIqO5dbIAjF32Da+6jkkhtG2sTJbvwQ7wOzAP8VPThaPGHwflOXhPPm+U X8cE0CNeL3RfdNrOY4G7GKgDxavhP5gfO+MT3TwY85ijr+VWJl1dI9R9VAZqJ00h00KZ M9e3On44CzOE1MhYWaJet5jfL5ZZAE4LiqwDM27MfzRVU8/Sg5+RafzQJuvoSocuAAM/ jm9xZXASdXWClvDwLZifeVUoSRQou8Bi3A3Go4f0tjFUUdLZnUSYXWYAaCaWeZURYgR/ Q8QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=4A+Oo1+8PS31TkkybQswXHjAT/0oM9ydDIbI6ll0VEQ=; b=u2FcplvmLFYRB764p39g7z6FgjKIeVBFuelXgyrY3U5xwKSNZSSG+XbjFi2gsbw0hr 6p3c5gj4WWSGlAMNxFcJRd0k/cC0o501x0YbKZpH9PppLJ996ksYTj/sHmGXZJukKnX/ /zPeqkhVIS3TuiAgmtDOuQCfsZo/HCGwGbCpRNLklbbcnzLVfHwVamYDakiu0YdTggxJ scFjj21GqhTPAl6bU0hBi7c9yibg3HWVFL2E3HWo3eg4E/NFjzF6b6rO1M/V95cjJXqk oWzoMG5rAZPg9JPOkMRT+9UFl+zlUv0gZEqdpQUoe6A5JDHJaefc7QeHV3AAoR2KQ1Zj TuFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@me.com header.s=04042017 header.b=XMauOi5W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=me.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g24si9657517iob.234.2018.01.22.15.22.16; Mon, 22 Jan 2018 15:22:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@me.com header.s=04042017 header.b=XMauOi5W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=me.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751253AbeAVXVr (ORCPT + 99 others); Mon, 22 Jan 2018 18:21:47 -0500 Received: from mr28p48im-tydg10113601.me.com ([17.110.88.45]:29968 "EHLO mr28p48im-tydg10113601.me.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751049AbeAVXVo (ORCPT ); Mon, 22 Jan 2018 18:21:44 -0500 Received: from process-dkim-sign-daemon.mr28p48im-tydg10113601.me.com by mr28p48im-tydg10113601.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0P2Z00F00CMC9S00@mr28p48im-tydg10113601.me.com> for linux-kernel@vger.kernel.org; Mon, 22 Jan 2018 23:21:43 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=04042017; t=1516663303; bh=4A+Oo1+8PS31TkkybQswXHjAT/0oM9ydDIbI6ll0VEQ=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=XMauOi5WcSHi6MUxc9NgbXLjIAC1hBKJBW3+3wpp1O3/iUDGFzMuaV7tDBXx1zKJQ XyHlLTH1FU8RfiBQ5loNmxqRHecPqsxbdfzi6r00OXLsc5XeN9KxczkxGB56+n7JnG 1BYDEg1U3Khv0ejfN+AuU0af8+EhRI18YM3Xl2q2tnJPzyFRpNq26fdJsaGk9BKne2 xaFaTi1+TOAe5v+pTD8FiRa8Rki1qx/Vs7T9iGAlCUnCvU1+Si3/Tk1HMTXyCmf77j z+vEYAl0lh3fXIElNNxLfKXhfr2DOMYJIgBUKg/zqMHCutmg3Jo3t017m5YEg8JuKp k0uprVxTFt5ew== Received: from icloud.com ([127.0.0.1]) by mr28p48im-tydg10113601.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0P2Z009WTCW0AQ00@mr28p48im-tydg10113601.me.com>; Mon, 22 Jan 2018 23:21:43 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-22_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1801220311 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH] cgroup: remove incorrect check on the return value of css_alloc From: Xiongwei Song In-reply-to: <20180122155559.GC1096857@devbig577.frc2.facebook.com> Date: Tue, 23 Jan 2018 07:21:36 +0800 Cc: guro@fb.com, longman@redhat.com, davem@davemloft.net, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, sxwjean@gmail.com Content-transfer-encoding: 7bit Message-id: <352F18C3-8039-4636-84EB-58FE457CA455@me.com> References: <20180122133851.19772-1-sxwjean@me.com> <20180122155559.GC1096857@devbig577.frc2.facebook.com> To: Tejun Heo X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 22 Jan 2018, at 11:55 PM, Tejun Heo 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