Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] ntfs: kmap_atomic() atomicity fix

The KM_BIO_SRC_IRQ kmap slot requires local irq protection.

Acked-by: Anton Altaparmakov <aia21@cantab.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andrew Morton and committed by
Linus Torvalds
fa8609da 3896625d

+4
+4
fs/ntfs/aops.c
··· 92 92 ofs = 0; 93 93 if (file_ofs < init_size) 94 94 ofs = init_size - file_ofs; 95 + local_irq_save(flags); 95 96 kaddr = kmap_atomic(page, KM_BIO_SRC_IRQ); 96 97 memset(kaddr + bh_offset(bh) + ofs, 0, 97 98 bh->b_size - ofs); 98 99 kunmap_atomic(kaddr, KM_BIO_SRC_IRQ); 100 + local_irq_restore(flags); 99 101 flush_dcache_page(page); 100 102 } 101 103 } else { ··· 145 143 recs = PAGE_CACHE_SIZE / rec_size; 146 144 /* Should have been verified before we got here... */ 147 145 BUG_ON(!recs); 146 + local_irq_save(flags); 148 147 kaddr = kmap_atomic(page, KM_BIO_SRC_IRQ); 149 148 for (i = 0; i < recs; i++) 150 149 post_read_mst_fixup((NTFS_RECORD*)(kaddr + 151 150 i * rec_size), rec_size); 152 151 kunmap_atomic(kaddr, KM_BIO_SRC_IRQ); 152 + local_irq_restore(flags); 153 153 flush_dcache_page(page); 154 154 if (likely(page_uptodate && !PageError(page))) 155 155 SetPageUptodate(page);