ima: free duplicate measurement memory

Info about new measurements are cached in the iint for performance.  When
the inode is flushed from cache, the associated iint is flushed as well.
Subsequent access to the inode will cause the inode to be re-measured and
will attempt to add a duplicate entry to the measurement list.

This patch frees the duplicate measurement memory, fixing a memory leak.

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mtd: msm_nand: Allow CPU to take ownership of oob buffer while page read

In msm_nand_read_oob() while checking for an erased page the
ownership of the oob buffer is with DMA and CPU might read
corrupt data to decide upon erased page. The exact contents will
be updated only after dma_unmap_page() is called. Fix this by giving
ownership to CPU before checking for erased page.

CRs-Fixed: 285705
Signed-off-by: Sujith Reddy Thumma <sthumma@codeaurora.org>
(cherry picked from commit 7316b6561180820ca2198d137bc92c3e09e71738)

Change-Id: I8f29f26d0886af12bf61213a3020936da7185845
Signed-off-by: Sunil Joseph <sunilj@codeaurora.org>