aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2019-01-17 23:21:02 +0000
committerConrad Meyer <cem@FreeBSD.org>2019-01-17 23:21:02 +0000
commit236b57fe363a9ad8d827db6096d576a7ef315ac2 (patch)
tree9ea0894d30737b7aadc63931f05bcc78e46145a9
parent5e84b57828964e407a9de6e0ff32d5f0b73e8b86 (diff)
downloadsrc-236b57fe363a9ad8d827db6096d576a7ef315ac2.tar.gz
src-236b57fe363a9ad8d827db6096d576a7ef315ac2.zip
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. Sponsored by: Dell EMC Isilon
Notes
Notes: svn path=/head/; revision=343125
-rw-r--r--sys/dev/ioat/ioat.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ioat/ioat.h b/sys/dev/ioat/ioat.h
index ed13b45f48c5..c47261539e68 100644
--- a/sys/dev/ioat/ioat.h
+++ b/sys/dev/ioat/ioat.h
@@ -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