ref: cac4c54b65ca241b996f0d59311c1f57e692cd1a
parent: e8779a0681dd77f772157724aff106d7a0a0fa78
author: Jacob Moody <moody@posixcafe.org>
date: Fri May 26 10:05:11 EDT 2023
kernel: sdram: do not use xalloc for SDev This was a sleeping bug, the unconfigure routine was never called so the SDev structure was never freed. Now that fshalt unconfigures the drives before powering off, the fact that this was alloc'd with xalloc causes a panic. Found by sigrid, tested by sl and myself.
--- a/sys/src/9/port/sdram.c
+++ b/sys/src/9/port/sdram.c
@@ -169,7 +169,7 @@
{
SDev *sdev;
- sdev = xalloc(sizeof(SDev));
+ sdev = malloc(sizeof(SDev));
if(sdev == nil)
return nil;
--
⑨