Skip to content

Commit

Permalink
fs: inode: don't use movable allocations
Browse files Browse the repository at this point in the history
Movable allocation requests can get CMA memory.
CMA memory is mapped as non-cached normal memory.
f2fs code can perform test_bit operations on the memory
allocated, which inturn uses ldr/str exclusive instuctions
on ARM. ldr/str exclusive instructions casue unhandled
exceptions and kernel panics.

[ 6934.858377] Unhandled fault: unknown 53 (0x96000035) at 0xffffffc0699c1000
[ 6934.866608] Internal error: : 96000035 [#1] PREEMPT SMP
[ 6934.871883] CPU: 1 PID: 666 Comm: LazyTaskWriterT Tainted: G        W    3.10.40-g3bdd559-dirty #39
[ 6934.880975] task: ffffffc06079a040 ti: ffffffc02a7bc000 task.ti: ffffffc02a7bc000
[ 6934.888565] PC is at test_and_clear_bit+0x14/0x40
[ 6934.893304] LR is at f2fs_delete_entry+0xd8/0x28c

Bug 1550455

Change-Id: I9645296a052301820063b9737bf06c8c9e059986
Signed-off-by: Krishna Reddy <[email protected]>
  • Loading branch information
Krishna Reddy authored and Rom Lemarchand committed Sep 25, 2014
1 parent 19eaf84 commit 94f09fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ grow_dev_page(struct block_device *bdev, sector_t block,
int ret = 0; /* Will call free_more_memory() */

page = find_or_create_page(inode->i_mapping, index,
(mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS)|__GFP_MOVABLE);
(mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS));
if (!page)
return ret;

Expand Down
2 changes: 1 addition & 1 deletion fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ int inode_init_always(struct super_block *sb, struct inode *inode)
mapping->a_ops = &empty_aops;
mapping->host = inode;
mapping->flags = 0;
mapping_set_gfp_mask(mapping, GFP_HIGHUSER_MOVABLE);
mapping_set_gfp_mask(mapping, GFP_HIGHUSER);
mapping->private_data = NULL;
mapping->backing_dev_info = &default_backing_dev_info;
mapping->writeback_index = 0;
Expand Down

0 comments on commit 94f09fd

Please sign in to comment.