Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3672476lfo; Mon, 23 May 2022 11:00:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXCRcdsLh3ohVZwa3gLXn63MB2P4zClVKPUMczJSOjlpVcReBYkxM7V1DfMQu+pCW+RO7C X-Received: by 2002:a17:90a:c7c5:b0:1df:45ca:ef8b with SMTP id gf5-20020a17090ac7c500b001df45caef8bmr207666pjb.15.1653328842290; Mon, 23 May 2022 11:00:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653328842; cv=none; d=google.com; s=arc-20160816; b=AkXfxqBnYAIa5H6/VmeIBIsjKlhuQ9Xb3SLSsse+//4RyDwcvTHTm0idKz5H0/js99 iTAW1xVzZNAxaqlTybb8VVgmRVcl2gVkFndSsRUkWrxmm9cjB4EwhkQwboXVLQidICZV yrs5GYaPeqn6v8ZClD1/0zpRCOfY1IboZL2+2yTVIPJk+Gu9N3etBas6OVda5pudVk4H W/mCMxy/6NXqOwyOc8SK3BsV4XKeXvwbWDKddQGzd9H8r//LGiT7nYQDOrkSO6lt58dI aNkuZVoehiCx3pjgAxqNFsZt81/alwYn0322KtpIQ7jTVtKRl+13v4Qr4mSrEVFUosjp ld6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=o5+YIhm+GN3pedF9Oznztj8W5FrUYyRnAODRxoBlc28=; b=lPSa6IMZolJGUokn+rp73FXFI7gc/opzfVx+hLlkghn5nX+ij/Jf7m15n3j9m/8Ijy q7oxv+7TqRxDnFN8i15OcYlj8PMOHEEcpw7VFnarm3CK2BLRlmvM8EKCw4oWNKvq5/do mFHM+bras+qu9NT2QXMBqVG1ewLmeHFG9NhKQ3QPJu1SMxx5SKgPMCZB6FQH+ssmSHpG UC2gfaahPkpEoItqNxFftEx7bKRJn/uuTlJzOXxyav8Hai5YAjd48DS4g8L6lSfTyxqk UdDpIQQ0tmGWcXW5A9J3zJEZhEl/huSpL95q77RSwrHIiJnMiW1nhMf+X2XPd7cxUBqN a3qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Eye72Eqh; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u1-20020a17090abb0100b001dfae2d90ddsi14979312pjr.90.2022.05.23.11.00.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 11:00:42 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Eye72Eqh; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 43AD5D411D; Mon, 23 May 2022 10:59:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243936AbiEWR53 (ORCPT + 99 others); Mon, 23 May 2022 13:57:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241899AbiEWRbe (ORCPT ); Mon, 23 May 2022 13:31:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AF436CAB8; Mon, 23 May 2022 10:26:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C45EA611E6; Mon, 23 May 2022 17:26:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C19E8C385A9; Mon, 23 May 2022 17:26:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653326796; bh=KRlYvPWMEKkubzqIFj6i84D49RI0Jy5hTL0Q+gTJ6io=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Eye72EqhGPYYiJAASWrhkvZoHLSEmyjDTuzxkek+uosQJohnIlesWAkLZO3uoEdeC 4Mtb1COjZZNiDO3Rrh9rElCHmOxx/2FOLdUn+S+SA5QpMqrO7IV66GpzGl9fRpTre/ Bkp0YyGH/ozoMCnGAfKnLzZwFIZRtT1zFazy22ks= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthew Wilcox , "Michael S. Tsirkin" , Sasha Levin Subject: [PATCH 5.17 034/158] tools/virtio: compile with -pthread Date: Mon, 23 May 2022 19:03:11 +0200 Message-Id: <20220523165836.159659672@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165830.581652127@linuxfoundation.org> References: <20220523165830.581652127@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael S. Tsirkin [ Upstream commit f03560a57c1f60db6ac23ffd9714e1c69e2f95c7 ] When using pthreads, one has to compile and link with -lpthread, otherwise e.g. glibc is not guaranteed to be reentrant. This replaces -lpthread. Reported-by: Matthew Wilcox Signed-off-by: Michael S. Tsirkin Signed-off-by: Sasha Levin --- tools/virtio/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/virtio/Makefile b/tools/virtio/Makefile index 0d7bbe49359d..1b25cc7c64bb 100644 --- a/tools/virtio/Makefile +++ b/tools/virtio/Makefile @@ -5,7 +5,8 @@ virtio_test: virtio_ring.o virtio_test.o vringh_test: vringh_test.o vringh.o virtio_ring.o CFLAGS += -g -O2 -Werror -Wno-maybe-uninitialized -Wall -I. -I../include/ -I ../../usr/include/ -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE -include ../../include/linux/kconfig.h -LDFLAGS += -lpthread +CFLAGS += -pthread +LDFLAGS += -pthread vpath %.c ../../drivers/virtio ../../drivers/vhost mod: ${MAKE} -C `pwd`/../.. M=`pwd`/vhost_test V=${V} -- 2.35.1