Yes. Well, we are debating the likelihoods of corruption in different memory
areas here. I answer "Yes" because the swap entry involved in try_to_unmap_one()
comes from page->private when PageSwapCache is set (and the page is locked):
it requires either an mm bug, or corruption of struct page, for that swap entry
to be invalid for duplication. Memory corruption of entries in a user page
table seems to have been a more common case, whether because of single-bit memory
errors, or use-after-free bugs: that's the case which copy_one_pte() might meet.
:), ok, thanks a lot for your kind explanations.
For the sake of the stability of the system, I perfer to export all the error
value, and check it carefully.
But we were happy with void swap_duplicate() for many years.
If I wanted to make a further change, it would rather be to remove those
error returns from __swap_duplicate() which are not actually made use of.
Hugh
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>