Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp278365lqh; Thu, 28 Mar 2024 01:27:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXYGnw1AxjVHoWgwRjHFxb7BdjxGj/w910gIwE8e5aWKHjfxBXJnrA3aJ548UWPMQ86QDtOxLNwAWhqIRtGu+2bLIozbzqm6GIyvwsDZA== X-Google-Smtp-Source: AGHT+IGobw1yU2+akJeW6HELh82hJzNcPJe3pyXqcI4431+HMsqj3FS+EkTIegIM7hJ0W1Z76upY X-Received: by 2002:a17:902:cec8:b0:1e0:f367:2c9d with SMTP id d8-20020a170902cec800b001e0f3672c9dmr2222805plg.41.1711614458364; Thu, 28 Mar 2024 01:27:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711614458; cv=pass; d=google.com; s=arc-20160816; b=W0ZuynerUDJjw021CsBRWaYvJpXDuESKsWwj9yXHvVmGuVdprPlaBIbnXYaWUAn/ud W+B3/jeDsLgsNirbZeLeCkXQLkryyCUkLN2Ed/WIkHEfCaGLkdWCK5tk4laxf9WtiyVS b2uM4riObtOA2UJy//DjcQ3QaGykTHmXQ4iMxpTlYwlA6JsHBAg2VYqtegxtV47wAB9V iqwA6l0b018XbxFcCYljW3JnXgNzqDZJsvqURtuYHXLxYbXvI695cNojEw3C7Uy0SalC VI6va3ufShsZFt6GtAFWFaM11oqV+rMFP/yndBdzKtSx9jL5ShomHh2gOq55bPsamkv5 smqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=HqQErbvN+ijNu1Jdkp6E3sCfvGXfGUK+92NtkuPAjjs=; fh=q9PzMkZQ6hz+PWxxZj4Nhk5v8zvTo0cAjJ4Tyin+Fyc=; b=wmGwY5bvtryJsyl3NDMRDf+yLYWyc4SvQ2aRRt7GtHX5uczBRYPuGfTYvqjBzuwUET Z/MIPBW+SaEijGd6IpGr6RZ+gIbpcTg4OqXqMYmj31xbV1NwEGvX2JHxNApHpSvUh5M5 gmKidHHpmmNXotvzS9vScy98nzKKkeY9D3l7fnmfDER2cTu1R9LS8IFtJxVyVSj/WaWY oAalWfjsljwI5gBOgBOEreKhaape8NCAwaQ7LUF9wgoIBOZfAN2C/q23UELUrBdtREPy YpH+hzXWPcYRLWedZvUM9pt1qx5h8eF+QVSu2zBmLb5yoXyzybh1D77GV0yB45gSXBvg 3AKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=aLZyzoYU; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-kernel+bounces-122584-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122584-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w6-20020a170902e88600b001dcfaf5bfefsi1030206plg.573.2024.03.28.01.27.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 01:27:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122584-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=@sipsolutions.net header.s=mail header.b=aLZyzoYU; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-kernel+bounces-122584-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122584-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net 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 DCF16293A5A for ; Thu, 28 Mar 2024 08:27:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE49158127; Thu, 28 Mar 2024 08:27:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="aLZyzoYU" Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 62C2256B7F for ; Thu, 28 Mar 2024 08:27:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711614442; cv=none; b=F/mNz/UkaO9BGmJPAOM1RPzXdi3qnToFN7u3kAzeg9gfA0IUfYaoE2yh8EPSX3JTNZbFlcl0DRYrVP1hsQOO2ufp5ltGqeQNIf7M1DSeupClwf2cy9OGURV54xruKjQDFR7Yx9Oh5Px3u7fkbovzJYro5croTPV1LKV7xeEraW4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711614442; c=relaxed/simple; bh=HqQErbvN+ijNu1Jdkp6E3sCfvGXfGUK+92NtkuPAjjs=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=ugyR5snPwo+/GtjS5/81yrpnZNJ6NRAVohCZjrwsPsVIM8BArOqMuK1JMCxutsA9Trwq7xsmBt8F1NLx0z5RhL13i2dEL4ewrZmOAqyOoNBNSskV36PQ3oXuXG4W44rOHTwFmC7QPcWdw61JXX9Qt6g2vEyURHV8CiLOmizPSX0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=aLZyzoYU; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=HqQErbvN+ijNu1Jdkp6E3sCfvGXfGUK+92NtkuPAjjs=; t=1711614440; x=1712824040; b=aLZyzoYUbhry1HbINh1uF/XZDdbyY0/I+RUiXOsekIDG5aA sMt7fhf+djlzUzde7oLZ8H189U++OD0u+nb81Z0r7gK1g22IkrlnlxcMgwBt8AGOeiV7XGc+KTat8 JitiLYo1+UN110mAxe1ySmwJpRRzLRoUJlc+cNW00s/b1lgQzeUYKYRIkqYkezrH0Lj34KUt5JJmL vBgmV2NV7fzGvKzqlqChBc7bhOd4DEPyHYx2yzUDM/4cBduYlM5ys496HmwG8DqtOWSM1FYfnCEkk 1ldVvRhHxmcIoUE/ndGiOPpq6wqa12wPxaWziA+UswdSGe9dfbhtnx9Av8GKtbtQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rpl6P-00000000mZL-3bbB; Thu, 28 Mar 2024 09:27:14 +0100 Message-ID: <6fa3c18b3421d5dfc80c82ce29a49171c1841bf0.camel@sipsolutions.net> Subject: Re: [PATCH] um: Fix return value in ubd_init() From: Johannes Berg To: Duoming Zhou , linux-kernel@vger.kernel.org Cc: linux-um@lists.infradead.org, richard@nod.at, anton.ivanov@cambridgegreys.com, axboe@kernel.dk, brauner@kernel.org, hare@suse.de, jinpu.wang@ionos.com Date: Thu, 28 Mar 2024 09:27:12 +0100 In-Reply-To: <20240306091259.18605-1-duoming@zju.edu.cn> References: <20240306091259.18605-1-duoming@zju.edu.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Wed, 2024-03-06 at 17:12 +0800, Duoming Zhou wrote: > When kmalloc_array() fails to allocate memory, the ubd_init() > should return -ENOMEM instead of -1. So, fix it. Not sure this really matters, but the code seems cleaner with it :) Reviewed-by: Johannes Berg johannes