For native case we do not have monitor running so we have to return without pinging. Moreover we have NULL as input parameter. We should to avoid segmentation fault. Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@xxxxxxxxx> --- msg.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/msg.c b/msg.c index 76e74e7..b97ebec 100644 --- a/msg.c +++ b/msg.c @@ -206,8 +206,13 @@ int fping_monitor(int sfd) /* give the monitor a chance to update the metadata */ int ping_monitor(char *devname) { - int sfd = connect_monitor(devname); - int err = fping_monitor(sfd); + int sfd, err; + + if (!devname) + return -1; + + sfd = connect_monitor(devname); + err = fping_monitor(sfd); close(sfd); return err; -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html