Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp314266ybl; Fri, 23 Aug 2019 01:02:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqybubyc+gX5Y4afQ6tWeCFTVuFmJn2bhbGZwwCrwvE4RFTbELgGBeLAiFFaTk9BtWOzf3J5 X-Received: by 2002:aa7:8202:: with SMTP id k2mr3808090pfi.31.1566547358016; Fri, 23 Aug 2019 01:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566547358; cv=none; d=google.com; s=arc-20160816; b=I5ee20CK7KSep/8TnUDv/Zys/TNL2Vv4ynQAt758xZboZBYse29uT4XWcJdSZHD8v5 HsJrWQRhl5sZgiab1+wMEc7+/R4UR4GNfXZnh2D4lJjEmKLD7joTgKiBd6t2YwssBeCw DOECID0hHxDzXmtxNdhXsBL52uTOHm8D814pNrX6Fjtj3akWF3HJFWg8QHwqFcyNlZmF KKjSRvI90rMBP65eCqgIz5qnKeLrWOXn6twtqsCqGcH+HQnlwXMJIVIJxzWEZF1g+HMU V4w/x3P2G6NFYI44X7IKwBDBuh93cCw82Qo6nE1g4JqF6VYFRMw3SHMeeAgTlDc9nsFr jwOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=MSQVKqvUekrPyA/P2uD2B2ARtxn65dvc4cUxSBurPkY=; b=HuwTqExUEGHBWLNkH7Lcgmd5PyC75flTaA6EJsEpM2rEJRW6HOsErJ2Bqv8/u+2Iul tqtXflQSjXGq88SItDaUJZCJ68C8/hLx8ymPVdCWbxAa5Ga0cyWNGNTBXeF1T7/Ycy1T S6foWaH/vRa8M6UJ3w657tH1FyY5W2fVbZClQza/ednZh57WC02Me0SMx1UlAmFbGyC0 i307bMmYE5MYBsnocNamzt8qCFhLdNCgvt2Jf0stTzQ8wgkAiq68ZU7/4be+EKdyok8L JHZSVk3opjFd6HAlnP2TzsnvK975W1SGK4vGP0dRhlUqkLyZZPBLfrRpcD3lIyr7EUxk G29Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o19si1361190pgv.497.2019.08.23.01.02.22; Fri, 23 Aug 2019 01:02:38 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392808AbfHVUMD (ORCPT + 99 others); Thu, 22 Aug 2019 16:12:03 -0400 Received: from mx2.suse.de ([195.135.220.15]:50104 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729746AbfHVUMD (ORCPT ); Thu, 22 Aug 2019 16:12:03 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id BC096AE86; Thu, 22 Aug 2019 20:12:01 +0000 (UTC) Date: Thu, 22 Aug 2019 22:12:00 +0200 From: Michal Hocko To: Yizhuo Zhai Cc: Chengyu Song , Zhiyun Qian , Johannes Weiner , Vladimir Davydov , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/memcg: return value of the function mem_cgroup_from_css() is not checked Message-ID: <20190822201200.GP12785@dhcp22.suse.cz> References: <20190822062210.18649-1-yzhai003@ucr.edu> <20190822070550.GA12785@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 22-08-19 13:07:17, Yizhuo Zhai wrote: > This will happen if variable "wb->memcg_css" is NULL. This case is reported > by our analysis tool. Does your tool report the particular call path and conditions when that happen? Or is it just a "it mignt happen" kinda thing? > Since the function mem_cgroup_wb_domain() is visible to the global, we > cannot control caller's behavior. I am sorry but I do not understand what is this supposed to mean. -- Michal Hocko SUSE Labs