svn commit: r344400 - stable/12/sys/dev/ioat
Alexander Motin
mav at FreeBSD.org
Thu Feb 21 00:17:25 UTC 2019
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
More information about the svn-src-stable-12
mailing list