svn commit: r335126 - head/stand/libsa

Toomas Soome tsoome at FreeBSD.org
Thu Jun 14 09:06:54 UTC 2018


Author: tsoome
Date: Thu Jun 14 09:06:53 2018
New Revision: 335126
URL: https://svnweb.freebsd.org/changeset/base/335126

Log:
  libsa: f_rabuf could be NULL
  
  It is possible that we will not get RA buffer from open(), therefore
  we must validate RA.

Modified:
  head/stand/libsa/read.c

Modified: head/stand/libsa/read.c
==============================================================================
--- head/stand/libsa/read.c	Thu Jun 14 08:58:10 2018	(r335125)
+++ head/stand/libsa/read.c	Thu Jun 14 09:06:53 2018	(r335126)
@@ -108,7 +108,7 @@ read(int fd, void *dest, size_t bcount)
 		}
 
 		/* will filling the readahead buffer again not help? */
-		if (resid >= SOPEN_RASIZE) {
+		if (f->f_rabuf == NULL || resid >= SOPEN_RASIZE) {
 			/*
 			 * bypass the rest of the request and leave the
 			 * buffer empty


More information about the svn-src-all mailing list