Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1799359lqo; Sun, 12 May 2024 20:26:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXRE38brZbOqRI+B1w5VfRTvWWEf8LNlmBSIOUyTTCdaVMOHUS8AY+J7sE0R5ylt3CAgI0AfD65CKl00hPTc/NeNlaxcschlkpr3C/d2Q== X-Google-Smtp-Source: AGHT+IGKMjne5gNReZrcxcOq4gRCxgv1qRVMZHYtujRBl/NV0n8lL5GG+xHXggNqLQtGheX4jYCJ X-Received: by 2002:a17:902:8e86:b0:1dc:a605:5435 with SMTP id d9443c01a7336-1ef43e2530bmr73592595ad.31.1715570782843; Sun, 12 May 2024 20:26:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715570782; cv=pass; d=google.com; s=arc-20160816; b=TYSBteuex0fbpLDsyQiZOaDVxV7kkhIVqXajE/57KU1Na2Ztshx1pEr0sKdH+i4D9a rfEFoRhGhZBwxzwukI+pxBMHGLgjjpumAlOyURm1nmVPBYS1tQZn0siUA792DNGEN8Ze AzcER7ZgPfV5FFY2nZ21I+qm4tBNkr0YrR6QreoWmRNbH7Nw+mtAIqklgSSsHHTJfsdF IXhzQ3xkzp8VXwY52fSeoByFWC9LvUxRtSV7IRkOdn/Gw/sduEjPm0917OAIuUmokhp6 hcPPK9kL8/ZRVpgmZRUxeSfh9GdKW8iSbmRMa92yIK2SqXBdU9aSnnsoRqfBRaGzeqza SCwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:dkim-signature:message-id; bh=R5SPCLBdMmPm9x+0WvDC9Xwe8BqG9DYDcZU8TqCuQFw=; fh=7Je71orTmotSgF2BTNh/Cnaib6+fP3ojxF31GEJ1erk=; b=LrWbNDnsB/Xk7JbiZMejh9UK4h62LjjqJ0ETu96aXjMqR3JXHm8fNaxAiljDqV35Sw mbJHX5YU0JaY40/Dmy7frD8RrBK3mqNiGXww6M5JLCXnoAi6gMZsDvi54ZqsU0jR2eyQ rWlBKDt0KHsgs62HEPJhPbjfvEp71h3q24oQa1v5hwSEO6wjUgjXjK57jlhbaiAadi4n UfjlQ5sfK0/kyOOhZ4/LYtokXCb4WquX2XtT3rYFfUiA/SQ+CVLDaUuCI6rbxpu1hpk4 4wGq41UsZLp3nbgN04Fx/DTrh42WESKpRbt6PZJXZd9MwcZUGvwMaW+SLYkQyOOApvYN C2ew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ZkBxs0GF; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-177127-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177127-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0c038b52si79455085ad.352.2024.05.12.20.26.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 20:26:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177127-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ZkBxs0GF; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-177127-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177127-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 86221281460 for ; Mon, 13 May 2024 03:26:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED952145B16; Mon, 13 May 2024 03:26:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ZkBxs0GF" Received: from out-187.mta0.migadu.com (out-187.mta0.migadu.com [91.218.175.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 302291C6AF; Mon, 13 May 2024 03:26:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715570772; cv=none; b=kFCFT3ecS/n/iptPFpHC+JytFGMwnUpwfiMSy1+3CCeIci/eYzLpAZM3X8CfM5a2Ze8O1d+pKtAe6ey0pP559cFqZY754uoTflXsU1dp1fJsRJJL0Fx22LQN248jN0UbXBkDlTsD7x2eU4GYEw3ZlJB7QYac+nZBCbey888HfYY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715570772; c=relaxed/simple; bh=WJOoQomm8SXfTN6sfPBVf9l1CpvTu8SVl1505d7YD1k=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sp89FVXFxqcCvTQMBrsBacYHbzMGE8g5MtQI2KDA/97fs+mtgJyo8ZXOpUsD7FWfyQYq2a1CejU/O3qu65eVHeWtlePrm3luK8HhMM7ny0B4K286yosNN8urSP7OPAcex3tNaESAj6/a9bFxcJl65JHF1jqddcI6K9DeOTP4BQo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ZkBxs0GF; arc=none smtp.client-ip=91.218.175.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1715570766; h=from:from: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=R5SPCLBdMmPm9x+0WvDC9Xwe8BqG9DYDcZU8TqCuQFw=; b=ZkBxs0GF88gg721lGUEhujUhTssE2xljMxlpWlVTdoeRomLgnIgifTBddf4mc6DuyqcUDB LOhi94bqMxOnb2OA5/PtUVjM/iztYySR78IR7C3rFABwA6sd+POCa+u0xajGu/A4M76c/8 eu91iM4uS1OcVYb0mm0pei+nbr0ZgN8= Date: Mon, 13 May 2024 11:25:38 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH] eventfs: Directly return NULL to avoid null point dereferenced To: Markus Elfring , Hao Ge , linux-trace-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Masami Hiramatsu , Mathieu Desnoyers , Steven Rostedt Cc: LKML References: <20240511024255.34767-1-hao.ge@linux.dev> <34c7ffeb-1fe9-4e89-a7b6-c6a8be17df90@web.de> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Hao Ge In-Reply-To: <34c7ffeb-1fe9-4e89-a7b6-c6a8be17df90@web.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Hi Markus Thanks for your review. 在 5/13/24 01:12, Markus Elfring 写道: >> When the condition ei->is_free holds,we return NULL directly to >> avoid update_events_attr to use NULL point about ei. > * Please avoid typos in the summary phrase and the commit message. > > * Would you like to use an imperative wording for an improved change description? > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.9-rc7#n94 > > > … OK, I'll study it, >> +++ b/fs/tracefs/event_inode.c >> @@ -346,8 +346,7 @@ static struct eventfs_inode *eventfs_find_events(struct dentry *dentry) >> * doesn't matter. >> */ >> if (ei->is_freed) { >> - ei = NULL; >> - break; >> + return NULL; >> } > … > > How do you think about to omit curly brackets here? You are right, I will make changes to it in future versions > > Regards, > Markus Best Regards Hao