From nobody Sat Feb 7 18:20:05 2026 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 AB8341FC0EF for ; Sat, 20 Dec 2025 08:46:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766220377; cv=none; b=MNqO82m5dYbrVH/gD/vnysOlKcHSz0llUHr3su8KsKYx0GC7Edx6zL88a5PPaHtQ7sGpo1JQcsa+5Nq/pxL8L9wrkx2o46wH9eW48m4YIsVc2TSoOi2RYRPM3LpM39x4t7zyZbdQE6JfbNkXXVdOd9e1YmJzQGDIgB84nPTcMmA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766220377; c=relaxed/simple; bh=GJz0TV3dGwznk2pjw9vchjZ3oHpNifJ97zBYxc0cjic=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=ejTwZUqP/rQagCqSLC/ypg5VjVRBhtYjAnbyJqbjGcqfF5qcTxE+G5Tbu0B11i+pFHcgN2EFEmIv26/oNphppe7yo1U1FMV9XZPdzzmhVTWejM4N4b7S3v5EwEG/W0OIzhjYr20X+pWA7I/P6gouIon1jqJ7mU5JB1gKRYzGbwU= 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=rI2mq1wY; arc=none smtp.client-ip=209.85.128.43 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rI2mq1wY" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4779aa4f928so23908885e9.1 for ; Sat, 20 Dec 2025 00:46:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766220374; x=1766825174; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=oMd8hFhEdud5JNvQYdjzkL/DFZ3OGk2JIW+0oeUQ8pU=; b=rI2mq1wYV33LL/hVOGnUHEdqMy7FE74tJZZYDESVmV3uFFvgFyfcULvds93LXHmz0G fDPbn1/7LBHefYErleS8drDAR9+NLjt/XLP5/vsmpkyXuH8BVnX6kU6D2ErLgFMgMnmw 4LpN5bDE2eUlTWuHvGw1cRRJX8p547rJNvHpsdnnIuDt+8044iaN1BFyr+HBOPGjaoCV iHTJMxSnFU1KPN2reyUN/jA/mujx6GYseQi/B8vKZjQw7Quilb/VCiDXwCX1lhYhkziX qeyX8Reb+FLA9d1T+FnnVLc38HvoCxjCR10xpZre6/DH0vG7717ThmL0FmpFMA/1Wqqt h9Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766220374; x=1766825174; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oMd8hFhEdud5JNvQYdjzkL/DFZ3OGk2JIW+0oeUQ8pU=; b=bgp7mfbjFV7TnTUKyT5uZWU5GQQqcNBi1T6+oheTeukbEBaPToF6f1tw0DAUEn5Qfb T7hxPCsXxsGuwt9bpI0RLVqKA4mRm22YliOiPmEXykc3MaWoGyV96aeWD6e+4YcF8bUf 869KzT3k90ctt7QXMuO7YvESBZbuNBJlHm+ryHXLJykhfT3WyF7ByeNV99ecTV5IJuGi 8J3+8/pzJ4xbDtrs4p8Z9j7fp8OM5OYxhKryz1OWYskqN1EJ8Lq7W7O4lOhLniOfxqgR ytlM+jm7dGVsu4JcyDmkLZbsTNfc3g383qenFg/MvgV37Hsulbber0ol8l/+g91UUj1n a+dQ== X-Forwarded-Encrypted: i=1; AJvYcCXvOYkzZHwMdQ8qGMWaSqnrBPACyWP7hbE1k+Gpn8unW+Cgx75fOzog+21lfEtHfKBHCHEw1kMdF3JbOmc=@vger.kernel.org X-Gm-Message-State: AOJu0YyieODzvgiSokhV9IGWG1AxHBfHtihEDNyvTaI6w4wfCmPxSJ/l H6Wr3TI+3kzz4iWciOUofAqnHy3ss+ESzREHoJx5trLB1AaBFj5DZUlWFXQVQWvvrWs= X-Gm-Gg: AY/fxX43GEnmtgiht6tWMAAX5Llx609B1FPf/YdXfz/rdBdT38Fg/CQtVGO2Rl0p45u X3V6jbzK6lUnEwpiELRMZSB4n6tELbjRksGLYSCvssANbL/PC75cysX//c5/ZDlCrmZbQZoxEe9 dAuQEhNCWc0KwtzHiSx0/HLs+u3fpyLgUy56dBC7yTq5iUWFwBoTCIQWKi85Mg8stq/UI9c7nV9 58h8qCXx7U2C3ykSLBfk6fqcyqZxW0884QuzbiK3R51+r+JpHGPGdyTMkiQ56654P5jRjuHAkmy AARO9JHwuTwe+gkfdHkcGi63ZQldDgrdUzB6YMkNTxmJUDLyWD4/FhycfC4R3AVoO5ITEfJK77U Ol2IaH3U2v88VJt7TXLj8gTcYe2LeIh7U36L73v5djdnVIfLSwGY5i0XHI4KSlvDEIZBFotDMY/ SEdeqRrtmAwAHR45xs X-Google-Smtp-Source: AGHT+IGRYugwrsODSO161b7aXZ0dgJ/paBxDcbXlBkrr1+MKuen7cVrZowP77Fgt7jWv7lc6dZre1g== X-Received: by 2002:a05:600c:1d1d:b0:477:9eb8:97d2 with SMTP id 5b1f17b1804b1-47d1953b8acmr52521985e9.8.1766220373854; Sat, 20 Dec 2025 00:46:13 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d19346e48sm79604965e9.2.2025.12.20.00.46.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Dec 2025 00:46:13 -0800 (PST) Date: Sat, 20 Dec 2025 11:46:10 +0300 From: Dan Carpenter To: Thomas Fourier Cc: "Md. Haris Iqbal" , Jack Wang , Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH next] block: rnbd-clt: Fix signedness bug in init_dev() Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The "dev->clt_device_id" variable is set using ida_alloc_max() which returns an int and in particular it returns negative error codes. Change the type from u32 to int to fix the error checking. Fixes: c9b5645fd8ca ("block: rnbd-clt: Fix leaked ID in init_dev()") Signed-off-by: Dan Carpenter --- drivers/block/rnbd/rnbd-clt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/rnbd/rnbd-clt.h b/drivers/block/rnbd/rnbd-clt.h index a48e040abe63..fbc1ed766025 100644 --- a/drivers/block/rnbd/rnbd-clt.h +++ b/drivers/block/rnbd/rnbd-clt.h @@ -112,7 +112,7 @@ struct rnbd_clt_dev { struct rnbd_queue *hw_queues; u32 device_id; /* local Idr index - used to track minor number allocations. */ - u32 clt_device_id; + int clt_device_id; struct mutex lock; enum rnbd_clt_dev_state dev_state; refcount_t refcount; --=20 2.51.0