Malik said, "Every forgetfulness which decreases from the prayer, prostrations for it come before the greeting, and every forgetfulness which is an addition to the prayer, prostrations for it come after the greeting."
USC-MSA web (English) : Book 3, Hadith 65
Arabic : Book 3, Hadith 212