From patchwork Fri Jul 13 19:39:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 10524037 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5A5396028E for ; Fri, 13 Jul 2018 19:39:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49BA329C60 for ; Fri, 13 Jul 2018 19:39:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E4D329C6C; Fri, 13 Jul 2018 19:39:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 039E729C60 for ; Fri, 13 Jul 2018 19:39:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E94898110E; Fri, 13 Jul 2018 19:39:26 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B646D1073028; Fri, 13 Jul 2018 19:39:26 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7EAB618037ED; Fri, 13 Jul 2018 19:39:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6DJdNr9025365 for ; Fri, 13 Jul 2018 15:39:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8A5292026D74; Fri, 13 Jul 2018 19:39:23 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from redhat.com (octiron.msp.redhat.com [10.15.80.209]) by smtp.corp.redhat.com (Postfix) with SMTP id 5E4372026D6B; Fri, 13 Jul 2018 19:39:22 +0000 (UTC) Received: by redhat.com (sSMTP sendmail emulation); Fri, 13 Jul 2018 14:39:22 -0500 From: "Benjamin Marzinski" To: device-mapper development Date: Fri, 13 Jul 2018 14:39:08 -0500 Message-Id: <1531510755-16046-4-git-send-email-bmarzins@redhat.com> In-Reply-To: <1531510755-16046-1-git-send-email-bmarzins@redhat.com> References: <1531510755-16046-1-git-send-email-bmarzins@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: dm-devel@redhat.com Cc: Martin Wilck Subject: [dm-devel] [PATCH 03/10] multipath: fix setting conf->version X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 13 Jul 2018 19:39:27 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP Commit d3b71498 stopped multipath from setting conf->version. Instead, it was always being set to 0.0.0. Multipathd was still setting this correctly. Fixes: d3b71498 "multipath: fix rcu thread cancellation hang" Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- libmultipath/devmapper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c index f2befad..8136d15 100644 --- a/libmultipath/devmapper.c +++ b/libmultipath/devmapper.c @@ -245,13 +245,13 @@ void libmp_dm_init(void) int verbosity; unsigned int version[3]; + if (dm_prereq(version)) + exit(1); conf = get_multipath_config(); verbosity = conf->verbosity; - memcpy(version, conf->version, sizeof(version)); + memcpy(conf->version, version, sizeof(version)); put_multipath_config(conf); dm_init(verbosity); - if (dm_prereq(version)) - exit(1); dm_udev_set_sync_support(libmp_dm_udev_sync); }