public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Yu Kuai <yukuai3@huawei.com>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Li Nan <linan122@huawei.com>, Song Liu <song@kernel.org>,
	axboe@kernel.dk, linux-raid@vger.kernel.org,
	linux-block@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 6.9 02/15] md: Fix overflow in is_mddev_idle
Date: Wed, 19 Jun 2024 10:27:51 -0400	[thread overview]
Message-ID: <ZnLq5-UAvwFliWV3@sashalap> (raw)
In-Reply-To: <217cd112-b5cb-9b6b-9dc9-b11490c2f137@huawei.com>

On Mon, May 27, 2024 at 09:08:27AM +0800, Yu Kuai wrote:
>Hi,
>
>在 2024/05/26 17:41, Sasha Levin 写道:
>>From: Li Nan <linan122@huawei.com>
>>
>>[ Upstream commit 3f9f231236ce7e48780d8a4f1f8cb9fae2df1e4e ]
>>
>>UBSAN reports this problem:
>>
>>   UBSAN: Undefined behaviour in drivers/md/md.c:8175:15
>>   signed integer overflow:
>>   -2147483291 - 2072033152 cannot be represented in type 'int'
>>   Call trace:
>>    dump_backtrace+0x0/0x310
>>    show_stack+0x28/0x38
>>    dump_stack+0xec/0x15c
>>    ubsan_epilogue+0x18/0x84
>>    handle_overflow+0x14c/0x19c
>>    __ubsan_handle_sub_overflow+0x34/0x44
>>    is_mddev_idle+0x338/0x3d8
>>    md_do_sync+0x1bb8/0x1cf8
>>    md_thread+0x220/0x288
>>    kthread+0x1d8/0x1e0
>>    ret_from_fork+0x10/0x18
>>
>>'curr_events' will overflow when stat accum or 'sync_io' is greater than
>>INT_MAX.
>>
>>Fix it by changing sync_io, last_events and curr_events to 64bit.
>>
>>Signed-off-by: Li Nan <linan122@huawei.com>
>>Reviewed-by: Yu Kuai <yukuai3@huawei.com>
>>Link: https://lore.kernel.org/r/20240117031946.2324519-2-linan666@huaweicloud.com
>>Signed-off-by: Song Liu <song@kernel.org>
>>Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>Hi, please notice that this patch doesn't fix real issue expect for
>the ubsan warning, and this patch is reverted:

I'll drop it, thanks!

-- 
Thanks,
Sasha

  reply	other threads:[~2024-06-19 14:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-26  9:41 [PATCH AUTOSEL 6.9 01/15] fs/writeback: bail out if there is no more inodes for IO and queued once Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 02/15] md: Fix overflow in is_mddev_idle Sasha Levin
2024-05-27  1:08   ` Yu Kuai
2024-06-19 14:27     ` Sasha Levin [this message]
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 03/15] padata: Disable BH when taking works lock on MT path Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 04/15] crypto: hisilicon/sec - Fix memory leak for sec resource release Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 05/15] crypto: hisilicon/qm - Add the err memory release process to qm uninit Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 06/15] io_uring/sqpoll: work around a potential audit memory leak Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 07/15] rcutorture: Fix rcu_torture_one_read() pipe_count overflow comment Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 08/15] rcutorture: Make stall-tasks directly exit when rcutorture tests end Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 09/15] rcutorture: Fix invalid context warning when enable srcu barrier testing Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 10/15] platform/chrome: cros_usbpd_logger: provide ID table for avoiding fallback match Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 11/15] platform/chrome: cros_usbpd_notify: " Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 12/15] binfmt_elf: Leave a gap between .bss and brk Sasha Levin
2024-05-27 16:32   ` Kees Cook
2024-06-19 14:28     ` Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 13/15] ubsan: Avoid i386 UBSAN handler crashes with Clang Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 14/15] arm64: defconfig: select INTERCONNECT_QCOM_SM6115 as built-in Sasha Levin
2024-05-26  9:41 ` [PATCH AUTOSEL 6.9 15/15] block/ioctl: prefer different overflow check Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZnLq5-UAvwFliWV3@sashalap \
    --to=sashal@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=linan122@huawei.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=song@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=yukuai3@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox