Thread (9 messages) 9 messages, 4 authors, 2024-12-09
STALE537d

[PATCH v2 0/2] Drivers: hv: util: Two fixes in util_probe()

From: <hidden>
Date: 2024-11-06 15:43:11
Also in: lkml

From: Michael Kelley <redacted>

Patch 1 fixes util_probe() to not force the error return value to
ENODEV when the util_init function fails -- just return the error
code from util_init so the real error code is displayed in messages.

Patch 2 fixes a more serious race condition between initialization
of the VMBus channel and initial operations of the user space
daemons for KVP and VSS. The fix reorders the initialization in
util_probe() so the race condition can't happen.

The two fixes are functionally independent, but Patch 2 introduces
the util_init_transport function that parallels the existing code
for the util_init function. Doing Patch 1 first avoids an
inconsistency in the error handling in similar code for these two
parts of util_probe().

This series is v2 of a single patch first posted by Dexuan Cui
to fix the race condition.[1] I've taken over the patch per
discussion with Dexuan.

[1] https://lore.kernel.org/linux-hyperv/20240909164719.41000-1-decui@microsoft.com/ (local)

Michael Kelley (2):
  Drivers: hv: util: Don't force error code to ENODEV in util_probe()
  Drivers: hv: util: Avoid accessing a ringbuffer not initialized yet

 drivers/hv/hv_kvp.c       |  6 ++++++
 drivers/hv/hv_snapshot.c  |  6 ++++++
 drivers/hv/hv_util.c      | 13 ++++++++++---
 drivers/hv/hyperv_vmbus.h |  2 ++
 include/linux/hyperv.h    |  1 +
 5 files changed, 25 insertions(+), 3 deletions(-)

-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help