Taking control of an aircraft from a pilot in command without their consent would normally be an offence under s. 7.3(1) and 7.41 of the Aeronautics Act (but I'm doubtful that the act of the passenger in your scenario is "endangering the safety" of the aircraft) and possibly s. 76 of the Criminal Code (I'm also doubtful that the mens rea is met in the specific scenario you describe). Restraining the pilot would be at least plain assault (Criminal Code, s. 265).
Regardless, in your scenario, the otherwise illegal acts of the passenger would most likely be justified by self-defence (in response to force or threat of force) or the defence of necessity (no reasonable legal alternative to avoid imminent peril).
Possible offences for the pilot: murder, attempted murder, manslaughter, criminal negligence causing bodily harm, criminal negligence causing death. Oddly, the offence of "endangering the safety of an aircraft" (Criminal Code, s. 77) does not seem to apply here.