DF-2404
Memory leak of sc->sc_rng_co callout array on driver detach
Summary
rdrand_attach kmalloc()s ncpus-element callout array into sc->sc_rng_co but rdrand_detach only callout_terminate()s each entry and never kfree()s the array. Every kldunload of rdrand module leaks ncpus*sizeof(struct callout*) bytes of kernel heap (M_TEMP). DRIVER_MODULE passes NULL NULL for evh/arg softc freed by bus framework this allocation has no other owner permanently lost. Repeated load/unload cycles accumulate leaked kmalloc(M_TEMP) slabs proportional to ncpus.
No comments yet.