Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Feb 2019 00:17:24 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
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
Message-ID:  <201902210017.x1L0HOfv005842@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902210017.x1L0HOfv005842>