+-- On Thu, 16 Nov 2017, Paolo Bonzini wrote --+ | you don't need to change the invalid values to sane ones. Instead, make | ps2_common_post_load return an int (just like the .post_load member of | VMStateDescription). You can then detect out of range count/rptr/wptr | and return -1 for bad indices. | | In the callers, | | ps2_common_post_load(ps2); | | return 0; | | can then become simply | | return ps2_common_post_load(ps2);
Okay; Sent a revised patch v2. Thank you. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F