drm/nouveau: fix notifier memory corruption bug
commite0b0be738453aabea3ada4617a7f30c020deb9d3
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Tue, 19 Apr 2011 21:50:48 +0000 (19 23:50 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 May 2011 16:19:36 +0000 (2 09:19 -0700)
treed82a047d90424164f8b77dc853e4ee26618eb8d1
parentc5fd52b24b7ea7ba603e99e33235857e3deeee3f
drm/nouveau: fix notifier memory corruption bug

commit a18d89ca026140eb8ac4459bf70a01c571dd9a32 upstream.

nouveau_bo_wr32 expects offset to be in words, but we pass value in bytes,
so after commit 73412c3854c877e5f37ad944ee8977addde4d35a ("drm/nouveau: allocate
kernel's notifier object at end of block") we started to overwrite some memory
after notifier buffer object (previously m2mf_ntfy was always 0, so it didn't
matter it was a value in bytes).

Reported-by: Dominik Brodowski <linux@dominikbrodowski.net>
Reported-by: Nigel Cunningham <lkml@nigelcunningham.com.au>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/nouveau/nouveau_fbcon.c