From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BC0BC83F06 for ; Fri, 25 Aug 2023 22:58:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230131AbjHYW5v (ORCPT ); Fri, 25 Aug 2023 18:57:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231189AbjHYW5p (ORCPT ); Fri, 25 Aug 2023 18:57:45 -0400 Received: from out-253.mta1.migadu.com (out-253.mta1.migadu.com [IPv6:2001:41d0:203:375::fd]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A99B1FC3; Fri, 25 Aug 2023 15:57:42 -0700 (PDT) Message-ID: <50453723-813b-4d2b-2d83-3e2c57355230@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1693004260; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pNM3SuBZFH5nvdXhOSjFkO0GstPDo1DaGZ2GX7IY/7s=; b=VUWmpO7iqHEbNeCModTEKBilPXWZpFRE4jk7GAug/3XZuZNp+4uqmvxxcx+S/udPnXEru+ AjORqhGJmxt1smumGmBfqI0ftgzoXOqdPR1BmMJCHu4WT/BvucKeSgq6yQ+sofetI7gUS9 TWnH+2nlVwMP8La98vvEg7yl4W58DZs= Date: Fri, 25 Aug 2023 15:57:36 -0700 MIME-Version: 1.0 Reply-To: yonghong.song@linux.dev Subject: Re: [PATCH 5/6] bpf: task_group_seq_get_next: simplify the "next tid" logic Content-Language: en-US To: Oleg Nesterov , Andrew Morton , Yonghong Song Cc: "Eric W. Biederman" , Linus Torvalds , Daniel Borkmann , Kui-Feng Lee , Andrii Nakryiko , Martin KaFai Lau , bpf@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230825161954.GA16886@redhat.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yonghong Song In-Reply-To: <20230825161954.GA16886@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/25/23 9:19 AM, Oleg Nesterov wrote: > Kill saved_tid. It looks ugly to update *tid and then restore the > previous value if __task_pid_nr_ns() returns 0. Change this code > to update *tid and common->pid_visiting once before return. > > Signed-off-by: Oleg Nesterov Acked-by: Yonghong Song