A suicide bomber has targeted mourners at a Shiite mosque south of Baghdad, killing 27 people, police and a doctor say, the latest in a series of attacks on funerals.