cuse(3): Fix an off-by-one.

The page allocation limit is inclusive and not exclusive.

MFC after:	1 week
Sponsored by:	NVIDIA Networking
This commit is contained in:
Hans Petter Selasky 2022-07-13 15:53:49 +02:00
parent 0811ce5723
commit 0996dd7df6

View File

@ -1159,7 +1159,7 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd,
error = ENOMEM;
break;
}
if (pai->page_count >= CUSE_ALLOC_PAGES_MAX) {
if (pai->page_count > CUSE_ALLOC_PAGES_MAX) {
error = ENOMEM;
break;
}