aboutsummaryrefslogtreecommitdiff
path: root/kernel/time/tick-internal.h
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2012-07-16 15:34:24 -0700
committerBen Hutchings <ben@decadent.org.uk>2012-08-02 14:37:50 +0100
commit76191bb22af0d68261d5d9a9b6294d68133813e0 (patch)
tree19c46796f183260c19937c7615c4864a8d182397 /kernel/time/tick-internal.h
parentb67183922769604a26c7a5ed1560fb71fd805635 (diff)
target: Fix possible integer underflow in UNMAP emulation
commit b7fc7f3777582dea85156a821d78a522a0c083aa upstream. It's possible for an initiator to send us an UNMAP command with a descriptor that is less than 8 bytes; in that case it's really bad for us to set an unsigned int to that value, subtract 8 from it, and then use that as a limit for our loop (since the value will wrap around to a huge positive value). Fix this by making size be signed and only looping if size >= 16 (ie if we have at least a full descriptor available). Also remove offset as an obfuscated name for the constant 8. Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> [bwh: Backported to 3.2: adjust filename, context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'kernel/time/tick-internal.h')
0 files changed, 0 insertions, 0 deletions