On Thu, 12 May 2011 22:17:10 +0100, Chris Wilson <ch...@chris-wilson.co.uk> wrote:
> + pages = kmalloc(n*sizeof(struct page *), > + GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN); > + if (pages == NULL) { > + pages = drm_malloc_ab(n, sizeof(struct page *)); > + if (pages == NULL) { > + *pages_out = NULL; > + *num_pages = 0; > + return -ENOMEM; > + } > + } Please use drm_malloc_ab here unconditionally; you've got a potential multiplication overflow, and drm_malloc_ab already uses kmalloc for small amounts anyways. Otherwise, this looks good to me. -- keith.pack...@intel.com
pgpTToZHp28Kg.pgp
Description: PGP signature
_______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx