android_kernel_xiaomi_sm8350/arch/um/kernel
Jason Lunz af84eab208 [PATCH] uml: fix LVM crash
Permit lvm to create logical volumes without crashing UML.

When device-mapper's DM_DEV_CREATE_CMD ioctl is called to create a new device,
dev_create()->dm_create()->alloc_dev()-> blk_queue_bounce_limit(md->queue,
BLK_BOUNCE_ANY) is called.

blk_queue_bounce_limit(BLK_BOUNCE_ANY) calls init_emergency_isa_pool() if
blk_max_pfn < blk_max_low_pfn.  This is the case on UML, but
init_emergency_isa_pool() hits BUG_ON(!isa_page_pool) because there doesn't
seem to be a dma zone on UML for mempool_create() to allocate from.

Most architectures seem to have max_low_pfn == max_pfn, but UML doesn't
because of the uml_reserved chunk it keeps for itself.  From what I can see,
max_pfn and max_low_pfn don't get much use after the bootmem-allocator stops
being used anyway, except that they initialize the block layer's
blk_max_low_pfn/blk_max_pfn.

This ensures init_emergency_isa_pool() doesn't crash uml in this situation by
setting max_low_pfn == max_pfn in mem_init().

Signed-off-by: Jason Lunz <lunz@falooley.org>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-29 08:22:24 -07:00
..
skas [PATCH] uml: remove code controlled by non-existent config option 2007-02-11 10:51:23 -08:00
tt
asm-offsets.c
config.c.in
dyn.lds.S
exec.c [PATCH] uml: Kill a compilation warning 2007-02-11 10:51:22 -08:00
exitcode.c
gmon_syms.c
gprof_syms.c
init_task.c
initrd.c
irq.c [PATCH] uml: activate_fd: return ENOMEM only when appropriate 2007-03-08 07:38:21 -08:00
ksyms.c
Makefile [PATCH] uml: delete unused file 2007-02-11 10:51:22 -08:00
mem.c [PATCH] uml: fix LVM crash 2007-03-29 08:22:24 -07:00
physmem.c [PATCH] uml: mem.c and physmem.c formatting fixes 2007-02-11 10:51:22 -08:00
process.c
ptrace.c [PATCH] uml: x86_64 ptrace fixes 2007-02-11 10:51:24 -08:00
reboot.c
sigio.c [PATCH] uml: SIGIO formatting fixes 2007-02-11 10:51:23 -08:00
signal.c [PATCH] uml: fix formatting violations in signal delivery code 2007-03-06 09:30:26 -08:00
smp.c
syscall.c [PATCH] uml: remove unused variable and function 2007-02-11 10:51:22 -08:00
sysrq.c [PATCH] uml: const a variable 2007-02-11 10:51:22 -08:00
time.c [PATCH] uml: make time data per-cpu 2007-02-11 10:51:22 -08:00
tlb.c
trap.c [PATCH] uml: make signal handlers static 2007-02-11 10:51:22 -08:00
uaccess.c
um_arch.c [PATCH] Dynamic kernel command-line: fixups 2007-02-12 09:48:39 -08:00
umid.c [PATCH] uml: umid tidying 2007-02-11 10:51:24 -08:00
uml.lds.S
vmlinux.lds.S