Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp860405rdb; Fri, 23 Feb 2024 02:14:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUiOI/2g7PKdh/U17TPrgxMIDCo+Vhq1d3B6F/f1e0W/cXyU2v2tnQMxKBVkRdDmhdDVM7kg0AaHKMMnPP/v5BkaCGrgdwqh/5LEgn+7w== X-Google-Smtp-Source: AGHT+IHHpyvgUKiYLVMI4A5ueLSVyDQ58sI6fg7BBoHpUate9LbF3Ex6THpZXxT+2k/QnF4TWuWd X-Received: by 2002:a17:902:76cc:b0:1db:dcdf:2e2 with SMTP id j12-20020a17090276cc00b001dbdcdf02e2mr1482061plt.23.1708683263274; Fri, 23 Feb 2024 02:14:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708683263; cv=pass; d=google.com; s=arc-20160816; b=oVhWn8LWWZrhc3MJrI/78xZp50aIzkV/OqLOZmagT9ZthKs+iFvGdgxxojE8x33jgW riRX7GRAX3NUqfIYAYEgO/FN9uPsAUcRNZ+sg0Y+Xq87SCPHvVon48TNinxyuYyN3ven h7ux3Miob7TtLB9MhfNbeBs2umIuVBs2t6IqzBv+Ymk7pz/7nKvunMMh9fR182zem9DF Q5/2UlsU0CSG34rUw57yzZqkvG3ennuGFpjP74DRwK2v7MgWhQQQgCe9H1if36vOQ5L8 ifgOrhbv8Godww2AP/ZCPfDeCTy/i7/knurqTWw9itevU2TGMybqrtUjOtVzXygsvfMn aK6w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0/y/rI+M/5qiVISNkhUYwwY4gRxXJKTqbidyY3f2wE0=; fh=8CkJ2XGE8QgPqvI14n5Ubolaur7yWlVzyMnSec7ssjc=; b=iGC+tv2MxJBv9aKwAKnqghNTiqZ2qOzXZIu8pghla41pNTt5Pg9/q87xwiyG40o929 RKlnM6UiphvlKe/ftnkg34UAr2a53F4Q4WknjCoChPqnUJGkFtYT9RbZ6sYbPBNzXIWj GCjOq541T96hAwmNgnV5VxSNCupSLdmsE08jJNd2eZ+ffOdDe4bKU9CjvioyReoaFAx3 t+FDoZs2MGDKra46uX97VoWsnAoCNtPiyvazMarHViPwlZdwksvRZA7ig7GGGS2HIjqN C8PtjPnd8KH4WMPabTF8wy18BimVPs00YaHkq/0D8uHAAFBMMdmNiIJlYmswWf2QGIXb H0Ow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dZjQNpvo; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-78090-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78090-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id y8-20020a17090264c800b001dbf38fee8asi8871913pli.316.2024.02.23.02.14.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 02:14:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78090-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dZjQNpvo; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-78090-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78090-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 88C14B26574 for ; Fri, 23 Feb 2024 09:57:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 891A25CDC0; Fri, 23 Feb 2024 09:57:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dZjQNpvo" Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC9A014F8C for ; Fri, 23 Feb 2024 09:57:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708682262; cv=none; b=AhyBCZmG5FLoEX43CuCVsqKV/3Tco5U8veL8LdyTZuafDkvOag0JQIfxh91mmacXUzpECYfV+87MHd12gCdpnqg/87G3h1857eQ2bAIG9VtMujv5VrWANtYIzXhEu08m4hAvaroPhd9NCCdf1sLUeJfPZWSebh4D+uGP4jPVn20= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708682262; c=relaxed/simple; bh=v0l7HTP7lsDPJCnwCBLsqGp+y2UNKtugLO9N2xkevdU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=M6aH4kIiOwT7azDep4BAnD6wjyfa7s1yvNhkFLz8MdYEeAMF2ZbvjU74JsAeFy1ghHe0WU7Wu9TgF5ozSjSekllPkcMSqi27WRbkGsljsKIOqCWZWJC70oRQSoBKjGxp3KXQABBiRe8YltgrapSccNbMmys1mvbJ+cuH56e0oXE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=dZjQNpvo; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-3394b892691so371429f8f.1 for ; Fri, 23 Feb 2024 01:57:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708682259; x=1709287059; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=0/y/rI+M/5qiVISNkhUYwwY4gRxXJKTqbidyY3f2wE0=; b=dZjQNpvo741c6WI3kkW9Pift5Phe9OtpEs0BgP1BJttEQ8vsMS4HELWROU9kj+sJVj 6rbizHUaiPQ4CGZxIeZyknUF6OUisNqJ9jnaNeraJpQ2roTdpxeNVrjcN7tcWoekUCn2 KUOYr+t3Lufi0bDLX8N5FzsDNV+znnXgmymeyKHE+77fKQGr4BtpnLZh1l19S7BoAryx THPu2RreYc7Kf9gevUAVkzb0e9gapt5iCFOQ31Wo2q+1KQESBOmXoNRA/dLzjamA8NND oaqsnc72jbmp82DT+IrFmcMBwP/mrCTmQGDSSZRSllGT9e4kyek3DQiq4JWr0d7keRs/ bQ1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708682259; x=1709287059; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0/y/rI+M/5qiVISNkhUYwwY4gRxXJKTqbidyY3f2wE0=; b=FMRL8WTHH6RirEUfGp8P6wLMNmalgPymUXajEilcGAMHSHrt9XQryGwwcwWwsVUF6I MFpQypNN10kbOmIRPLiS0ahwjlWHhh26wpbhqaJ16xaWVb9IKzDytEsies0YbMcNt6Ox Sxt8mEGfrT/awLwO0WcGS8n29C67+T3++zwsmMq4ffGus4v11waELbgJ6gKLANhqcCZO gc77Zy19h4TdztJ3RjQKW7X4ouK3nFxzYir0IUPkjdlRZVKwCaFEFYlvDvsDcKHb1vtJ 9fqoXNs1EjntuT0rLfcSvT3hnMLDDXYaCS2Hv4+scl5F6SljLRfsqEMHvJa/171hoIwa yhPQ== X-Forwarded-Encrypted: i=1; AJvYcCUmyRgbLC0EqS9ppmx1znt0h9S3IAW/YOhBUlPrWfypHn+4cBAoafO2IIeicSRGksGfirDplNX/b8S/8fYyOlkKzoj9E1Pz5EiGC2LW X-Gm-Message-State: AOJu0YzusLWUjP9EIfrx/KVALeTp4z68SIA22dkj+Q2WUT4DzWSPkDt7 xBIQjULl02ftMPzrLjA0V45xRRjKetMLh26WtQc05QZyza7SUWFKc76NmQiBUEI= X-Received: by 2002:a5d:6691:0:b0:33d:2567:995c with SMTP id l17-20020a5d6691000000b0033d2567995cmr1215561wru.1.1708682259350; Fri, 23 Feb 2024 01:57:39 -0800 (PST) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id bn22-20020a056000061600b0033d81d9c44esm2313054wrb.70.2024.02.23.01.57.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 01:57:39 -0800 (PST) Date: Fri, 23 Feb 2024 12:57:35 +0300 From: Dan Carpenter To: Su Hui Cc: Mike Marshall , Martin Brandenburg , devel@lists.orangefs.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH next] orangefs: re-fix sb refcount leak when allocate sb info failed. Message-ID: <32506721-f81b-46d8-b421-d5d2a4b3540a@moroto.mountain> References: <20240223093639.1794556-1-suhui@nfschina.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240223093639.1794556-1-suhui@nfschina.com> On Fri, Feb 23, 2024 at 05:36:41PM +0800, Su Hui wrote: > This problem was previously fixed by commit ac2c63757f4f ("orangefs: Fix sb > refcount leak when allocate sb info failed."). > Add a judgement to fix NULL deference problem and also avoid refcount > leak problem. > > Fixes: 9bf93dcfc453 ("Julia Lawall reported this null pointer dereference, this should fix it.") > Signed-off-by: Su Hui > --- > ps: Thanks for Dan's suggestion[1]. > [1]: https://lore.kernel.org/all/c4bf77fb-c289-4f5d-9f20-e0861a543d91@moroto.mountain/ Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter