drm/nouveau/kms/nv04: use vzalloc for nv04_display
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 7 Mar 2021 17:48:53 +0000 (12:48 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:05:11 +0000 (11:05 +0100)
commitd2a6d606e6d35e3f53cee13b406c5c7e6a5df86a
tree59d078df918f80fdb22426d43c0bcb3c14e9a25d
parent3bf997ec299cdf7280b2039806e5e1d847df111a
drm/nouveau/kms/nv04: use vzalloc for nv04_display

commit bd6e07e72f37f34535bec7eebc807e5fcfe37b43 upstream.

The struct is giant, and triggers an order-7 allocation (512K). There is
no reason for this to be kmalloc-type memory, so switch to vmalloc. This
should help loading nouveau on low-memory and/or long-running systems.

Reported-by: Nathan E. Egge <unlord@xiph.org>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests/10
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/nouveau/dispnv04/disp.c