linux/drivers/scsi/qedi
Arun Easi 5e901d0b15 scsi: qedi: Fix bad pte call trace when iscsiuio is stopped.
munmap done by iscsiuio during a stop of the service triggers a "bad
pte" warning sometimes. munmap kernel path goes through the mmapped
pages and has a validation check for mapcount (in struct page) to be
zero or above. kzalloc, which we had used to allocate udev->ctrl, uses
slab allocations, which re-uses mapcount (union) for other purposes that
can make the mapcount look negative. Avoid all these trouble by invoking
one of the __get_free_pages wrappers to be used instead of kzalloc for
udev->ctrl.

 BUG: Bad page map in process iscsiuio  pte:80000000aa624067 pmd:3e6777067
 page:ffffea0002a98900 count:2 mapcount:-2143289280
     mapping: (null) index:0xffff8800aa624e00
 page flags: 0x10075d00000090(dirty|slab)
 page dumped because: bad pte
 addr:00007fcba70a3000 vm_flags:0c0400fb anon_vma: (null)
     mapping:ffff8803edf66e90 index:0

 Call Trace:
     dump_stack+0x19/0x1b
     print_bad_pte+0x1af/0x250
     unmap_page_range+0x7a7/0x8a0
     unmap_single_vma+0x81/0xf0
     unmap_vmas+0x49/0x90
     unmap_region+0xbe/0x140
     ? vma_rb_erase+0x121/0x220
     do_munmap+0x245/0x420
     vm_munmap+0x41/0x60
     SyS_munmap+0x22/0x30
     tracesys+0xdd/0xe2

Signed-off-by: Arun Easi <arun.easi@cavium.com>
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-05-23 22:16:42 -04:00
..
Kconfig
Makefile qed*: Utilize Firmware 8.15.3.0 2017-03-13 15:33:09 -07:00
qedi_dbg.c scsi: qedi: return via va_end to match corresponding va_start 2017-01-05 00:31:13 -05:00
qedi_dbg.h
qedi_debugfs.c SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
qedi_fw_api.c qed*: Utilize Firmware 8.15.3.0 2017-03-13 15:33:09 -07:00
qedi_fw_iscsi.h qed*: Utilize Firmware 8.15.3.0 2017-03-13 15:33:09 -07:00
qedi_fw_scsi.h qed*: Utilize Firmware 8.15.3.0 2017-03-13 15:33:09 -07:00
qedi_fw.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-03-15 11:59:10 -07:00
qedi_gbl.h scsi: qedi: fix build error without DEBUG_FS 2017-03-06 22:22:16 -05:00
qedi_hsi.h
qedi_iscsi.c SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
qedi_iscsi.h qed*: Utilize Firmware 8.15.3.0 2017-03-13 15:33:09 -07:00
qedi_main.c scsi: qedi: Fix bad pte call trace when iscsiuio is stopped. 2017-05-23 22:16:42 -04:00
qedi_sysfs.c
qedi_version.h qed*: Utilize Firmware 8.15.3.0 2017-03-13 15:33:09 -07:00
qedi.h