From nobody Sat Mar 05 14:41:14 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D8B891A0A95A; Sat, 5 Mar 2022 14:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K9nTk5mT7z4kF3; Sat, 5 Mar 2022 14:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646491274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LRMp+QIQmBtfRmjb7fVuUgomI+YcC+1Dm5DLrxAGMBY=; b=ZKXbXYDVKpFl7RqxsGzxFiXjdrxJg1/YorqZ2w6YG+RFl5Bq8zwNSygVOC4wtufqZOPLPt XQaMISBQxCl918yUu7ZGgiaE/q6x5ROqg6D6EINSwpsnW/sp8qPNvyJC/hQjXV7W93OiK+ keBJpwnX1HlatNe5vPJjp6bgLrxIX5TKWmxBYnNru9tT2P6UJroFNDntX2dh2tEag/IFSy wAjxnq7pNy5TXRxTxISGfT/yvN8Gbz+3YY8eo4Ueob6lfWW9qpCB9pPSYfz9uzQpdCjHxD ZpbjxBTH0yszcDNZc+0CtuZK5sO9aeHPZLqLZCcRjtVHVXHz6XEAMYZm0srNYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A670422158; Sat, 5 Mar 2022 14:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 225EfE1d098654; Sat, 5 Mar 2022 14:41:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 225EfE8l098653; Sat, 5 Mar 2022 14:41:14 GMT (envelope-from git) Date: Sat, 5 Mar 2022 14:41:14 GMT Message-Id: <202203051441.225EfE8l098653@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 4340df3418ec - stable/13 - libusb(3): Ignore SIGPIPE when initializing the LibUSB v1.0 API. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4340df3418ecea57b5e48dec94ac4b1d4f760aca Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646491274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LRMp+QIQmBtfRmjb7fVuUgomI+YcC+1Dm5DLrxAGMBY=; b=qcKdUoJVxp50BRkPfi70RsGjuDmfLTmmVRAYinLLEo07kBBRePPeCef3I81jGveSDYJaC6 yIq+PWU1bxNx1U6iE5qQQ36zOzvbdV/5bM2D93v2eOJDfr2Ln4z+JcIpqjwQ7tUDn1+yRV ngQXAQ9GR8Bv6h7wj7hKNVePbh0m+bZPwxRIAkbizuGNdWS66AC2HrrMEVl3LJafYYVkE0 IgT8H4kAdkcr9FSB5UT51Y0pDQrR4DNChJmAlkjiCMefcbqS2c8ATv6GlFsV0M/Ug3Fc1G BxivceiehtHCkE8VDl7PGjfjfviEWMMGfCwzRhkUrRfGnOiIZ1tSl7tP0mQLfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646491274; a=rsa-sha256; cv=none; b=Ph2RayWdnGl0td/TN6BWQNj4/fO0nJ9DoeIPQ2LFietv+oa7/3+Xm/lHkVY0s+WVxUzOCn xgbdiv8SQziC4bgGCUPBkHwAXaWysrSJCWAWj4KjyTsY2P025MVxfVdmQjLZ53yNcok0TE wlJRHQlkNAV+l+X7RJ2mbVxIiOPnm0HsV0VAt1vpGtUcSMvRJ65HJ5oi///Qyl1UioS5s1 P+4ipl6OfzHHz+QQY7XyszEnqs0plOQh/Cd+11NJjJNNGKlrNf2LppM/6PKbpHcOOocr1+ pwWbTJ12x3lHGeha6YvcV0c61LPL3q5/pqb1IeiCJC1kupRFtG8vmtxaPBYoKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=4340df3418ecea57b5e48dec94ac4b1d4f760aca commit 4340df3418ecea57b5e48dec94ac4b1d4f760aca Author: Hans Petter Selasky AuthorDate: 2022-03-02 11:31:27 +0000 Commit: Hans Petter Selasky CommitDate: 2022-03-05 14:40:08 +0000 libusb(3): Ignore SIGPIPE when initializing the LibUSB v1.0 API. The LibUSB v1.0 emulation layer uses pipes internally to signal between threads. When USB devices are reset, as part of loading firmware, SIGPIPE may happen, and that is expected and should be ignored. PR: 261891 Sponsored by: NVIDIA Networking (cherry picked from commit d94d94e2c06b4331f706a3b4eca058041294ea05) --- lib/libusb/libusb10.c | 3 +++ lib/libusb/libusb_global_linux.h | 1 + 2 files changed, 4 insertions(+) diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c index ffe0cf3f366a..ecfffde555aa 100644 --- a/lib/libusb/libusb10.c +++ b/lib/libusb/libusb10.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -226,6 +227,8 @@ libusb_init(libusb_context **context) DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_init complete"); + signal(SIGPIPE, SIG_IGN); + return (0); } diff --git a/lib/libusb/libusb_global_linux.h b/lib/libusb/libusb_global_linux.h index 9886bd4486f5..3e83bb2a6ea4 100644 --- a/lib/libusb/libusb_global_linux.h +++ b/lib/libusb/libusb_global_linux.h @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include