Well done to the crew. You see smoke....you get it down. You can always ask questions later. And there is no way the F/O should have left the flight deck as some have suggested. He's paid to fly the plane!
Dry ice is permitted on board aircraft in restricted quantities, even in passengers handbaggage, as long as it is in a 'breathable' container, etc. (Used to chill samples, etc.) This is a standard exception to the Dangerous Goods Regulations, applied at most/all airlines.