Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp348659imm; Tue, 22 May 2018 20:36:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZppY8jW2MEcu9BMAJvTfuHXEvlqcwjMFz7rmi2Jeu/JWmWIZuJLLxY6sUc3Y7ZPfJRrjHVc X-Received: by 2002:a17:902:369:: with SMTP id 96-v6mr1221817pld.64.1527046583120; Tue, 22 May 2018 20:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527046583; cv=none; d=google.com; s=arc-20160816; b=IoersDLi47WySuLo1tCO03X3PgLKaMcdIz7LH9BF6dZtlWAtM5jKlMMyvYZzCdCcVO 6I/T17wDlIYIE6YHzc3PFjExi2AzSg9rjCPDmutrhwKhEe8aUq+JZsVNNXAbVUMmqXZ6 qNwW+VHYgu7BiN09Lb2FB/7PyNnFWbmqW7cTIALd8cIc7ocy+2HkoDZHvYYV6o8fxpu2 3uPJs6aJ6EVbPIEIRZgY4hgZTB/8p2de+k3GBiwKkelWvHe66Sd6kkjDaJE2r4M2qoQO CCRAhvN8XBki59wWqMsGTLgqJ/uVcZmu1V+0siHnh7JhT8IOX3I2rLkofr+QclUF7O26 kVoQ== 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:dkim-signature:arc-authentication-results; bh=j5adTP+z8Uog94l9IbCZ1avIPlhL7kGo0u+Bkyvsc2E=; b=E+PWHTtsTv/C49SX8A8jQ8l3zNuuEoMacm0BVGGaTzEwfsLS7AHs654Imb7+1i0yWO loJhRmfa+dYQtt1TxJo+aNcim1iVieEjqPBVd5Q/sKzlGadLNfBUMGm7cwWDgDAIzgTc 11zJLXx2ojCV/MUCx9RbRclVCOmiwXPMVyPcmKH1xceGPg1969DnWnL2i3l48wbUd5al jCQhWdmrMBOCiExu2IkH2+vJnCnv5I4UYiI0V50nlbDKEcLrsdn34L2HgdKyEmUk+hrM Lp155PTmVoY28THW7i5rjiQ9VqKVxBHZjUGMoU+bUo8d+6ITkVi8cuV0JPaNhVGsJZFQ y3Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eSkgzyem; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t23-v6si19090962plo.508.2018.05.22.20.36.08; Tue, 22 May 2018 20:36:23 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eSkgzyem; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753899AbeEWDf5 (ORCPT + 99 others); Tue, 22 May 2018 23:35:57 -0400 Received: from mail-pg0-f43.google.com ([74.125.83.43]:34166 "EHLO mail-pg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753165AbeEWDfz (ORCPT ); Tue, 22 May 2018 23:35:55 -0400 Received: by mail-pg0-f43.google.com with SMTP id k2-v6so8783090pgc.1; Tue, 22 May 2018 20:35:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=j5adTP+z8Uog94l9IbCZ1avIPlhL7kGo0u+Bkyvsc2E=; b=eSkgzyemPMJ27u/Vh4i6H2YmfF1HMgptGrAEJZQ92BPuIKdHE2MSQBOCRRQeoop8MB h3LVnDmb5N0W0CvP+PD88tnG7Niz5fCoa8O6g1bGacuT693KPUYT8YLG3QGE8r/qPozw V7gABs6k5rLGUeIiTCl7+oHin7EaCY3hVGTiktT4i70bm/J8CAXptNNjt1Lc7PWH7M3s dZBaDFd5a2LKJdZPvNRMGxHXkNNJBW7q+jMP2cM/R9KjmjlD8me/6BTxl2BWez8+WPQI Cdq60UQi8HKZZF4GGeHxElJ57fUG48I6o8yPnLxjBktY7PV6wZ0BJbrbP7fqK+ZYRPMP N6TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=j5adTP+z8Uog94l9IbCZ1avIPlhL7kGo0u+Bkyvsc2E=; b=jWtjTd7HMJu6h+l2FY6bUWsCjbtUsDjJOJkLq4IIZEcT3sqmRsIOZ32g4caCCVNzmo qoXOVqbhXXSCpanE3GpiUamKWbMppodQw1zzjde1Q/H4zuwyT1C0wpGwsSyNVLMChhGO cBx5IQhjP4FH872bsdTLiG7a9fdVeFkZlsOlRs4OZ073WURvo8n1oCtOwNZJiSMcZtka xe2nHhKEEIwT9AVDYt/2NkYbshJ4sZDhuStLEIwNlL+hM7dGzmBYfa0zuu9WdzmwvGnH mbWpDn7zH3U2lSGSAJQ0Tta02qap1cG2c2WlYkiUb7U3eoU0f+UZMxgQ0BC9aKBnwTXP C7Ug== X-Gm-Message-State: ALKqPwf9brjX/eVGCDYRuHFTE5vbQNnxTwXyvxARoQCkuKUe6mMWoneX yeJUBo90c0GQwOTo6Hq8FQ4= X-Received: by 2002:a65:4484:: with SMTP id l4-v6mr929811pgq.103.1527046554611; Tue, 22 May 2018 20:35:54 -0700 (PDT) Received: from ast-mbp ([2620:10d:c090:180::1:8e6f]) by smtp.gmail.com with ESMTPSA id s16-v6sm27968443pfm.114.2018.05.22.20.35.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 May 2018 20:35:53 -0700 (PDT) Date: Tue, 22 May 2018 20:35:51 -0700 From: Alexei Starovoitov To: Y Song Cc: Alban Crequy , netdev , linux-kernel@vger.kernel.org, containers@lists.linux-foundation.org, cgroups@vger.kernel.org, Alban Crequy , tj@kernel.org Subject: Re: [PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino Message-ID: <20180523033550.z3tqo4lhd3zrmtdu@ast-mbp> References: <20180513173318.21680-1-alban@kinvolk.io> <20180521162609.lpdrnozowmzdn57m@ast-mbp.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 22, 2018 at 08:33:24PM -0700, Y Song wrote: > + struct cgroup *cgrp = task_dfl_cgroup(current); > + if (!cgrp) > + return -EINVAL; why this check is needed?