[RFC PATCH 13/15] FIXME: fs: fix memory access for 64bit MIPS

Peter Mamonov pmamonov at gmail.com
Thu May 17 06:58:56 PDT 2018


Address 0xFFFFFFFFxxxxxxxx is a valid MIPS64 address.

Signed-off-by: Peter Mamonov <pmamonov at gmail.com>
---
 fs/fs.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/fs/fs.c b/fs/fs.c
index b66cc9b17..d4965c85e 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -962,8 +962,6 @@ loff_t lseek(int fildes, loff_t offset, int whence)
 	case SEEK_SET:
 		if (f->size != FILE_SIZE_STREAM && offset > f->size)
 			goto out;
-		if (offset < 0)
-			goto out;
 		pos = offset;
 		break;
 	case SEEK_CUR:
@@ -981,10 +979,6 @@ loff_t lseek(int fildes, loff_t offset, int whence)
 	}
 
 	pos = fsdrv->lseek(&f->fsdev->dev, f, pos);
-	if (pos < 0) {
-		errno = -pos;
-		return -1;
-	}
 
 	return pos;
 
-- 
2.17.0




More information about the barebox mailing list