Thread (46 messages) read the whole thread 46 messages, 4 authors, 2021-10-27

Re: [PATCH v9 27/31] fanotify: Emit generic error info for error event

From: Jan Kara <jack@suse.cz>
Date: 2021-10-26 12:11:06
Also in: linux-ext4, linux-fsdevel

On Mon 25-10-21 16:27:42, Gabriel Krisman Bertazi wrote:
The error info is a record sent to users on FAN_FS_ERROR events
documenting the type of error.  It also carries an error count,
documenting how many errors were observed since the last reporting.

Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Gabriel Krisman Bertazi <redacted>
...
quoted hunk ↗ jump to hunk
@@ -530,6 +557,14 @@ static int copy_info_records_to_user(struct fanotify_event *event,
 		total_bytes += ret;
 	}
 
+	if (fanotify_is_error_event(event->mask)) {
+		ret = copy_error_info_to_user(event, buf, count);
+		if (ret < 0)
+			return ret;
+		buf += ret;
+		count -= ret;
+	}
+
 	return total_bytes;
 }
This is currently harmless but we should add

total_bytes += ret;

here as well.

								Honza
-- 
Jan Kara [off-list ref]
SUSE Labs, CR
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help