Skip to content

Drivers: hv: util: Two fixes in util_probe()

[email protected] linux-hyperv lkml 1 version Applied

Status from this message: Applied to hyperv-fixes, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 6 repliesApplied

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2Drivers: hv: util: Don't force error code to ENODEV in util_probe()drivers/hv/hv_util.c+1 -33 replies
2/2Drivers: hv: util: Avoid accessing a ringbuffer not initialized yetdrivers/hv/hv_kvp.c drivers/hv/hv_snapshot.c drivers/hv/hv_util.c +2 more+24 -00 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchWei Liu
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

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

From: Michael Kelley <[email protected]>

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/[email protected]/

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(-)
Signature · 1 line
2.25.1