Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
malik:3-65Mālik > Ibn Shihāb > Saʿīd b. al-Musayyab > Abū Salamah b. ʿAbd al-Raḥman Mithl Dhalik

Yahya related to me from Malik from Ibn Shihab from Said ibn al- Musayyab, and from Abu Salama ibn Abd ar-Rahman, the same as that. 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."  

مالك:٣-٦٥وَحَدَّثَنِي عَنْ مَالِكٍ عَنِ ابْنِ شِهَابٍ عَنْ سَعِيدِ بْنِ الْمُسَيَّبِ وَعَنْ أَبِي سَلَمَةَ بْنِ عَبْدِ الرَّحْمَنِ مِثْلَ ذَلِكَ

قَالَ مَالِكٌ كُلُّ سَهْوٍ كَانَ نُقْصَانًا مِنَ الصَّلاَةِ فَإِنَّ سُجُودَهُ قَبْلَ السَّلاَمِ وَكُلُّ سَهْوٍ كَانَ زِيَادَةً فِي الصَّلاَةِ فَإِنَّ سُجُودَهُ بَعْدَ السَّلاَمِ