drm/nouveau/pm: Prevent overflow in nouveau_perf_init()
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 11 Jun 2011 12:30:32 +0000 (13:30 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Sat, 18 Jun 2011 04:38:38 +0000 (14:38 +1000)
While parsing the perf table, there is no check if
the num of entries read from the vbios is less than
the currently allocated number.

In case of a buggy vbios this will cause overwriting
of kernel memory, causing aditional problems.

Add a simple check in order to prevent the case

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

No differences found