Message ID | 3d17a814-2300-4902-8b2c-2a73c0e9bfc4@moroto.mountain |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-88624-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp1158829dyb; Fri, 1 Mar 2024 07:33:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWqgPL5JcaAimWykq4Ru1HB+1/3q4Nuc/7gdk9abLnLKeMdS/hMZuLz97sESFiaqjrHqiX9YVxSJbwVknaW10Xh0TRUTw== X-Google-Smtp-Source: AGHT+IEM3alXZcHRbDVqziJI89cc0EwWaKN/vsp1XZvGzOUiymDzNDrGRnbED6kuEaDi9Rd1YE2P X-Received: by 2002:a05:6a21:7884:b0:1a1:431c:6696 with SMTP id bf4-20020a056a21788400b001a1431c6696mr314318pzc.49.1709307236005; Fri, 01 Mar 2024 07:33:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709307235; cv=pass; d=google.com; s=arc-20160816; b=Yx5tLy9PFTVEwUMQIyJmNmVcPON/q9mk1uBbVjfD3+gX74vrzE6rHwMoEZPT8aCCs7 YZxQmzlMl8aex4i6MRqsttwBT1ChiYdDXUz8I0ordaMwquJr6MsGu8RtMQUVjCZEcDUX IvyDoh/nCfEPZCopYvc+AywA0I2KRIQMxB3pDAJyco61VDgoIqPmihZenwReliiNl+iZ W/IAB8gdIWyHTqVeH/ECCS5M4AQsuZHn97sRWjB6nDo6FAIKKN/98F9f8H2iQ1wL36GD DFQnSPt36C/tvsAYXsWp6mN4zONKmHPrhH/LGOn4eWCbRoO0lZTcKByozofLCGw4Xgdw mE9g== 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:message-id:subject:cc:to:from :date:dkim-signature; bh=LwF1vEHHtNcLEL22JU7CbamIfjcY0v8w9f8KAiAGRpo=; fh=AP8lhwbJVt7oFeioIq/mx+lHs8smlfKz5PvYOsvDOSk=; b=LOOcPY7ycaE72ZBoiBZoxQQx84XjvQD7r1RkbAvsTt68oeZmPkRQOOSGajSOMv9plq jLqZj6Gf3Fp+U3UMoobAmHvnqcXudHN/eUWABq7t0wMjUysyCj646Ir+aTb2/UQdMBcT x8Gt+7TB+0C3tetd/i7slvFUVlUORVupq37lFl+Y1WsjS9t4y8EVwbWA9QwCM7X9pr+o YFfNClki+vREn0nq+e7u3tZ8hGndGAE9vfi8/QrcZ4W/KHHeLGTrZvCXUb2fC4rodPLm UcWhsHZn4rLqx48xLMuY8+2T9q5mhIp6OyS66DalOTd8mdfo+OnVNtMTwJd5DzO58lPw FoQQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iN+Gj8BL; 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-88624-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88624-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i17-20020a63cd11000000b005dc958db2fcsi3601274pgg.363.2024.03.01.07.33.55 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 07:33:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88624-ouuuleilei=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=iN+Gj8BL; 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-88624-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88624-ouuuleilei=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 DF63EB24485 for <ouuuleilei@gmail.com>; Fri, 1 Mar 2024 15:30:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 86B7E70044; Fri, 1 Mar 2024 15:30:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="iN+Gj8BL" Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 0C4216F53D for <linux-kernel@vger.kernel.org>; Fri, 1 Mar 2024 15:29:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709306999; cv=none; b=hWPqoz7/6N86IMsJYdKpUpTxjCKZGikPLBh5PjiGmaxCC10SaNPpaWFqs34mln5FPbDMDBAMQJ7JLvW9lBz9e87kUlhHqPIQ756O8HqYLv0vmiwBf9URfNvi41Ech/vwMtUKO8+MfoejjkjGsJvhYVZXHlqhkZbf1kJcIiQiVZ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709306999; c=relaxed/simple; bh=zh1tMmI9C8esm9t8S5ODtHnOIgNunq7h2YrtfEFvx/Y=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=jau09z1RQL9UgFA52xxbzLADu2wb3PJgSSC8CLSO5yTKtqQ2L4/ItpueXhG/o4roaxIyXL5Yx1bfhPdWo7DEEsoui/yEzjnhD3psZkaEEJcAfUVyKtUX/GlDq+F8CDG5Z6++2PhOTp4cL+QHz+u7gUAwykoM5SXmRJhdsjQ/lZM= 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=iN+Gj8BL; arc=none smtp.client-ip=209.85.208.175 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-lj1-f175.google.com with SMTP id 38308e7fff4ca-2d275e63590so29904021fa.2 for <linux-kernel@vger.kernel.org>; Fri, 01 Mar 2024 07:29:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709306996; x=1709911796; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LwF1vEHHtNcLEL22JU7CbamIfjcY0v8w9f8KAiAGRpo=; b=iN+Gj8BLG7HaTyiBwK6YrhMrrIGiUH1KBbRM+WYLGIStLQUsdJiiDT8mAnZhyYDe0i c9M/sZSyJC3TxXEIAeRBVuAiHTKg6msl4k8SgObymvgGho+tdkul7JSAZm/ZYzpidVMj bFm3yJByorJR58EPp23wAxNsFc+DU7GFkuwsCqsUh+wbHJGPOINsql66cjrGOomlD5fw FSgwzISi1HG0hbsWJ2v+R2XowxCCzXND8GW3lWvgMt7eAH5bjqfc1XQXD0f37mVJpHIB 1ktYZPekGQZubSeNJiS8/IESaCq6PCGWpPnL9Ib2y9V6zRIToV1fOpdDRSbUsDMLAjY/ HVFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709306996; x=1709911796; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LwF1vEHHtNcLEL22JU7CbamIfjcY0v8w9f8KAiAGRpo=; b=Bj4ww0/uY6aNPA9BOFPc/2sBPJFrDpmpc9EmnthBvpz7+2IC4FGXwQkiNo35m7z1t2 /W6yojUtTe/LXTJ1y/U9l7S6jED4H291fgS/aNaLtcFih5T4LUjRJHWTutG9njiLvHe5 h+pE+c+tYDrfuh3VdBk78JnqrbLi3++MvmfoPoTuE7JHIMTXjyC4JgBmJUXKBJHJ0VJZ 8LkCcMJViTzBAjlXFnsPL6d56Df41wb9EnnajoOrNHo+7z23MnEGk6IfJD9PTom6N8Sd +KkzIBN1GQeolGs4Bdr0XOTzhkpuAs2UJohGWrNmWrYBdgQP7G96pY2/HpVt7gVJ94yr aGag== X-Forwarded-Encrypted: i=1; AJvYcCVx4qgCgTP4LvcakLqYo3WOFMnjAk+NZ9JMNPztgy+w4h6F9UfO27EXH3MgIxChTP1oJnSHrOEPInJ07zIYTA/ZThp9gMTI3kSPbu/U X-Gm-Message-State: AOJu0YxEIlHGJCwwueqeYaFR6ZYnt2QQ0/5VDUIiOnc5xkK4J4f7mJmA uI6IZXFF7ZF5D8pciMK+M+ytvmMqe4A55paB9czt+9WpTCqXpeNjJvdD1rvs05c= X-Received: by 2002:a2e:2404:0:b0:2d2:935a:7a3d with SMTP id k4-20020a2e2404000000b002d2935a7a3dmr1312182ljk.34.1709306996297; Fri, 01 Mar 2024 07:29:56 -0800 (PST) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id g8-20020a05600c310800b00412b0ef22basm5835531wmo.10.2024.03.01.07.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 07:29:56 -0800 (PST) Date: Fri, 1 Mar 2024 18:29:52 +0300 From: Dan Carpenter <dan.carpenter@linaro.org> To: Jens Axboe <axboe@kernel.dk> Cc: Pavel Begunkov <asml.silence@gmail.com>, io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 2/2] io_uring/net: remove unnecessary check Message-ID: <3d17a814-2300-4902-8b2c-2a73c0e9bfc4@moroto.mountain> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7f5d7887-f76e-4e68-98c2-894bfedbf292@moroto.mountain> X-Mailer: git-send-email haha only kidding X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792338544201603532 X-GMAIL-MSGID: 1792338544201603532 |
Series |
io_uring/net: fix bug in io_recvmsg_mshot_prep()
|
|
Commit Message
Dan Carpenter
March 1, 2024, 3:29 p.m. UTC
"namelen" is type size_t so it can't be negative.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
io_uring/net.c | 2 --
1 file changed, 2 deletions(-)
Comments
On Fri, Mar 01, 2024 at 06:29:52PM +0300, Dan Carpenter wrote: > "namelen" is type size_t so it can't be negative. > > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> > --- Jens applied Muhammad's patch so this part isn't required any more (and would introduce a bug if it were). regards, dan carpenter
On 3/1/24 9:56 AM, Dan Carpenter wrote: > On Fri, Mar 01, 2024 at 06:29:52PM +0300, Dan Carpenter wrote: >> "namelen" is type size_t so it can't be negative. >> >> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> >> --- > > Jens applied Muhammad's patch so this part isn't required any more (and > would introduce a bug if it were). Yeah good point - thanks, I've dropped it.
diff --git a/io_uring/net.c b/io_uring/net.c index da257bf429d5..04a7426c80d2 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -557,8 +557,6 @@ static int io_recvmsg_mshot_prep(struct io_kiocb *req, (REQ_F_APOLL_MULTISHOT|REQ_F_BUFFER_SELECT)) { int hdr; - if (unlikely(namelen < 0)) - return -EOVERFLOW; if (check_add_overflow(sizeof(struct io_uring_recvmsg_out), namelen, &hdr)) return -EOVERFLOW;