Police quell riot at prison