Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16269762rwd; Mon, 26 Jun 2023 07:54:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6bJ0HTQwn6y/nmEmNPxUDGMOSOkaoXPwZmHYGRMq/T+ujDwinB8oq0IH/YGkX2ESUzI1D6 X-Received: by 2002:a9d:74c9:0:b0:696:1583:642 with SMTP id a9-20020a9d74c9000000b0069615830642mr30829903otl.21.1687791291348; Mon, 26 Jun 2023 07:54:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687791291; cv=none; d=google.com; s=arc-20160816; b=c7OWnaDbn+XX8YHl/G5odPeR02F+YMZCvafzyAv3DGKJ0V9tScCzq2Nf/2k5GeRWJF FOzl1n2Xtwvx5Sc7Le3f0chtQlwsjER8oByn5T62c6oDPJomd1BArj6RljFpk4aUX58s TBx8rfu6HZ6ToTYUuhASI7HE4jahxJSXogUcY745416NVTFYjW+0FnJanBnPMGlz7SkB hqHI9mMHuZYyU7aLF9cPybFcjV8W4R9eMZ0klU9QcyMlav6k2kA7yJpp17DWJiFOYe0q 0EBKdgDn9hPbUfgoz6lX+oPaycS3lQdgfj/PNn4/+WCEDsYQ5vlGr5qZSsbG6Vssujuu 8D3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bzZNANG0J8HfpO6KTm7PTyf4IENSH2Qqw+0yGBnF9KU=; fh=+blfs05Yb/QHa11WvqBVD+40BL6mT1fa3fUqjFfc7Cs=; b=rTHCUpTRrxrjVHSTfE6HMYOCiTJGbkoevUMZ6IrMNr0i67JoUgCCplxKfPhO6eBYfK o6lIpNngc0xM/RnsgNfnV3oBktMO0YkJbTLNxUuyInkq8Mvnnr23FcpBN8GpMWK//SPe m2d7Rj2fq8NhWmvJfvF0vYbFpuXq9nDCO6DvnjKHuNrdk6Drhi7lQvlWqIZN3OlcRAJT 7KtRaHN8GNMPUwFQUyQ0R/F3fG9kaAaX4HHECn8QHcPQOVqf7L2BCtIaLosbpaqMAPXf /oqS288Mk72pvfKnoUmShBvuySxz1hDrjhR7LYqylqJnjT2BUl14/u30jabu2qOVS9SN W70A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bv0+bJD1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 15-20020a63164f000000b005574bef6f31si5320574pgw.490.2023.06.26.07.54.38; Mon, 26 Jun 2023 07:54:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bv0+bJD1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230110AbjFZOmr (ORCPT + 99 others); Mon, 26 Jun 2023 10:42:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbjFZOmq (ORCPT ); Mon, 26 Jun 2023 10:42:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE71A1B1; Mon, 26 Jun 2023 07:42:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 51A5860E55; Mon, 26 Jun 2023 14:42:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55CC0C433C0; Mon, 26 Jun 2023 14:42:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1687790564; bh=Gab6lcu7mVHazv0MiFHxVMu9wPMkAGpd3kPAvaB3cxA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bv0+bJD1hKs+AJk2QCOzLXhOZhBH6NBaUuFc4Lt+UynZ0NFh0WX1B/XNmgQMLAaUn pskdIbnWpZDvyFzodwSb8wN8g27l4Ka1lhtxEfN+h7rfpjsg1Yy1KwNKhoZ2gK8bGf 6WOtz6Cg9zVGBcePe03vxaxVASN/Att+E2NxN8Mc= Date: Mon, 26 Jun 2023 16:42:36 +0200 From: Greg KH To: Min Li Cc: axboe@kernel.dk, willy@infradead.org, hch@lst.de, dlemoal@kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] block: add check that partition length needs to be aligned with block size Message-ID: <2023062625-macaw-chant-e515@gregkh> References: <20230626171021.5895-1-min15.li@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230626171021.5895-1-min15.li@samsung.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 26, 2023 at 05:10:21PM +0000, Min Li wrote: > Before calling add partition or resize partition, there is no check > on whether the length is aligned with the logical block size. > If the logical block size of the disk is larger than 512 bytes, > then the partition size maybe not the multiple of the logical block size, > and when the last sector is read, bio_truncate() will adjust the bio size, > resulting in an IO error if the size of the read command is smaller than > the logical block size.If integrity data is supported, this will also > result in a null pointer dereference when calling bio_integrity_free. > > Signed-off-by: Min Li What commit id does this fix? thanks, greg k-h