Magnetism of cold fermionic atoms on the p band of an optical lattice