In a medium saucepan, whisk together flour, milk, and salt until smooth.
Turn heat to medium-high and, whisking constantly, cook until mixture becomes thick like a pudding, approximately 2-3 minutes.
Remove from the heat and whisk in vanilla.
Scrape into a heatproof bowl and cover surface of pudding with plastic wrap to prevent a skin from forming.
Cool mixture completely in the refrigerator for approximately 30 minutes. You can also place the bowl in the freezer to cool or over an ice-water bath.
In the bowl of an electric mixer using the whip attachment, beat the butter and sugar until light and fluffy.
Add spoonfuls of the cooled pudding and continue to beat until frosting looks light and fluffy.
Use at once.
Notes
Makes approximately 4 cups or enough to fill and frost a 2 layer, 9-inch cake