Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp874503pxv; Thu, 1 Jul 2021 11:14:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZ6KnlnT9OLAbn8DkQJdNWnviNnE18IeJAColWx13s7A08j1FfL+qAsJBiHb+SB8cB9aV7 X-Received: by 2002:a17:906:d83:: with SMTP id m3mr1291022eji.63.1625163255650; Thu, 01 Jul 2021 11:14:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625163255; cv=none; d=google.com; s=arc-20160816; b=wOJbZKEwk+NojskFNhChcmFmbdFqG7JIhdwGHfSrleZUSlMcq/1VDt9YY88EuwLbD9 gF+pZRV+UJgdcmVfo+9Q8V8g+Hh5/cVEO/Bw62fLg4lNf7ko8ip7TezJcIRZ5CaTzcHO y7Uao2Of6GuqsPAWUrdImcGk5svy2ymm03/opNDovi1Ad8+Kg2+36kUd8gcOgPqBeLZ/ Tjas43c+V0Pqgc+LOJ/zlnpGwzNIANaNGqXvNFItlk8/PNv/Uc2FGdD23ZQ5GjrztK2s uvmqr9BvWFACk0FjdcupEdZBTfmpd+Au3WsfoZEPJXS/MgIJw61Bn1UywKNLZM5v3Srm Spmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=zOO1+0WZljv/AFyqF126eT50oz5Lvb1Fmpc9XZ2/30w=; b=GJeEkG+B6nTcdy+NCXyXineoKCaJtTFW4RMse3LM8b7T44ZpUht0zJeo+qrpJLDt6z cRt8JBgEgqscmeMqMMllwwBv+olkdIZS8kJhe5UG9RjmMsHyiuIDAUj3fAH7snmZbmsX SWBFikKCdivohEZiw2mWzAih29qOG+hcAtAAibidcnbmw5X18bYaOSEoARsSy7q/Rfb8 SMERLFIN6oGoGaC8UhEEuhRdinC7q9GQH9ozQpD5VS+ST8podNrdXE535kCIzJJLXFRn KPUApfdQxUje7cy1mFUkcIS83Yqs9likjPMZgmGNenTVnL/rNZHnsSY8IPSoavu6UVfB cucg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ia17si718721ejc.157.2021.07.01.11.13.51; Thu, 01 Jul 2021 11:14:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233800AbhGASOy (ORCPT + 99 others); Thu, 1 Jul 2021 14:14:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:36982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232717AbhGASOy (ORCPT ); Thu, 1 Jul 2021 14:14:54 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 028C461285; Thu, 1 Jul 2021 18:12:22 +0000 (UTC) Date: Thu, 1 Jul 2021 14:12:21 -0400 From: Steven Rostedt To: Paul Burton Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Joel Fernandes , stable@vger.kernel.org Subject: Re: [PATCH v2 2/2] tracing: Resize tgid_map to pid_max, not PID_MAX_DEFAULT Message-ID: <20210701141221.1d0b1fe0@oasis.local.home> In-Reply-To: <20210701172407.889626-2-paulburton@google.com> References: <20210701095525.400839d3@oasis.local.home> <20210701172407.889626-1-paulburton@google.com> <20210701172407.889626-2-paulburton@google.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Jul 2021 10:24:07 -0700 Paul Burton wrote: > +static int *trace_find_tgid_ptr(int pid) > +{ > + // Pairs with the smp_store_release in set_tracer_flag() to ensure that > + // if we observe a non-NULL tgid_map then we also observe the correct > + // tgid_map_max. BTW, it's against the Linux kernel coding style to use // for comments. I can take this patch, but I need to change this to: /* * Pairs with the smp_store_release in set_tracer_flag() to ensure that * if we observe a non-NULL tgid_map then we also observe the correct * tgid_map_max. */ Same with the other comments. Please follow coding style that can be found in: Documentation/process/coding-style.rst And see section 8 on Commenting. Thanks, -- Steve > + int *map = smp_load_acquire(&tgid_map); > + > + if (unlikely(!map || pid > tgid_map_max)) > + return NULL; > + > + return &map[pid]; > +} > +