The Hajj performed by a child is valid whether that child is discerning or not. Ibn ‘Abbaas, may Allaah be pleased with him, said, “A woman lifted up her young boy and said, ‘O Messenger of Allah, would this child be credited for performing Hajj?’ He answered: ‘Yes, and there would be a reward for you.’” [Muslim]..
More