]> git.baikalelectronics.ru Git - kernel.git/commit
staging/vme_user: fix usage of the slave resources after they've been freed
authorEmilio G. Cota <cota@braap.org>
Fri, 3 Dec 2010 09:05:08 +0000 (09:05 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Dec 2010 19:51:51 +0000 (11:51 -0800)
commit738b6d4761ad6af7fd4c801252d832f055ed498c
treeb151ff53d8601118c60db400bdd40a9ec068d59f
parent11ca2a92fe0b009a8648dd2a1f900c2e0a27f1ff
staging/vme_user: fix usage of the slave resources after they've been freed

buf_unalloc() frees the memory buffers allocated with vme_alloc_consistent.
The associated VME resource is needed in both vme_alloc_consistent and
vme_free_consistent; however the slave VME resources are being freed before
the calls to vme_free_consistent are made, which means the buffers
are never returned.

Fix this by freeing the VME resources only after the consistent buffers have
been returned.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/vme/devices/vme_user.c