FAR 91.19 says:
Carriage of narcotic drugs, marihuana, and depressant or stimulant drugs or substances.
(a) Except as provided in paragraph (b) of this section, no person may
operate a civil aircraft within the United States with
knowledge that narcotic drugs, marihuana, and depressant or
stimulant drugs or substances as defined in Federal or State statutes
are carried in the aircraft.
(b) Paragraph (a) of this section does not apply to any carriage of narcotic drugs, marihuana, and depressant or stimulant drugs or
substances authorized by or under any Federal or State statute or by
any Federal or State agency.
So the FAA seems to say that if you know about it than you should not take the flight. This makes it seem that if you started to smell pot smoke while you flying you now have knowledge of it and should take some action. Also FAR 91.17 says:
Alcohol or drugs.
(a) No person may act or attempt to act as a crewmember of a civil aircraft—
(1) Within 8 hours after the consumption of any alcoholic beverage;
(2) While under the influence of alcohol;
(3) While using any drug that affects the person's faculties in any way contrary to safety; or
(4) While having an alcohol concentration of 0.04 or greater in a blood or breath specimen. Alcohol concentration means grams of alcohol
per deciliter of blood or grams of alcohol per 210 liters of breath.
(b) Except in an emergency, no pilot of a civil aircraft may allow a person who appears to be intoxicated or who demonstrates by manner
or physical indications that the individual is under the influence of
drugs (except a medical patient under proper care) to be carried in
(c) A crewmember shall do the following:
(1) On request of a law enforcement officer, submit to a test to indicate the alcohol concentration in the blood or breath, when—
(i) The law enforcement officer is authorized under State or local law to conduct the test or to have the test conducted; and
(ii) The law enforcement officer is requesting submission to the test to investigate a suspected violation of State or local law
governing the same or substantially similar conduct prohibited by
paragraph (a)(1), (a)(2), or (a)(4) of this section.
(2) Whenever the FAA has a reasonable basis to believe that a person may have violated paragraph (a)(1), (a)(2), or (a)(4) of this
section, on request of the FAA, that person must furnish to the FAA
the results, or authorize any clinic, hospital, or doctor, or other
person to release to the FAA, the results of each test taken within 4
hours after acting or attempting to act as a crewmember that indicates
an alcohol concentration in the blood or breath specimen.
(d) Whenever the Administrator has a reasonable basis to believe that a person may have violated paragraph (a)(3) of this section, that
person shall, upon request by the Administrator, furnish the
Administrator, or authorize any clinic, hospital, doctor, or other
person to release to the Administrator, the results of each test taken
within 4 hours after acting or attempting to act as a crewmember that
indicates the presence of any drugs in the body.
(e) Any test information obtained by the Administrator under paragraph (c) or (d) of this section may be evaluated in determining a
person's qualifications for any airman certificate or possible
violations of this chapter and may be used as evidence in any legal
proceeding under section 602, 609, or 901 of the Federal Aviation Act
This means that as the pilot you need to stay sober and this likely why the pilots of the aircraft donned their (I'm assuming oxygen) masks. This however, is only the Federal Aviation Regulations. That is, Title 14 (Aeronautics and Space) of the Code of Federal Regulations. So even though the FAA might take a blind eye to you if your passengers had marijuana or cocaine or some other illegal substance and you had no knowledge it still doesn't mean that Federal, State, or local law enforcement couldn't try to nail you on possession charges. I would say pretty safely that as the pilot as soon as you find out there are illegal drugs on board it is your obligation to reduce exposure to the crew and to discontinue flight as soon AS SAFELY possible.