In the presence of magnetic fields, we studied the giant magnetoresistance (MR) effect of Dirac fermions in graphene and silicene, which is related to the spin and valley degrees of freedom. It is found that the electron could resonantly tunnel through the parallel magnetization configuration, but it is blocked in the antiparallel situation. Such a transmission difference leads to a giant MR ratio, which can be controllable electrically in silicene. Furthermore, for the asymmetric structure in silicene, the transport depends strongly on the spin and valley degrees of freedom. Accordingly, this MR device achieves a remarkable spin-valley polarized current which can be effectively controlled by the magnetic fields and electric fields.