General Motors has agreed to a $900 million settlement with the U.S. Justice Department for concealing an ignition switch defect that resulted in many deaths and forced the automaker to recall a large number of vehicles.