Correctly using MOSFETs
Your PMOS gate must tolerate the entire swing of Vin. Do not assume that Vgs_max is the same as Vds_max because it does 0% of the time from what I've seen.

The PMOS you have chosen has Vds_max = 12V, but Vgs_max = 8V and you plan to have Vin = 12V which will blow your PMOS the first time you pull its gate low.

R17 is necessary to turn the PMOS off by discharging the gate capacitance since the NMOS can't do anything to turn the PMOS off on its own.