lkml.org 
[lkml]   [2015]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [2/2] cxl: Fix force unmapping mmaps of contexts allocated through the kernel api
Date
On Thu, 2015-27-08 at 09:50:19 UTC, Ian Munsie wrote:
> From: Ian Munsie <imunsie@au1.ibm.com>
>
> The cxl user api uses the address_space associated with the file when we
> need to force unmap all cxl mmap regions (e.g. on eeh, driver detach,
> etc). Currently, contexts allocated through the kernel api do not do
> this and instead skip the mmap invalidation, potentially allowing them
> to poke at the hardware after such an event, which may cause all sorts
> of trouble.
>
> This patch allocates an address_space for cxl contexts allocated through
> the kernel api so that the same invalidate path will for these contexts
> as well. We don't use the anonymous inode's address_space, as doing so
> could invalidate any mmaps of completely unrelated drivers using
> anonymous file descriptors.
>
> This patch also introduces a kernelapi flag, so we know when freeing the
> context if the address_space was allocated by us and needs to be freed.
>
> Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/55e07668fbba9466e6a9ef76

cheers


\
 
 \ /
  Last update: 2015-08-30 23:41    [W:0.038 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site