agp: zero pages before sending to userspace

AGP pages might be mapped into userspace finally, so the pages should be
set to zero before userspace can use it. Otherwise there is potential
information leakage.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by Shaohua Li and committed by Dave Airlie 59de2beb 07f1c7a7

+2 -2
+2 -2
drivers/char/agp/generic.c
··· 1226 1226 int i, ret = -ENOMEM; 1227 1227 1228 1228 for (i = 0; i < num_pages; i++) { 1229 - page = alloc_page(GFP_KERNEL | GFP_DMA32); 1229 + page = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO); 1230 1230 /* agp_free_memory() needs gart address */ 1231 1231 if (page == NULL) 1232 1232 goto out; ··· 1257 1257 { 1258 1258 struct page * page; 1259 1259 1260 - page = alloc_page(GFP_KERNEL | GFP_DMA32); 1260 + page = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO); 1261 1261 if (page == NULL) 1262 1262 return NULL; 1263 1263