Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp336767lqg; Fri, 1 Mar 2024 06:43:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV+ah4ZmI9b7yZf6xK2MuX8HY0LlKVxaqrgqceCjhcY4nIL0OA8yIuc8G8O4yKJ6Rm2QQcRpQoI0V+8Wc6vQ3sxDOKdaVTnZ2vVScw0ig== X-Google-Smtp-Source: AGHT+IH2MhovKST5DJeo4iCINELaa6oqYi/6hbgBVn+D7TpqiRBa9YXJOXyf7msYY4H7qHjjZyz1 X-Received: by 2002:a05:6871:a002:b0:220:d07a:fbc9 with SMTP id vp2-20020a056871a00200b00220d07afbc9mr200546oab.59.1709304224861; Fri, 01 Mar 2024 06:43:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709304224; cv=pass; d=google.com; s=arc-20160816; b=p3Ma7ld7vj8TruXsQZRXIKytN5i2H/Exkn6LO3foGSMW77vj8r/APiIGBD52hCrWqr +DB3+B4VPb7mZj28+f5z3BQMTQPlmOWaXj/Os5KxOZIcLFWac2WXAjgflr2490cHmMzd FinMSOclecydz47F/3dxu99jAhq5Lqzancirip3YbWjj6wOBs4rSa7Zghx1jZIjRGUJl 3YzbTmATqow9VgQvKHGG8lCw6tADSt3+xzpWGH/9wPr/d1C4PT3gfos/hdC184aB6BCN FZ6PITeL5SvdMkpXcCL2RAE7llrDIuCQE/lCIGTJxDyP74RSG+k/xaVUQEArN0FqMfV5 55sQ== ARC-Message-Signature: i=2; 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:message-id:date:subject:cc:to :from:dkim-signature; bh=jnsJ0e8F0XyGyEjOYrntE7s3snIgBI6JQCZGkQCdaKw=; fh=ZxsZTRh4M5E9DvhQindwTCPNyuveLYQw869Caxd/i9I=; b=KLwC0+PyY4nhhlmcBfDQK1yOKI8jSdUEMP0EvMpUkwfFPRZhh9ATCX0CTqyUNK2REV eDJeVlWriSK8q9qFIsZxC7sikptvXE0Ob6EFiWMj2/bZV7nKsJfeK/C2ofPJkqS2V3vx tSs2cicubNFcTbqgn9vkrugomJ6ZCUKNo6ZZZa0GyB3J5TlU68aOl89zgVJrLxR0skEZ e+/N2dpXc0GznT+oOG0htXirEAYqvYC/F+4T248E6rYosJyjHm2KUkAVv0gkGoiEWtSl iQYsO2060BxU91b4SHbLmAC10nTPQh1aSRscqJttwXo3TLFKLT6lVUcpC3ahnXgRttFr 6q8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=tnjThimi; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-88571-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88571-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x1-20020a05620a14a100b00787a7b4e7d0si3574082qkj.579.2024.03.01.06.43.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 06:43:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88571-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=tnjThimi; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-88571-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88571-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com 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 63D5E1C22328 for ; Fri, 1 Mar 2024 14:43:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F323E39AC4; Fri, 1 Mar 2024 14:43:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="tnjThimi" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 B688423DE; Fri, 1 Mar 2024 14:43:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709304213; cv=none; b=c4gBPdTucYUP/iDlx13lTGrpWHQexG8hqu/XqgQB0rO50p/j3ugwrnca0pRNxF9J6kopFXgB9FWb3FiVyPvRSEq3/2UxhQj/nFizPAYVw133uFfnkeBvg3lud8n+j80ecqokOp78K38HaNPr4xiDZOAaQcGiEEYZOrV+O2JZ9g8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709304213; c=relaxed/simple; bh=OnTKFgas6IdFh92/KQpHTR95vTLrd8aWhLoDrIWhXy8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Bds4z7t3DDUlZpZTpQ5zH7B6k+ZzIqZhDJYoPoV0umRx3gtICvoDA6Dxdbb3PqaOUREfpPx40oNrIHnCmgpxDRQ9/XtkjDMMZ3D7QVOzqdEYrj9IQJuknpMcBEX9ikXv/Rzeu8CFLUB0V3pG3uJVi6i8eLoO+e15EU7wx1UQCQY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=tnjThimi; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1709304210; bh=OnTKFgas6IdFh92/KQpHTR95vTLrd8aWhLoDrIWhXy8=; h=From:To:Cc:Subject:Date:From; b=tnjThimieXpRL4nOo0zsMGwlIFay9Xm5OlmUmjLNGWcSHgokdjjc9caUXHWIDGrG7 ngSyAK1rY1EyjDaFXXusw+/PuGXNUTPPO6Q5EU29IrKxq1K/EvrUKeEO+pH/ckes// +eFUPxkQxC2qkeMF6n97lN2+vGQ/olRAhQzUaZH7QTIeiLbJLvpsw9mvDJXuYiyOEZ IPVdzMhnqYlJ3I3t/DjqaV8n326Yuj4LmRU500cnLWJlcPcxxrK1RG14k7Qq8vGOus h27yHz2YzQ0dol8nQxGXdAaKcj5+wGafWPDcilgO1MEzveyLWkz67pQq9wClDgSzD5 C1/vAcmct4GPA== Received: from localhost.localdomain (broslavsky.collaboradmins.com [68.183.210.73]) (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) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id B331A37803EE; Fri, 1 Mar 2024 14:43:27 +0000 (UTC) From: Muhammad Usama Anjum To: Jens Axboe , Pavel Begunkov Cc: Muhammad Usama Anjum , kernel@collabora.com, kernel-janitors@vger.kernel.org, io-uring@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH io_uring/net: correct the type of variable Date: Fri, 1 Mar 2024 19:43:48 +0500 Message-Id: <20240301144349.2807544-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The namelen is of type int. It shouldn't be made size_t which is unsigned. The signed number is needed for error checking before use. Fixes: c55978024d12 ("io_uring/net: move receive multishot out of the generic msghdr path") Signed-off-by: Muhammad Usama Anjum --- io_uring/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_uring/net.c b/io_uring/net.c index 926d1fb0335de..b4ca803d85e23 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -551,7 +551,7 @@ int io_send(struct io_kiocb *req, unsigned int issue_flags) static int io_recvmsg_mshot_prep(struct io_kiocb *req, struct io_async_msghdr *iomsg, - size_t namelen, size_t controllen) + int namelen, size_t controllen) { if ((req->flags & (REQ_F_APOLL_MULTISHOT|REQ_F_BUFFER_SELECT)) == (REQ_F_APOLL_MULTISHOT|REQ_F_BUFFER_SELECT)) { -- 2.39.2