Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys
Module Name: src
Committed By: msaitoh
Date: Mon Aug 26 10:24:39 UTC 2019
Modified Files:
src/sys/kern: vfs_bio.c
src/sys/sys: buf.h
Log Message:
Change buf_nbuf()'s return value from int to u_int to avoid undefined
behavior in wapbl_start() which extended int to size_t.
Error message was:
> UBSan: Undefined Behavior in ../../../../kern/vfs_wapbl.c:609:41, signed integer overflow: 3345138 * 1024 cannot be represented in type 'int'
> /* XXX maybe use filesystem fragment size instead of 1024 */
> /* XXX fix actual number of buffers reserved per filesystem. */
> wl->wl_bufcount_max = (buf_nbuf() / 2) * 1024;
Need more work?
To generate a diff of this commit:
cvs rdiff -u -r1.278 -r1.279 src/sys/kern/vfs_bio.c
cvs rdiff -u -r1.130 -r1.131 src/sys/sys/buf.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index