mips busdma: bzero map on alloc
Maps from the mips busdma dmamap_zone were not completely initialized. In particular, pagesneeded and pagesreserved were not initialized. This could cause a crash. Remove some dead fields from mips struct bus_dmamap while here. Reported by: brooks Reviewed by: ian Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D22638
This commit is contained in:
parent
39883ef6ae
commit
aa4e741821
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355343
@ -156,8 +156,6 @@ struct bus_dmamap {
|
||||
bus_dma_tag_t dmat;
|
||||
struct memdesc mem;
|
||||
int flags;
|
||||
void *origbuffer;
|
||||
void *allocbuffer;
|
||||
TAILQ_ENTRY(bus_dmamap) freelist;
|
||||
STAILQ_ENTRY(bus_dmamap) links;
|
||||
bus_dmamap_callback_t *callback;
|
||||
@ -205,11 +203,8 @@ dmamap_ctor(void *mem, int size, void *arg, int flags)
|
||||
|
||||
dmat->map_count++;
|
||||
|
||||
bzero(map, sizeof(*map));
|
||||
map->dmat = dmat;
|
||||
map->flags = 0;
|
||||
map->slist = NULL;
|
||||
map->allocbuffer = NULL;
|
||||
map->sync_count = 0;
|
||||
STAILQ_INIT(&map->bpages);
|
||||
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user