Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2330178rdd; Fri, 12 Jan 2024 06:30:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IEsmM5uznUbTtXqipL0gaFTrCLG8oxD1WDzujyBlCwIR7WqV3dn7sgO52NXJLgwjyiXAxn3 X-Received: by 2002:a05:6214:484:b0:681:943:60f8 with SMTP id pt4-20020a056214048400b00681094360f8mr985710qvb.35.1705069847855; Fri, 12 Jan 2024 06:30:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705069847; cv=none; d=google.com; s=arc-20160816; b=X6Mvub006F7eU0XwTU51rcDCsvroOHI7twm7Tc1e5uC88DLf42pNTXNElR8FIVr6hK nFq9+2r20vR2fwh/PAtN+XVLQX3aFr1m9DyidJhluHKBJK1UfE2VQqbkxgavQdtdZKf9 BiLko4HhCkAvzm3NZCXK3R5/xz+swmchoy34qdlUkAEWbqkCHMZnCMDfO0JOZN7xXvbK rnHjADRL2ab7XeCK3vjEk3pb+U8WYzgtMg9onhscWkhXdeYTJyNtr3KDoHWhRSE+wFXi yoRCCZeb0kAuvV4RAhWoamVEThkpSNLwIi6fkYZyYCzh2n9i5VpZn5A6BceqIjVFwPFT JNHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=Jyt2TEgZsDix4CX79kAquNlGHroGirqSF3vUH3D39Ig=; fh=yNaXozqUCkJ8nh+uz3pJFLzzj950qRMoYcKIMDekhRA=; b=eoWkrg93lf08MLmGiyV8iFphrtgsvstbe6+vC8XH4sjHwrBZW6s+xvWx/8HpAmuWAF QXjXPx9623pj0RDWoV4FC2Z9rP7GaY7QqcOEXXL+CI3erX9QEKbiKhz34M3piF9mNC4x TOlgCLQuNLSlstBfGP0V2y09jCuQ4WySAqPYYZnRpN2jPNj6dCmLgtqPdqDMUGh0W+Ua otIQDnjUJqxLpgYeZO28mHt0NITuOqVfwk1fXPDu4wexaumzWxWvBhSrlJopyZr2QK5E vyAOe0Mx6jLiwgYrNgZhXOllSN7Mzkhqd2GLV5SHweXavIvEjaPXiEmz6V8lp5Afc6He bJQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=w9kIaiRg; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=w9kIaiRg; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel+bounces-24754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24754-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id s7-20020a0cb307000000b0067f74a8de8esi2799405qve.501.2024.01.12.06.30.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 06:30:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=w9kIaiRg; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=w9kIaiRg; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel+bounces-24754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24754-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9B2E01C220AE for ; Fri, 12 Jan 2024 14:30:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D538C6E2BF; Fri, 12 Jan 2024 14:30:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="w9kIaiRg"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="oQWXn9Bl"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="w9kIaiRg"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="oQWXn9Bl" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 909C86DD09; Fri, 12 Jan 2024 14:30:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D05B121E03; Fri, 12 Jan 2024 14:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1705069824; h=from:from:reply-to: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=Jyt2TEgZsDix4CX79kAquNlGHroGirqSF3vUH3D39Ig=; b=w9kIaiRgFGLBFILRYnlkETpGNRAzpjJplkw71SgIjwAiSPkxvZ3yxa3Xeb0YWDum8GmOHK AAgdbPlhdR7oR1hNnoNNLCmKZ7KeG1Vhy4woeEfnepl18rhHgn/fK0aY98lib9RFdRV0XH /tWY8eGOUpafEIo6ZNlD0aAdqrEPRo8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1705069824; h=from:from:reply-to: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=Jyt2TEgZsDix4CX79kAquNlGHroGirqSF3vUH3D39Ig=; b=oQWXn9BlPf5SmtbIIH7h34Cjwafq1gTZQdgqxCVeIxfeaEtynilNis2QtoYM3o8V/HwHh3 74R9NMUMxOMMJzCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1705069824; h=from:from:reply-to: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=Jyt2TEgZsDix4CX79kAquNlGHroGirqSF3vUH3D39Ig=; b=w9kIaiRgFGLBFILRYnlkETpGNRAzpjJplkw71SgIjwAiSPkxvZ3yxa3Xeb0YWDum8GmOHK AAgdbPlhdR7oR1hNnoNNLCmKZ7KeG1Vhy4woeEfnepl18rhHgn/fK0aY98lib9RFdRV0XH /tWY8eGOUpafEIo6ZNlD0aAdqrEPRo8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1705069824; h=from:from:reply-to: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=Jyt2TEgZsDix4CX79kAquNlGHroGirqSF3vUH3D39Ig=; b=oQWXn9BlPf5SmtbIIH7h34Cjwafq1gTZQdgqxCVeIxfeaEtynilNis2QtoYM3o8V/HwHh3 74R9NMUMxOMMJzCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2B2DB13782; Fri, 12 Jan 2024 14:30:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id Lj0ZOP9MoWVkCAAAD6G6ig (envelope-from ); Fri, 12 Jan 2024 14:30:23 +0000 From: Gabriel Krisman Bertazi To: Markus Elfring Cc: io-uring@vger.kernel.org, kernel-janitors@vger.kernel.org, Jens Axboe , Pavel Begunkov , LKML Subject: Re: [PATCH v2 2/2] io_uring: Improve exception handling in io_ring_ctx_alloc() In-Reply-To: <49ecda98-770d-455e-acd7-12d810280fdd@web.de> (Markus Elfring's message of "Wed, 10 Jan 2024 21:50:15 +0100") References: <6cbcf640-55e5-2f11-4a09-716fe681c0d2@web.de> <878r4xnn52.fsf@mailhost.krisman.be> <49ecda98-770d-455e-acd7-12d810280fdd@web.de> Date: Fri, 12 Jan 2024 11:30:21 -0300 Message-ID: <87frz2k4jm.fsf@mailhost.krisman.be> User-Agent: Gnus/5.13 (Gnus v5.13) 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=utf-8 Content-Transfer-Encoding: quoted-printable Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: 0.24 X-Spamd-Result: default: False [0.24 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,web.de]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.16)[-0.783]; FREEMAIL_TO(0.00)[web.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[vger.kernel.org,kernel.dk,gmail.com]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Flag: NO Markus Elfring writes: > From: Markus Elfring > Date: Wed, 10 Jan 2024 21:15:48 +0100 > > The label =E2=80=9Cerr=E2=80=9D was used to jump to a kfree() call despit= e of > the detail in the implementation of the function =E2=80=9Cio_ring_ctx_all= oc=E2=80=9D > that it was determined already that a corresponding variable contained > a null pointer because of a failed memory allocation. > > 1. Thus use more appropriate labels instead. > > 2. Reorder jump targets at the end. > As I mentioned on v1, this doesn't do us any good, as kfree can handle NULL pointers just fine, and changes like this becomes churn later when backporting or modifying the code. --=20 Gabriel Krisman Bertazi