A motorway in South Yorkshire has been closed after police were called over concern for safety.