In terms of physical safety, it's completely fine.
The main, and really only concern, is that they greatly potentiate each other and can make you uncomfortably high. Even if you are a veteran smoker with high tolerance to cannabis.
Cannabis can be nice on the tail end of mushrooms. It can bring the trip back if smoked on the comedown. It will make you hallucinate more intensely if taken during the trip.
if it's your first time with shrooms I would avoid it until after about 5 or 6 hours.
It can be a great combo and most people do it, just be careful. Avoid edibles.
Ultimately, if you are feeling anxious or the shrooms are effecting you negatively, do not smoke weed. Otherwise fun and benign combo. Can be surprisingly powerful.