linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init()
@ 2020-07-12 17:47 Coly Li
  2020-07-12 17:47 ` [PATCH 2/2] bcche: fix overflow in offset_to_stripe() Coly Li
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Coly Li @ 2020-07-12 17:47 UTC (permalink / raw)
  To: linux-bcache; +Cc: linux-block, Coly Li, Ken Raeburn, stable

For some block devices which large capacity (e.g. 8TB) but small io_opt
size (e.g. 8 sectors), in bcache_device_init() the stripes number calcu-
lated by,
	DIV_ROUND_UP_ULL(sectors, d->stripe_size);
might be overflow to the unsigned int bcache_device->nr_stripes.

This patch uses an unsigned long variable to store DIV_ROUND_UP_ULL()
and after the value is checked to be available in unsigned int range,
sets it to bache_device->nr_stripes. Then the overflow is avoided.

Reported-by: Ken Raeburn <raeburn@redhat.com>
Signed-off-by: Coly Li <colyli@suse.de>
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1783075
Cc: stable@vger.kernel.org
---
 drivers/md/bcache/super.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index a239fcaec70b..0c25ebc035b1 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -886,19 +886,19 @@ static int bcache_device_init(struct bcache_device *d, unsigned int block_size,
 	struct request_queue *q;
 	const size_t max_stripes = min_t(size_t, INT_MAX,
 					 SIZE_MAX / sizeof(atomic_t));
-	size_t n;
+	unsigned long n;
 	int idx;
 
 	if (!d->stripe_size)
 		d->stripe_size = 1 << 31;
 
-	d->nr_stripes = DIV_ROUND_UP_ULL(sectors, d->stripe_size);
-
-	if (!d->nr_stripes || d->nr_stripes > max_stripes) {
-		pr_err("nr_stripes too large or invalid: %u (start sector beyond end of disk?)\n",
-			(unsigned int)d->nr_stripes);
+	n = DIV_ROUND_UP_ULL(sectors, d->stripe_size);
+	if (!n || n > max_stripes) {
+		pr_err("nr_stripes too large or invalid: %lu (start sector beyond end of disk?)\n",
+			n);
 		return -ENOMEM;
 	}
+	d->nr_stripes = n;
 
 	n = d->nr_stripes * sizeof(atomic_t);
 	d->stripe_sectors_dirty = kvzalloc(n, GFP_KERNEL);
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] bcche: fix overflow in offset_to_stripe()
  2020-07-12 17:47 [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init() Coly Li
@ 2020-07-12 17:47 ` Coly Li
  2020-07-17 17:08   ` Sasha Levin
  2020-07-12 17:49 ` [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init() Coly Li
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Coly Li @ 2020-07-12 17:47 UTC (permalink / raw)
  To: linux-bcache; +Cc: linux-block, Coly Li, Ken Raeburn, stable

offset_to_stripe() returns the stripe number (in type unsigned int) from
an offset (in type uint64_t) by the following calculation,
	do_div(offset, d->stripe_size);
For large capacity backing device (e.g. 18TB) with small stripe size
(e.g. 4KB), the result is 4831838208 and exceeds UINT_MAX. The actual
returned value which caller receives is 536870912, due to the overflow.

This patch changes offset_to_stripe()'s return value from type unsigned
int to long int, and returns -EINVAL if do_div() result >= current max
stripe number bcache_device->nr_stripes. Because nr_stripe is in type
unsigned int, the non-negative return value will never overflow.

Reported-by: Ken Raeburn <raeburn@redhat.com>
Signed-off-by: Coly Li <colyli@suse.de>
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1783075
Cc: stable@vger.kernel.org
---
 drivers/md/bcache/writeback.c | 14 +++++++++-----
 drivers/md/bcache/writeback.h | 18 ++++++++++++++++--
 2 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c
index 5397a2c5d6cc..2de6e9260443 100644
--- a/drivers/md/bcache/writeback.c
+++ b/drivers/md/bcache/writeback.c
@@ -521,15 +521,19 @@ void bcache_dev_sectors_dirty_add(struct cache_set *c, unsigned int inode,
 				  uint64_t offset, int nr_sectors)
 {
 	struct bcache_device *d = c->devices[inode];
-	unsigned int stripe_offset, stripe, sectors_dirty;
+	unsigned int stripe_offset, sectors_dirty;
+	long stripe;
 
 	if (!d)
 		return;
 
+	stripe = offset_to_stripe(d, offset);
+	if (stripe < 0)
+		return;
+
 	if (UUID_FLASH_ONLY(&c->uuids[inode]))
 		atomic_long_add(nr_sectors, &c->flash_dev_dirty_sectors);
 
-	stripe = offset_to_stripe(d, offset);
 	stripe_offset = offset & (d->stripe_size - 1);
 
 	while (nr_sectors) {
@@ -569,12 +573,12 @@ static bool dirty_pred(struct keybuf *buf, struct bkey *k)
 static void refill_full_stripes(struct cached_dev *dc)
 {
 	struct keybuf *buf = &dc->writeback_keys;
-	unsigned int start_stripe, stripe, next_stripe;
+	unsigned int start_stripe, next_stripe;
+	long stripe;
 	bool wrapped = false;
 
 	stripe = offset_to_stripe(&dc->disk, KEY_OFFSET(&buf->last_scanned));
-
-	if (stripe >= dc->disk.nr_stripes)
+	if (stripe < 0)
 		stripe = 0;
 
 	start_stripe = stripe;
diff --git a/drivers/md/bcache/writeback.h b/drivers/md/bcache/writeback.h
index b029843ce5b6..8550b984954a 100644
--- a/drivers/md/bcache/writeback.h
+++ b/drivers/md/bcache/writeback.h
@@ -52,10 +52,21 @@ static inline uint64_t bcache_dev_sectors_dirty(struct bcache_device *d)
 	return ret;
 }
 
-static inline unsigned int offset_to_stripe(struct bcache_device *d,
+static inline long offset_to_stripe(struct bcache_device *d,
 					uint64_t offset)
 {
 	do_div(offset, d->stripe_size);
+
+	if (unlikely(offset >= d->nr_stripes)) {
+		pr_err("Invalid stripe %llu (>= nr_stripes %u).\n",
+			offset, d->nr_stripes);
+		return -EINVAL;
+	}
+
+	/*
+	 * Here offset is definitly smaller than UINT_MAX,
+	 * return it as long int will never overflow.
+	 */
 	return offset;
 }
 
@@ -63,7 +74,10 @@ static inline bool bcache_dev_stripe_dirty(struct cached_dev *dc,
 					   uint64_t offset,
 					   unsigned int nr_sectors)
 {
-	unsigned int stripe = offset_to_stripe(&dc->disk, offset);
+	long stripe = offset_to_stripe(&dc->disk, offset);
+
+	if (stripe < 0)
+		return false;
 
 	while (1) {
 		if (atomic_read(dc->disk.stripe_sectors_dirty + stripe))
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init()
  2020-07-12 17:47 [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init() Coly Li
  2020-07-12 17:47 ` [PATCH 2/2] bcche: fix overflow in offset_to_stripe() Coly Li
@ 2020-07-12 17:49 ` Coly Li
  2020-07-12 20:38   ` Ken Raeburn
  2020-07-12 20:37 ` Jens Axboe
  2020-07-17 17:08 ` Sasha Levin
  3 siblings, 1 reply; 9+ messages in thread
From: Coly Li @ 2020-07-12 17:49 UTC (permalink / raw)
  To: Ken Raeburn; +Cc: linux-bcache, linux-block, stable

On 2020/7/13 01:47, Coly Li wrote:
> For some block devices which large capacity (e.g. 8TB) but small io_opt
> size (e.g. 8 sectors), in bcache_device_init() the stripes number calcu-
> lated by,
> 	DIV_ROUND_UP_ULL(sectors, d->stripe_size);
> might be overflow to the unsigned int bcache_device->nr_stripes.
> 
> This patch uses an unsigned long variable to store DIV_ROUND_UP_ULL()
> and after the value is checked to be available in unsigned int range,
> sets it to bache_device->nr_stripes. Then the overflow is avoided.

Hi Ken,

Could you please to try whether these two patches may avoid the kernel
panic ? I will post the overwhelm stripe_size patch later.

Thanks.

Coly Li

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init()
  2020-07-12 17:47 [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init() Coly Li
  2020-07-12 17:47 ` [PATCH 2/2] bcche: fix overflow in offset_to_stripe() Coly Li
  2020-07-12 17:49 ` [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init() Coly Li
@ 2020-07-12 20:37 ` Jens Axboe
  2020-07-13  3:34   ` Coly Li
  2020-07-17 17:08 ` Sasha Levin
  3 siblings, 1 reply; 9+ messages in thread
From: Jens Axboe @ 2020-07-12 20:37 UTC (permalink / raw)
  To: Coly Li, linux-bcache; +Cc: linux-block, Ken Raeburn, stable

On 7/12/20 11:47 AM, Coly Li wrote:
> For some block devices which large capacity (e.g. 8TB) but small io_opt
> size (e.g. 8 sectors), in bcache_device_init() the stripes number calcu-
> lated by,
> 	DIV_ROUND_UP_ULL(sectors, d->stripe_size);
> might be overflow to the unsigned int bcache_device->nr_stripes.
> 
> This patch uses an unsigned long variable to store DIV_ROUND_UP_ULL()
> and after the value is checked to be available in unsigned int range,
> sets it to bache_device->nr_stripes. Then the overflow is avoided.

Does that work on 32-bit, where sizeof(unsigned long) == 4?

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init()
  2020-07-12 17:49 ` [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init() Coly Li
@ 2020-07-12 20:38   ` Ken Raeburn
  2020-07-13  3:35     ` Coly Li
  0 siblings, 1 reply; 9+ messages in thread
From: Ken Raeburn @ 2020-07-12 20:38 UTC (permalink / raw)
  To: Coly Li; +Cc: linux-bcache, linux-block, stable


On 7/12/20 1:49 PM, Coly Li wrote:
> On 2020/7/13 01:47, Coly Li wrote:
>> For some block devices which large capacity (e.g. 8TB) but small io_opt
>> size (e.g. 8 sectors), in bcache_device_init() the stripes number calcu-
>> lated by,
>> 	DIV_ROUND_UP_ULL(sectors, d->stripe_size);
>> might be overflow to the unsigned int bcache_device->nr_stripes.
>>
>> This patch uses an unsigned long variable to store DIV_ROUND_UP_ULL()
>> and after the value is checked to be available in unsigned int range,
>> sets it to bache_device->nr_stripes. Then the overflow is avoided.
> Hi Ken,
>
> Could you please to try whether these two patches may avoid the kernel
> panic ? I will post the overwhelm stripe_size patch later.
>
> Thanks.
>
> Coly Li
>
I will. But, from inspection: On a 32-bit system, "unsigned long" will 
still be 32 bits, but sector_t (u64) will still be 64 bits, so that 
assignment will still discard high bits before validation in that 
environment. I suggest "unsigned long long" or another specifically 
64-bit type.

Also, the VDO driver I work on doesn't support 32-bit platforms 
currently, so my own testing will be limited to 64-bit platforms.

Ken


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init()
  2020-07-12 20:37 ` Jens Axboe
@ 2020-07-13  3:34   ` Coly Li
  0 siblings, 0 replies; 9+ messages in thread
From: Coly Li @ 2020-07-13  3:34 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-bcache, linux-block, Ken Raeburn, stable

On 2020/7/13 04:37, Jens Axboe wrote:
> On 7/12/20 11:47 AM, Coly Li wrote:
>> For some block devices which large capacity (e.g. 8TB) but small io_opt
>> size (e.g. 8 sectors), in bcache_device_init() the stripes number calcu-
>> lated by,
>> 	DIV_ROUND_UP_ULL(sectors, d->stripe_size);
>> might be overflow to the unsigned int bcache_device->nr_stripes.
>>
>> This patch uses an unsigned long variable to store DIV_ROUND_UP_ULL()
>> and after the value is checked to be available in unsigned int range,
>> sets it to bache_device->nr_stripes. Then the overflow is avoided.
> 
> Does that work on 32-bit, where sizeof(unsigned long) == 4?
> 

I will post v2 to explicit use uint64_t. Thanks for the remind.

Coly Li

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init()
  2020-07-12 20:38   ` Ken Raeburn
@ 2020-07-13  3:35     ` Coly Li
  0 siblings, 0 replies; 9+ messages in thread
From: Coly Li @ 2020-07-13  3:35 UTC (permalink / raw)
  To: Ken Raeburn; +Cc: linux-bcache, linux-block, stable

On 2020/7/13 04:38, Ken Raeburn wrote:
> 
> On 7/12/20 1:49 PM, Coly Li wrote:
>> On 2020/7/13 01:47, Coly Li wrote:
>>> For some block devices which large capacity (e.g. 8TB) but small io_opt
>>> size (e.g. 8 sectors), in bcache_device_init() the stripes number calcu-
>>> lated by,
>>>     DIV_ROUND_UP_ULL(sectors, d->stripe_size);
>>> might be overflow to the unsigned int bcache_device->nr_stripes.
>>>
>>> This patch uses an unsigned long variable to store DIV_ROUND_UP_ULL()
>>> and after the value is checked to be available in unsigned int range,
>>> sets it to bache_device->nr_stripes. Then the overflow is avoided.
>> Hi Ken,
>>
>> Could you please to try whether these two patches may avoid the kernel
>> panic ? I will post the overwhelm stripe_size patch later.
>>
>> Thanks.
>>
>> Coly Li
>>
> I will. But, from inspection: On a 32-bit system, "unsigned long" will
> still be 32 bits, but sector_t (u64) will still be 64 bits, so that
> assignment will still discard high bits before validation in that
> environment. I suggest "unsigned long long" or another specifically
> 64-bit type.
> 
> Also, the VDO driver I work on doesn't support 32-bit platforms
> currently, so my own testing will be limited to 64-bit platforms.

I will post a v2 for your test. Thanks :-)

Coly Li


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] bcche: fix overflow in offset_to_stripe()
  2020-07-12 17:47 ` [PATCH 2/2] bcche: fix overflow in offset_to_stripe() Coly Li
@ 2020-07-17 17:08   ` Sasha Levin
  0 siblings, 0 replies; 9+ messages in thread
From: Sasha Levin @ 2020-07-17 17:08 UTC (permalink / raw)
  To: Sasha Levin, Coly Li, linux-bcache; +Cc: linux-block, Coly Li, stable, stable

Hi

[This is an automated email]

This commit has been processed because it contains a -stable tag.
The stable tag indicates that it's relevant for the following trees: all

The bot has tested the following trees: v5.7.8, v5.4.51, v4.19.132, v4.14.188, v4.9.230, v4.4.230.

v5.7.8: Build OK!
v5.4.51: Build OK!
v4.19.132: Build OK!
v4.14.188: Failed to apply! Possible dependencies:
    1d316e658374f ("bcache: implement PI controller for writeback rate")
    25d8be77e1922 ("block: move bio_alloc_pages() to bcache")
    27a40ab9269e7 ("bcache: add backing_request_endio() for bi_end_io")
    2831231d4c3f9 ("bcache: reduce cache_set devices iteration by devices_max_used")
    3b304d24a718a ("bcache: convert cached_dev.count from atomic_t to refcount_t")
    3fd47bfe55b00 ("bcache: stop dc->writeback_rate_update properly")
    5138ac6748e38 ("bcache: fix misleading error message in bch_count_io_errors()")
    539d39eb27083 ("bcache: fix wrong return value in bch_debug_init()")
    5fa89fb9a86bc ("bcache: don't write back data if reading it failed")
    6f10f7d1b02b1 ("bcache: style fix to replace 'unsigned' by 'unsigned int'")
    771f393e8ffc9 ("bcache: add CACHE_SET_IO_DISABLE to struct cache_set flags")
    7ba0d830dc0e4 ("bcache: set error_limit correctly")
    7e027ca4b534b ("bcache: add stop_when_cache_set_failed option to backing device")
    804f3c6981f5e ("bcache: fix cached_dev->count usage for bch_cache_set_error()")
    a8500fc816b19 ("bcache: rearrange writeback main thread ratelimit")
    b1092c9af9ed8 ("bcache: allow quick writeback when backing idle")
    bc082a55d25c8 ("bcache: fix inaccurate io state for detached bcache devices")
    c7b7bd07404c5 ("bcache: add io_disable to struct cached_dev")

v4.9.230: Failed to apply! Possible dependencies:
    1d316e658374f ("bcache: implement PI controller for writeback rate")
    2831231d4c3f9 ("bcache: reduce cache_set devices iteration by devices_max_used")
    297e3d8547848 ("blk-throttle: make throtl_slice tunable")
    3fd47bfe55b00 ("bcache: stop dc->writeback_rate_update properly")
    4e4cbee93d561 ("block: switch bios to blk_status_t")
    5138ac6748e38 ("bcache: fix misleading error message in bch_count_io_errors()")
    6f10f7d1b02b1 ("bcache: style fix to replace 'unsigned' by 'unsigned int'")
    7e027ca4b534b ("bcache: add stop_when_cache_set_failed option to backing device")
    87760e5eef359 ("block: hook up writeback throttling")
    9e234eeafbe17 ("blk-throttle: add a simple idle detection")
    c7b7bd07404c5 ("bcache: add io_disable to struct cached_dev")
    cf43e6be865a5 ("block: add scalable completion tracking of requests")
    e806402130c9c ("block: split out request-only flags into a new namespace")
    fbbaf700e7b16 ("block: trace completion of all bios.")

v4.4.230: Failed to apply! Possible dependencies:
    005411ea7ee77 ("doc: update block/queue-sysfs.txt entries")
    1d316e658374f ("bcache: implement PI controller for writeback rate")
    2831231d4c3f9 ("bcache: reduce cache_set devices iteration by devices_max_used")
    297e3d8547848 ("blk-throttle: make throtl_slice tunable")
    38f8baae89056 ("block: factor out chained bio completion")
    3fd47bfe55b00 ("bcache: stop dc->writeback_rate_update properly")
    4e4cbee93d561 ("block: switch bios to blk_status_t")
    511cbce2ff8b9 ("irq_poll: make blk-iopoll available outside the block layer")
    5138ac6748e38 ("bcache: fix misleading error message in bch_count_io_errors()")
    6f10f7d1b02b1 ("bcache: style fix to replace 'unsigned' by 'unsigned int'")
    7e027ca4b534b ("bcache: add stop_when_cache_set_failed option to backing device")
    87760e5eef359 ("block: hook up writeback throttling")
    8d354f133e86d ("blk-mq: improve layout of blk_mq_hw_ctx")
    9467f85960a31 ("blk-mq/cpu-notif: Convert to new hotplug state machine")
    9e234eeafbe17 ("blk-throttle: add a simple idle detection")
    af3e3a5259e35 ("block: don't unecessarily clobber bi_error for chained bios")
    ba8c6967b7391 ("block: cleanup bio_endio")
    c7b7bd07404c5 ("bcache: add io_disable to struct cached_dev")
    cf43e6be865a5 ("block: add scalable completion tracking of requests")
    e57690fe009b2 ("blk-mq: don't overwrite rq->mq_ctx")
    fbbaf700e7b16 ("block: trace completion of all bios.")


NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

-- 
Thanks
Sasha

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init()
  2020-07-12 17:47 [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init() Coly Li
                   ` (2 preceding siblings ...)
  2020-07-12 20:37 ` Jens Axboe
@ 2020-07-17 17:08 ` Sasha Levin
  3 siblings, 0 replies; 9+ messages in thread
From: Sasha Levin @ 2020-07-17 17:08 UTC (permalink / raw)
  To: Sasha Levin, Coly Li, linux-bcache; +Cc: linux-block, Coly Li, stable, stable

Hi

[This is an automated email]

This commit has been processed because it contains a -stable tag.
The stable tag indicates that it's relevant for the following trees: all

The bot has tested the following trees: v5.7.8, v5.4.51, v4.19.132, v4.14.188, v4.9.230, v4.4.230.

v5.7.8: Failed to apply! Possible dependencies:
    46f5aa8806e34 ("bcache: Convert pr_<level> uses to a more typical style")

v5.4.51: Failed to apply! Possible dependencies:
    253a99d95d5b3 ("bcache: move macro btree() and btree_root() into btree.h")
    46f5aa8806e34 ("bcache: Convert pr_<level> uses to a more typical style")
    49d08d596e85f ("bcache: check return value of prio_read()")
    8e7102273f597 ("bcache: make bch_btree_check() to be multithreaded")
    b144e45fc5764 ("bcache: make bch_sectors_dirty_init() to be multithreaded")
    feac1a70b8063 ("bcache: add bcache_ prefix to btree_root() and btree() macros")

v4.19.132: Failed to apply! Possible dependencies:
    0b13efecf5f25 ("bcache: add return value check to bch_cached_dev_run()")
    253a99d95d5b3 ("bcache: move macro btree() and btree_root() into btree.h")
    46f5aa8806e34 ("bcache: Convert pr_<level> uses to a more typical style")
    49d08d596e85f ("bcache: check return value of prio_read()")
    4b6efb4bdbce2 ("bcache: more detailed error message to bcache_device_link()")
    5c2a634cbfaf1 ("bcache: stop writeback kthread and kworker when bch_cached_dev_run() failed")
    633bb2ce60b94 ("bcache: add more error message in bch_cached_dev_attach()")
    792732d9852c0 ("bcache: use kmemdup_nul for CACHED_LABEL buffer")
    88c12d42d2bb6 ("bcache: add error check for calling register_bdev()")
    8e7102273f597 ("bcache: make bch_btree_check() to be multithreaded")
    91be66e1318f6 ("bcache: performance improvement for btree_flush_write()")
    cb07ad63682ff ("bcache: introduce force_wake_up_gc()")
    e0faa3d7f79f7 ("bcache: improve error message in bch_cached_dev_run()")
    feac1a70b8063 ("bcache: add bcache_ prefix to btree_root() and btree() macros")

v4.14.188: Failed to apply! Possible dependencies:
    1d316e658374f ("bcache: implement PI controller for writeback rate")
    1dbe32ad0a82f ("bcache: rewrite multiple partitions support")
    25d8be77e1922 ("block: move bio_alloc_pages() to bcache")
    27a40ab9269e7 ("bcache: add backing_request_endio() for bi_end_io")
    2831231d4c3f9 ("bcache: reduce cache_set devices iteration by devices_max_used")
    3b304d24a718a ("bcache: convert cached_dev.count from atomic_t to refcount_t")
    3fd47bfe55b00 ("bcache: stop dc->writeback_rate_update properly")
    46f5aa8806e34 ("bcache: Convert pr_<level> uses to a more typical style")
    5138ac6748e38 ("bcache: fix misleading error message in bch_count_io_errors()")
    539d39eb27083 ("bcache: fix wrong return value in bch_debug_init()")
    5f2b18ec8e164 ("bcache: Fix a compiler warning in bcache_device_init()")
    5fa89fb9a86bc ("bcache: don't write back data if reading it failed")
    6ae63e3501c49 ("bcache: replace printk() by pr_*() routines")
    6f10f7d1b02b1 ("bcache: style fix to replace 'unsigned' by 'unsigned int'")
    771f393e8ffc9 ("bcache: add CACHE_SET_IO_DISABLE to struct cache_set flags")
    7ba0d830dc0e4 ("bcache: set error_limit correctly")
    7e027ca4b534b ("bcache: add stop_when_cache_set_failed option to backing device")
    804f3c6981f5e ("bcache: fix cached_dev->count usage for bch_cache_set_error()")
    a8500fc816b19 ("bcache: rearrange writeback main thread ratelimit")
    b1092c9af9ed8 ("bcache: allow quick writeback when backing idle")
    bc082a55d25c8 ("bcache: fix inaccurate io state for detached bcache devices")
    c7b7bd07404c5 ("bcache: add io_disable to struct cached_dev")

v4.9.230: Failed to apply! Possible dependencies:
    1d316e658374f ("bcache: implement PI controller for writeback rate")
    1dbe32ad0a82f ("bcache: rewrite multiple partitions support")
    2831231d4c3f9 ("bcache: reduce cache_set devices iteration by devices_max_used")
    297e3d8547848 ("blk-throttle: make throtl_slice tunable")
    3fd47bfe55b00 ("bcache: stop dc->writeback_rate_update properly")
    46f5aa8806e34 ("bcache: Convert pr_<level> uses to a more typical style")
    4e4cbee93d561 ("block: switch bios to blk_status_t")
    5138ac6748e38 ("bcache: fix misleading error message in bch_count_io_errors()")
    5f2b18ec8e164 ("bcache: Fix a compiler warning in bcache_device_init()")
    6ae63e3501c49 ("bcache: replace printk() by pr_*() routines")
    6f10f7d1b02b1 ("bcache: style fix to replace 'unsigned' by 'unsigned int'")
    7e027ca4b534b ("bcache: add stop_when_cache_set_failed option to backing device")
    87760e5eef359 ("block: hook up writeback throttling")
    9e234eeafbe17 ("blk-throttle: add a simple idle detection")
    b8c0d911ac528 ("bcache: partition support: add 16 minors per bcacheN device")
    c7b7bd07404c5 ("bcache: add io_disable to struct cached_dev")
    cf43e6be865a5 ("block: add scalable completion tracking of requests")
    e806402130c9c ("block: split out request-only flags into a new namespace")
    fbbaf700e7b16 ("block: trace completion of all bios.")

v4.4.230: Failed to apply! Possible dependencies:
    005411ea7ee77 ("doc: update block/queue-sysfs.txt entries")
    1d316e658374f ("bcache: implement PI controller for writeback rate")
    1dbe32ad0a82f ("bcache: rewrite multiple partitions support")
    2831231d4c3f9 ("bcache: reduce cache_set devices iteration by devices_max_used")
    297e3d8547848 ("blk-throttle: make throtl_slice tunable")
    38f8baae89056 ("block: factor out chained bio completion")
    3fd47bfe55b00 ("bcache: stop dc->writeback_rate_update properly")
    46f5aa8806e34 ("bcache: Convert pr_<level> uses to a more typical style")
    4e4cbee93d561 ("block: switch bios to blk_status_t")
    511cbce2ff8b9 ("irq_poll: make blk-iopoll available outside the block layer")
    5138ac6748e38 ("bcache: fix misleading error message in bch_count_io_errors()")
    5f2b18ec8e164 ("bcache: Fix a compiler warning in bcache_device_init()")
    6ae63e3501c49 ("bcache: replace printk() by pr_*() routines")
    6f10f7d1b02b1 ("bcache: style fix to replace 'unsigned' by 'unsigned int'")
    7e027ca4b534b ("bcache: add stop_when_cache_set_failed option to backing device")
    87760e5eef359 ("block: hook up writeback throttling")
    90706094d5be6 ("bcache: pr_err: more meaningful error message when nr_stripes is invalid")
    9467f85960a31 ("blk-mq/cpu-notif: Convert to new hotplug state machine")
    9e234eeafbe17 ("blk-throttle: add a simple idle detection")
    af3e3a5259e35 ("block: don't unecessarily clobber bi_error for chained bios")
    b8c0d911ac528 ("bcache: partition support: add 16 minors per bcacheN device")
    ba8c6967b7391 ("block: cleanup bio_endio")
    c7b7bd07404c5 ("bcache: add io_disable to struct cached_dev")
    cf43e6be865a5 ("block: add scalable completion tracking of requests")
    fbbaf700e7b16 ("block: trace completion of all bios.")


NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

-- 
Thanks
Sasha

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-07-17 17:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-12 17:47 [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init() Coly Li
2020-07-12 17:47 ` [PATCH 2/2] bcche: fix overflow in offset_to_stripe() Coly Li
2020-07-17 17:08   ` Sasha Levin
2020-07-12 17:49 ` [PATCH 1/2] bcache: avoid nr_stripes overflow in bcache_device_init() Coly Li
2020-07-12 20:38   ` Ken Raeburn
2020-07-13  3:35     ` Coly Li
2020-07-12 20:37 ` Jens Axboe
2020-07-13  3:34   ` Coly Li
2020-07-17 17:08 ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).