Page MenuHomeFreeBSD

D20162.diff
No OneTemporary

D20162.diff

Index: head/sys/dev/nvdimm/nvdimm_spa.c
===================================================================
--- head/sys/dev/nvdimm/nvdimm_spa.c
+++ head/sys/dev/nvdimm/nvdimm_spa.c
@@ -177,6 +177,7 @@
error = 0;
if (dev->spa_kva == NULL) {
mattr = nvdimm_spa_memattr(dev);
+ bzero(&m, sizeof(m));
vm_page_initfake(&m, 0, mattr);
ma = &m;
while (uio->uio_resid > 0) {
@@ -276,7 +277,7 @@
mattr = nvdimm_spa_memattr(dev);
for (i = 0; i < nitems(ma); i++) {
- maa[i].flags = 0;
+ bzero(&maa[i], sizeof(maa[i]));
vm_page_initfake(&maa[i], dev->spa_phys_base +
trunc_page(bp->bio_offset) + PAGE_SIZE * i, mattr);
ma[i] = &maa[i];
Index: head/sys/x86/iommu/busdma_dmar.c
===================================================================
--- head/sys/x86/iommu/busdma_dmar.c
+++ head/sys/x86/iommu/busdma_dmar.c
@@ -689,7 +689,7 @@
*/
if (fma == NULL) {
fma = malloc(sizeof(struct vm_page) * ma_cnt,
- M_DEVBUF, mflags);
+ M_DEVBUF, M_ZERO | mflags);
if (fma == NULL) {
free(ma, M_DEVBUF);
return (ENOMEM);
@@ -743,7 +743,7 @@
*/
if (fma == NULL) {
fma = malloc(sizeof(struct vm_page) * ma_cnt,
- M_DEVBUF, mflags);
+ M_DEVBUF, M_ZERO | mflags);
if (fma == NULL) {
free(ma, M_DEVBUF);
return (ENOMEM);

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 19, 2:41 PM (22 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14718270
Default Alt Text
D20162.diff (1 KB)

Event Timeline