Re: svn commit: r324444 - head/sys/kern

2017-10-09 Thread Cy Schubert
In message <201710091819.v99ij6ob009...@repo.freebsd.org>, Alan Cox writes:
> Author: alc
> Date: Mon Oct  9 18:19:06 2017
> New Revision: 32
> URL: https://svnweb.freebsd.org/changeset/base/32
> 
> Log:
>   The recent change to initialization of blists (r324420) relied on '-1'
>   appearing only where the code explicitly set it, but since much of the
>   data was not initialized, '-1' appeared other places too, and led to
>   panics.  Clear the allocated data before initializing nonzero values by
>   allocating with M_ZERO.
>   
>   Submitted by:   Doug Moore 
>   Reported by:Oleg V. Nauman , cy
>   Tested by:  Oleg V. Nauman 
>   MFC after:  1 week
>   X-MFC with: r324420
>   Differential Revision:  https://reviews.freebsd.org/D12627

Thanks. This fixes the recurring panic on one of my machines.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.




___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r324444 - head/sys/kern

2017-10-09 Thread Alan Cox
Author: alc
Date: Mon Oct  9 18:19:06 2017
New Revision: 32
URL: https://svnweb.freebsd.org/changeset/base/32

Log:
  The recent change to initialization of blists (r324420) relied on '-1'
  appearing only where the code explicitly set it, but since much of the
  data was not initialized, '-1' appeared other places too, and led to
  panics.  Clear the allocated data before initializing nonzero values by
  allocating with M_ZERO.
  
  Submitted by: Doug Moore 
  Reported by:  Oleg V. Nauman , cy
  Tested by:Oleg V. Nauman 
  MFC after:1 week
  X-MFC with:   r324420
  Differential Revision:https://reviews.freebsd.org/D12627

Modified:
  head/sys/kern/subr_blist.c

Modified: head/sys/kern/subr_blist.c
==
--- head/sys/kern/subr_blist.c  Mon Oct  9 18:00:40 2017(r324443)
+++ head/sys/kern/subr_blist.c  Mon Oct  9 18:19:06 2017(r32)
@@ -248,7 +248,8 @@ blist_create(daddr_t blocks, int flags)
nodes += last_block + 1;
last_block /= BLIST_META_RADIX;
}
-   bl = malloc(offsetof(struct blist, bl_root[nodes]), M_SWAP, flags);
+   bl = malloc(offsetof(struct blist, bl_root[nodes]), M_SWAP, flags |
+   M_ZERO);
if (bl == NULL)
return (NULL);
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"