4e5f7cbf78
- drbd: fix build error against kernel v6.1.1 (bsc#1206791) * update bsc-1201335_06-bdi.patch commit log (no code change) + bsc-1201335_06-bdi.patch * update bsc-1202600_02-dax-introduce-DAX_RECOVERY_WRITE-dax-access-mode.patch (no code change) + bsc-1202600_02-dax-introduce-DAX_RECOVERY_WRITE-dax-access-mode.patch * using upstream patch to replace exist patch - bsc-1204596_02-drbd-stop-using-bdevname-in-drbd_report_io_error.patch + bsc-1204596_02-drbd-remove-usage-of-bdevname.patch * add new patches + bsc-1206791-01-drbd-add-comments-explaining-removal-of-bdi-congesti.patch + bsc-1206791-02-drbd-fix-static-analysis-warnings.patch + bsc-1206791-03-drbd-fix-warning-about-initializing-multiple-struct-.patch + bsc-1206791-04-blk_queue_split__no_present.patch + bsc-1206791-05-prandom_u32_max.patch + bsc-1206791-06-write_zeroes__no_capable.patch + bsc-1206791-07-drbd-fix-use-after-free-bugs-in-get_initial_state.patch + bsc-1206791-08-lib-lru_cache-Fixed-array-overflow-caused-by-incorre.patch + bsc-1206791-09-pmem-use-fs_dax_get_by_bdev-instead-of-dax_get_by_ho.patch OBS-URL: https://build.opensuse.org/request/show/1056192 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=142
32 lines
1.0 KiB
Diff
32 lines
1.0 KiB
Diff
From 1b4b7a945d5191225965d8e79fc6705c1b394e1d Mon Sep 17 00:00:00 2001
|
|
From: Philipp Reisner <philipp.reisner@linbit.com>
|
|
Date: Mon, 10 Oct 2022 09:20:20 +0200
|
|
Subject: [PATCH] drbd: fix warning about initializing multiple struct members
|
|
with one memset()
|
|
|
|
It comes from 6cedeb568b, November 2008
|
|
"proto version 89: support checksum based resyn"
|
|
|
|
Modern compiler warns about this and warnings might be treated as errors.
|
|
---
|
|
drbd/drbd_main.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
|
|
index 84040ed4bfaf..fe8cf60a85fc 100644
|
|
--- a/drbd/drbd_main.c
|
|
+++ b/drbd/drbd_main.c
|
|
@@ -1150,7 +1150,8 @@ int drbd_send_sync_param(struct drbd_peer_device *peer_device)
|
|
return -EIO;
|
|
|
|
/* initialize verify_alg and csums_alg */
|
|
- memset(p->verify_alg, 0, 2 * SHARED_SECRET_MAX);
|
|
+ memset(p->verify_alg, 0, sizeof(p->verify_alg));
|
|
+ memset(p->csums_alg, 0, sizeof(p->csums_alg));
|
|
|
|
rcu_read_lock();
|
|
nc = rcu_dereference(peer_device->connection->transport.net_conf);
|
|
--
|
|
2.26.2
|
|
|