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