Lines Matching refs:BUG_ON

33 #define BUG_ON(condition, description)					      \  macro
51 BUG_ON(source_mapping == MAP_FAILED, "mmap"); in kernel_support_for_mremap_dontunmap()
61 BUG_ON(munmap(dest_mapping, num_pages * page_size) == -1, in kernel_support_for_mremap_dontunmap()
65 BUG_ON(munmap(source_mapping, num_pages * page_size) == -1, in kernel_support_for_mremap_dontunmap()
74 BUG_ON(size & (page_size - 1), in check_region_contains_byte()
76 BUG_ON((unsigned long)addr & (page_size - 1), in check_region_contains_byte()
105 BUG_ON(source_mapping == MAP_FAILED, "mmap"); in mremap_dontunmap_simple()
113 BUG_ON(dest_mapping == MAP_FAILED, "mremap"); in mremap_dontunmap_simple()
117 BUG_ON(check_region_contains_byte in mremap_dontunmap_simple()
120 BUG_ON(check_region_contains_byte in mremap_dontunmap_simple()
124 BUG_ON(munmap(dest_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple()
126 BUG_ON(munmap(source_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple()
136 BUG_ON(mem_fd < 0, "memfd_create"); in mremap_dontunmap_simple_shmem()
138 BUG_ON(ftruncate(mem_fd, num_pages * page_size) < 0, in mremap_dontunmap_simple_shmem()
144 BUG_ON(source_mapping == MAP_FAILED, "mmap"); in mremap_dontunmap_simple_shmem()
146 BUG_ON(close(mem_fd) < 0, "close"); in mremap_dontunmap_simple_shmem()
156 BUG_ON(munmap(source_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple_shmem()
161 BUG_ON(dest_mapping == MAP_FAILED, "mremap"); in mremap_dontunmap_simple_shmem()
165 BUG_ON(check_region_contains_byte in mremap_dontunmap_simple_shmem()
171 BUG_ON(check_region_contains_byte in mremap_dontunmap_simple_shmem()
175 BUG_ON(munmap(dest_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple_shmem()
177 BUG_ON(munmap(source_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple_shmem()
193 BUG_ON(dest_mapping == MAP_FAILED, "mmap"); in mremap_dontunmap_simple_fixed()
199 BUG_ON(source_mapping == MAP_FAILED, "mmap"); in mremap_dontunmap_simple_fixed()
206 BUG_ON(remapped_mapping == MAP_FAILED, "mremap"); in mremap_dontunmap_simple_fixed()
207 BUG_ON(remapped_mapping != dest_mapping, in mremap_dontunmap_simple_fixed()
212 BUG_ON(check_region_contains_byte in mremap_dontunmap_simple_fixed()
217 BUG_ON(check_region_contains_byte in mremap_dontunmap_simple_fixed()
221 BUG_ON(munmap(dest_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple_fixed()
223 BUG_ON(munmap(source_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple_fixed()
249 BUG_ON(source_mapping == MAP_FAILED, "mmap"); in mremap_dontunmap_partial_mapping()
257 BUG_ON(dest_mapping == MAP_FAILED, "mremap"); in mremap_dontunmap_partial_mapping()
261 BUG_ON(check_region_contains_byte(source_mapping, 5 * page_size, 'a') != in mremap_dontunmap_partial_mapping()
263 BUG_ON(check_region_contains_byte in mremap_dontunmap_partial_mapping()
268 BUG_ON(check_region_contains_byte(dest_mapping, 5 * page_size, 'a') != in mremap_dontunmap_partial_mapping()
271 BUG_ON(munmap(dest_mapping, 5 * page_size) == -1, in mremap_dontunmap_partial_mapping()
273 BUG_ON(munmap(source_mapping, num_pages * page_size) == -1, in mremap_dontunmap_partial_mapping()
301 BUG_ON(source_mapping == MAP_FAILED, "mmap"); in mremap_dontunmap_partial_mapping_overwrite()
307 BUG_ON(dest_mapping == MAP_FAILED, "mmap"); in mremap_dontunmap_partial_mapping_overwrite()
315 BUG_ON(dest_mapping == MAP_FAILED, "mremap"); in mremap_dontunmap_partial_mapping_overwrite()
316 BUG_ON(dest_mapping != remapped_mapping, "expected to remap to dest_mapping"); in mremap_dontunmap_partial_mapping_overwrite()
318 BUG_ON(check_region_contains_byte(source_mapping, 5 * page_size, 0) != in mremap_dontunmap_partial_mapping_overwrite()
322 BUG_ON(check_region_contains_byte(dest_mapping, 5 * page_size, 'a') != 0, in mremap_dontunmap_partial_mapping_overwrite()
326 BUG_ON(check_region_contains_byte(dest_mapping + (5 * page_size), in mremap_dontunmap_partial_mapping_overwrite()
330 BUG_ON(munmap(dest_mapping, 10 * page_size) == -1, in mremap_dontunmap_partial_mapping_overwrite()
332 BUG_ON(munmap(source_mapping, 5 * page_size) == -1, in mremap_dontunmap_partial_mapping_overwrite()
351 BUG_ON(page_buffer == MAP_FAILED, "unable to mmap a page."); in main()
359 BUG_ON(munmap(page_buffer, page_size) == -1, in main()