Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2447818rda; Wed, 25 Oct 2023 03:07:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGemuzQN2Gqq6RAcn5+sPswY0xpudu2mnOgj34MF8Drak9pd+vED15vntuFGs3/b6vflqTr X-Received: by 2002:a81:480c:0:b0:5a9:117d:ddbc with SMTP id v12-20020a81480c000000b005a9117dddbcmr11963407ywa.15.1698228443533; Wed, 25 Oct 2023 03:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698228443; cv=none; d=google.com; s=arc-20160816; b=JqYsU3Nu1YFre4k1h85og5dn9u975fl4rSr07c5JU+sytRIFjb06fTKhCRpOHCWjZr k/WIrUA6gyTYRGz7Nb0KTGYyWfj3Rbk3aZCqAGiLGHZFJvfJr+dF3SrOgf5F6fQ4eWIE +xLUKLWgHdVf/DoZaYmEjE7vmQFIIiQLQ79oGLfSIbl+OUh8Z5pQLY0tPlK6VJrt9YJQ WXCClwIwKE9HIeKmr5dfDNm0CssI5JcEr97x4wo4ixjTNEAbRL4AqoovIxM++IUiJO2x HvW3urfBLhxx+CnF/0nNbKBEKAqCvj9l8QvoyMFBfw5vrsiXLxtBeWWmpwDzsUD9UfqL 8lwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=hUqQs7HR1QddWUvblu43oCjKfeNmQCMN3jpQc6OKjF8=; fh=V5prn2YdUyM2HC7r7ccmgRfinLQO6cClZUj1gL62fS8=; b=jJCbvIo3y7Xdse2o4piawxSFt3FDJb+xfKAKHFJl74ZxIDXSRHOc8Mrox6s5jKe3FW k0w/jlXykT3ODUgHxfyOzT23cUTz4/5O2hQIPTJ2QqK3gWbm52KCCwyj5KkUEMVrUzXn a8syxyakLn2mLav2aszcj6xL5MvaferEvu4wefJJynYWCDChk74bG0i2Y1Md0U/BMCMD PHcSJwt6pvR63HcvUfKW4MSvrzhiCsyxlBdNU395J6mxGn5hVG9MP0+zFOIjOnqrMLMZ 8akkV/A1hAiJKqSNRGAVZ4YmuTr/AUb3vGk3hv3/WZLXKH9pOZTUh/4NxtfIhL+9qIH4 UfIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id r80-20020a0de853000000b0056ce2ff50fcsi9939322ywe.411.2023.10.25.03.07.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 03:07:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id D1B9680B79E8; Wed, 25 Oct 2023 03:07:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233782AbjJYKHM (ORCPT + 99 others); Wed, 25 Oct 2023 06:07:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232584AbjJYKHL (ORCPT ); Wed, 25 Oct 2023 06:07:11 -0400 Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C732EDD; Wed, 25 Oct 2023 03:07:08 -0700 (PDT) Received: from fsav413.sakura.ne.jp (fsav413.sakura.ne.jp [133.242.250.112]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 39PA6lkO073119; Wed, 25 Oct 2023 19:06:47 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav413.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav413.sakura.ne.jp); Wed, 25 Oct 2023 19:06:47 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav413.sakura.ne.jp) Received: from [192.168.1.6] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 39PA6lvj073114 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Wed, 25 Oct 2023 19:06:47 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: <119b7314-10a9-4d62-b40f-19462dc68009@I-love.SAKURA.ne.jp> Date: Wed, 25 Oct 2023 19:06:42 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] block: Fix minor range check in device_add_disk() Content-Language: en-US To: Zhong Jinghua , axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, zhongjinghua@huawei.com, yi.zhang@huawei.com, yukuai3@huawei.com References: <20231025084621.2338604-1-zhongjinghua@huaweicloud.com> From: Tetsuo Handa In-Reply-To: <20231025084621.2338604-1-zhongjinghua@huaweicloud.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 25 Oct 2023 03:07:20 -0700 (PDT) On 2023/10/25 17:46, Zhong Jinghua wrote: > Checks added in patch: > commit e338924bd05d ("block: check minor range in device_add_disk()") > ignore the problem of first_minore < 0 and disk->minors < 0. What is the problem of first_minor < 0 or disk->minors < 0 ? Are negative values legal/illegal ?