A second supplier in the Mac Miller overdose case is admitting wrongdoing ... copping a plea with the feds that could see him do serious time.
38-year-old Ryan Reavis pled guilty this week to a single count of distributing fentanyl. He faces up to 20 years behind bars and a lifetime of supervised release -- but it's likely he'll receive a lesser sentence for accepting the plea deal.
Cops had busted Reavis in Arizona, so it wasn't entirely clear how he was connected to Mac's death -- but now we know, according to feds, Reavis was in L.A. around the time the fatal pills were procured for Mac.
Prosecutors say he ended up giving the fentanyl-laced oxycodone pills to MM's alleged drug dealer, Cameron Pettit ... on orders from Stephen Walter, who also recently pleaded guilty to distributing fentanyl.
As we reported ... when cops busted Reavis in 2019, their charging docs noted officers found a doctor's prescription pad at his home.