Skip to content

Commit

Permalink
percpu: perform tlb flush after pcpu_map_pages() failure
Browse files Browse the repository at this point in the history
If pcpu_map_pages() fails midway, it unmaps the already mapped pages.
Currently, it doesn't flush tlb after the partial unmapping.  This may
be okay in most cases as the established mapping hasn't been used at
that point but it can go wrong and when it goes wrong it'd be
extremely difficult to track down.

Flush tlb after the partial unmapping.

Signed-off-by: Tejun Heo <[email protected]>
Cc: [email protected]
  • Loading branch information
htejun committed Aug 15, 2014
1 parent f0d2796 commit 849f516
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/percpu-vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ static int pcpu_map_pages(struct pcpu_chunk *chunk,
__pcpu_unmap_pages(pcpu_chunk_addr(chunk, tcpu, page_start),
page_end - page_start);
}
pcpu_post_unmap_tlb_flush(chunk, page_start, page_end);
return err;
}

Expand Down

0 comments on commit 849f516

Please sign in to comment.