Centre-back Oshilaja returned for his third loan spell at the Gills in July 2016, signing on a year-long deal from parent club Cardiff City.
The London-born defender had previously impressed during two stints at the MEMS Priestfield Stadium, one from August 2015 to January 2016, the other for the final two months of the 2015/16 League One season.
Oshilaja was already well known to the club's management staff having worked under Justin Edinburgh at Newport County (during a loan from October 2013 to January 2014), and assistant manager David Kerslake when he was number two to Malky Mackay at City.
He joined the Bluebirds aged 16, and signed professional terms with the Welsh club in April 2012. Oshilaja has made three cup game appearances for City to date.
A loan spell at AFC Wimbledon during the 2014/15 season saw him win their Young Player of the Year award.