HomeFreeBSD

quota(1): Fix calculation overflow and underflow

Description

quota(1): Fix calculation overflow and underflow

For very large quotas, do the multiplication as a 64 bit value to avoid
overflow.

For very small block sizes (smaller than DEV_BSIZE), multiple first
before dividing by block size to avoid underflow.

PR: 227496
Submitted by: Per Andersson <pa AT chalmers.se>
Sponsored by: Dell EMC Isilon

Details

Provenance
cemAuthored on
Parents
rS332631: lio_listio: return EAGAIN instead of EIO when out of resources
Branches
Unknown
Tags
Unknown