diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-06-28 11:27:47 +0100 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-06-29 19:09:13 -0700 |
commit | 79d2427338e8da362678de32a1c8af1dc8a9810a (patch) | |
tree | 5f1018e11a501c24ce9a5bc978a6df49d5adc4dc /arch | |
parent | dc501fbc4389f6c15a8da14684b5926e0d9553da (diff) | |
download | linux-3.10-79d2427338e8da362678de32a1c8af1dc8a9810a.tar.gz linux-3.10-79d2427338e8da362678de32a1c8af1dc8a9810a.tar.bz2 linux-3.10-79d2427338e8da362678de32a1c8af1dc8a9810a.zip |
drm/i915/overlay: Fix unpinning along init error paths
As pointed out by Dan Carpenter, it was seemingly possible to hit an error
whilst mapping the buffer for the regs (except the only likely error
returns should not happen during init) and so leak a pin count on the
bo. To handle this we would need to reacquire the struct mutex, so for
simplicity rearrange for the lock to be held for the entire function.
For extra pedagogy, test that we only call init once.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions