Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1585637rdb; Mon, 8 Jan 2024 04:16:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGfbk8V4dr4l6OHJ5vC/mjSyXwiTVBaXYK2A1pmLs50b3Dl7Tk9nV0Dvy6YUlriemXrseSK X-Received: by 2002:a05:6a00:140b:b0:6da:83a2:cfb5 with SMTP id l11-20020a056a00140b00b006da83a2cfb5mr8104708pfu.11.1704716197462; Mon, 08 Jan 2024 04:16:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704716197; cv=none; d=google.com; s=arc-20160816; b=bZZyEX8wgypewT/c5UapKTK1bZU9J3Y5nXdqRiKXujZ+uBhnBm4ytvlfOOa0/Amb8B G4xD2ipP0GQ3NhOhfpqzExSujlzxFaynB3DfDScSMuby/3bT+i/O8YCuSwHQ5m80ftEy yYFgHEK1d/nr+7f3QmzsDJArIUJTcEw239lubQO0j5lCGy9dPNvPocSNkLDPF72stEvT eaYCfyv9hg3pZPL+cqFTI9yMK1RNtOGgl7gq4gZ/36W2UA2UQkEZra8tcewChfdlU8ND ANkOjOAQJ1DPHJUuRmmHFz4wm7Qqz+gwRpuGyMWfqF4Q2xeez3rL5YZ17DnHBPbb3+NM 9bGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=ftjai2gBCPxKGA6L3Dpqoe1qrerRfyJo5B7ew4NadGg=; fh=6UojlzRYVsFqDhEZumxlYZlZVjXt/x9ID6cQxClY+b4=; b=XoSsHufY6EeuI0JoRnChq6l9eAzqvnJmsZQ84gKfSCzDN1E7hi85Xj1a+j2Y5JYJYZ atePuObAhO5QwiQZSzL07zuiE5HjasV30OOv3tNAoQi6CbLH5QHAJ0a76lfbUOTKhmN0 uKDgCRgbLjDyAICSyStcJdAOI/qx10+VP1e2G9nVGfcePaOrBW9qENHLgpZxg0n+nGad JPn2aHmX8HRkTy3tRbwiwU3HnLsf0Y52SDGxo/0yLu18y73VS2i3ddhtbYBsXeLFyx0+ p/eAa1AtKIuSrFU4axLBDn/97v20vXByx1XdevoHjV/7FC73zKjd4jcck/bj8svvRSh2 aGMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=lBOnSMzz; spf=pass (google.com: domain of linux-kernel+bounces-19484-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19484-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s124-20020a637782000000b005ce038a381bsi6029608pgc.861.2024.01.08.04.16.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 04:16:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19484-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=@web.de header.s=s29768273 header.b=lBOnSMzz; spf=pass (google.com: domain of linux-kernel+bounces-19484-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19484-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de 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 1C2A7B20ECE for ; Mon, 8 Jan 2024 12:16:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90F013FE51; Mon, 8 Jan 2024 12:15:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="lBOnSMzz" X-Original-To: linux-kernel@vger.kernel.org Received: from mout.web.de (mout.web.de [212.227.15.14]) (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 981853FE46; Mon, 8 Jan 2024 12:15:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1704716145; x=1705320945; i=markus.elfring@web.de; bh=ftjai2gBCPxKGA6L3Dpqoe1qrerRfyJo5B7ew4NadGg=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=lBOnSMzzO6p7d7Xo5ePpJsEXEwS6zqWYzEMDguVbRwAoE/qCXAC2IwDkobxku46o PQ14T39Wc14/Dx1p75PfECfQpKzjL+xUBzjhBQIyJS3ybQHkSR8xdvXrSu8s2Foma DxVhvvERW538CDVBMpCAhfx/4YWDQS3as4JT+H4dVUeAczfYeSfUlLnZptqqVRUpG 6v9q64vHlvhTMyX1z9uXDhOCms/NTRH1MykwJXaBxjAEP1PgBxH081EHtPcvi52an z/AEUAb5l8e29udWnSdD9t8nqrWgPP1HVOClLADDqJrh2pjwSKNwpxMzRT6ZN5fA9 LfKNBcCwNL5rbjNLqQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.83.95]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MDe2F-1rVqYI0Te3-00AhCL; Mon, 08 Jan 2024 13:15:45 +0100 Message-ID: Date: Mon, 8 Jan 2024 13:15:43 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: fs/9p: Improve exception handling in v9fs_session_init() Content-Language: en-GB To: Dominique Martinet , Eric Van Hensbergen , v9fs@lists.linux.dev, kernel-janitors@vger.kernel.org Cc: =?UTF-8?Q?Christian_Sch=C3=B6nebeck?= , Latchesar Ionkov , LKML References: <7203d3fc-f1e4-4fb1-8dd3-068b0ec6c752@web.de> From: Markus Elfring In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:gl0ACkqWjLQpN7DW1bz4DW6OBTXzylZArZ0ih9Y/aiilrlZgNZe XUmANt6EhrcgjAVHNF8zdBBCvqDIQ3YrautoPK5CSjcqYLJlaW4OlTXG0G/ixfn/LQGg5eG oj3t57hiuLAB3DnoPPMC09aLGkTHoAqG6O7SZZiTsDXhS8yImSIQ6hDEuB0C0+vInuMQNR4 j5RRVo3PEA/aJJmmTV0WA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:c4zC0rRpEzg=;0HOZ/Whp5g4WVRdV8jvuDJ7cskc wU2huU4c5dedgcwfj/7o+YTZbN8f6xbNNRiITjBrHKxxnE6GVdTeGLL45yk2a7AIyky+ORej8 XxOsG0Tbz9fb/Na4c7syYGLjyo4XVlIzavF58rcVg6MoiXioriaDjaiKVGfpntdeVsZCK21IP WjReKwsaIUXy2hAtyJDWQkMHMFiNHn70pOzwHMVEHMmmC+RxmBiy0GUV6vgnP7sTWa6NTC7TU NOBpKpCXxDLlLR/gOHqphasi75b+9q2jquxo+0SpOgTNsFp+wG4g3QhDydO8PT1HShQ6155+W w40tAd6YahtG6NQGduSTdabFE7248fptr7JJMbiZmVKaeAKf1mIB1XtYzDROmdCPMWlPnCQx8 MJ49XgNVjWC6tWAV5wMxtcWHK6Pf5F7guEXVYMMA8fhGf0gE4U1t08erPNannjZ6bIsJDWqj8 N7FDH3xq5gamrsO/LIZNFpHIZGdegigvnaNvEQ/famzj7Sqa58X8BT6DbDyR0JjYEwJLntHTV lEWoq0KKGUAHEqKek+krvDYY16VFFIv5r/d256pSNF4z3eKdyE8twHPqQtb9rGWWGcE0MFKjw bXJejYSfNnINiZsaonf/MbmigYwD8vmLq3LHJiD+bSjhmQD5a8j03UvtkViYwVenR35Xs0l4k Und6INeC0QFy4bcCqDMeaQZd0XB6WwOY0ZncPIfxz2VqaX6p08F2eybeBYhB1VYGRz5sbnBbU lwm8b1CY+H1qFRoSS3MAmtWZ8hA4XLCKHb2RmK/z9C13b6FC1R8tXa1S+ak/0DUqPN/Dd5nET OLcXvaV9iaST+E6bfEksxYINh4AjugubHZyUMtCOoI+bcucioQhAIHtY2viF1srydDiUGdNO1 Jg/eIrj4jXprZ5y3zkSJk06lsXPmistrI5UAmaf4Y6tcJciLUuwHe3fHEsrMpAAHyLe2A5LF3 Fa2xcw== >> The kfree() function was called in up to two cases by >> the v9fs_session_init() function during error handling >> even if the passed variable contained a null pointer. > > I don't see the problem in calling kfree on null things (especially on > error path). Will you become willing to reduce the number of redundant function calls for improved exception handling? Regards, Markus