Commit 7ac81e2d2240 for kernel

commit 7ac81e2d2240f2c57bd073b0733e0b2abca38e82
Author: Genjian Zhang <zhanggenjian@kylinos.cn>
Date:   Fri Aug 7 23:57:15 2026 +0800

    dm-ebs: fix incorrect device offset check in ebs_ctr()

    <offset> is a backing-device sector offset; ti->len is the virtual
    target length. Comparing them rejects valid tables, e.g.:

      dmsetup create ebs0 --table "0 1048576 ebs /dev/sda 2097152 1 8"
      -> ebs: Invalid device offset sector (-EINVAL)

    Drop the check. Bounds against the backing device are already
    enforced later by device_area_is_invalid() via ebs_iterate_devices().

    Cc: stable@vger.kernel.org
    Fixes: d3c7b35c20d6 ("dm: add emulated block size target")
    Signed-off-by: Genjian Zhang <zhanggenjian@kylinos.cn>
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

diff --git a/drivers/md/dm-ebs-target.c b/drivers/md/dm-ebs-target.c
index 1e52bde48b91..5d67c6c19d4b 100644
--- a/drivers/md/dm-ebs-target.c
+++ b/drivers/md/dm-ebs-target.c
@@ -265,8 +265,7 @@ static int ebs_ctr(struct dm_target *ti, unsigned int argc, char **argv)

 	r = -EINVAL;
 	if (sscanf(argv[1], "%llu%c", &tmp, &dummy) != 1 ||
-	    tmp != (sector_t)tmp ||
-	    (sector_t)tmp >= ti->len) {
+	    tmp != (sector_t)tmp) {
 		ti->error = "Invalid device offset sector";
 		goto bad;
 	}