This wooden mushroom is a special tool for darning socks.

Darning is way to repair holes in knitted fabric using needle and thread. The sock is stretched over the curved top of the mushroom, and gathered tightly around the stalk to hold it in place for darning. 

Colour image of a pack of darning needles
Marks & Spencer darning needles, c1903-1920