1) If gcc can detect the unnecessary NULL check, cant it warn about it? or coverity give a DEAD_CODE notification?
2) Does anyone use personality(SVR4) these days? The older personalities could be moved behind a switch (/proc/sys/vm/legacy_personality = 0), where the default is off. While it is only small part of this exploit, this would again make future exploits slighly harder (until someone notices another piece of ignored legacy code).