From owner-svn-src-all@freebsd.org Thu Feb 21 00:17:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6561814E215C; Thu, 21 Feb 2019 00:17:25 +0000 (UTC) (envelope-from mav@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0687E76955; Thu, 21 Feb 2019 00:17:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7CCFD2C8; Thu, 21 Feb 2019 00:17:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1L0HObJ005843; Thu, 21 Feb 2019 00:17:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1L0HOfv005842; Thu, 21 Feb 2019 00:17:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201902210017.x1L0HOfv005842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 21 Feb 2019 00:17:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344400 - stable/12/sys/dev/ioat X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/ioat X-SVN-Commit-Revision: 344400 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0687E76955 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2019 00:17:25 -0000 Author: mav Date: Thu Feb 21 00:17:24 2019 New Revision: 344400 URL: https://svnweb.freebsd.org/changeset/base/344400 Log: MFC r343125 (by cem): ioat(4): Set __result_use_check on ioat_acquire_reserve Even M_WAITOK callers must check for failure. For example, if the device is quiescing, either due to automatic error-recovery induced reset, or due to administrative detach, the routine will return ENXIO and the acquire reference will not be held. So, there is no mode in which it is safe to assume the routine succeeds without checking. Modified: stable/12/sys/dev/ioat/ioat.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ioat/ioat.h ============================================================================== --- stable/12/sys/dev/ioat/ioat.h Wed Feb 20 23:55:35 2019 (r344399) +++ stable/12/sys/dev/ioat/ioat.h Thu Feb 21 00:17:24 2019 (r344400) @@ -173,7 +173,8 @@ void ioat_release(bus_dmaengine_t dmaengine); * * On failure, the caller does not hold the dmaengine. */ -int ioat_acquire_reserve(bus_dmaengine_t dmaengine, unsigned n, int mflags); +int ioat_acquire_reserve(bus_dmaengine_t dmaengine, unsigned n, int mflags) + __result_use_check; /* * Issue a blockfill operation. The 64-bit pattern 'fillpattern' is written to