Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 210741 Details for
Bug 311431
kernel BUG at mm/rmap.c:479 during suspend/resume testing
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Test case to reproduce the crash across save/restore
main.c (text/plain), 1.38 KB, created by
Chris Lalancette
on 2007-09-28 17:58:25 UTC
(
hide
)
Description:
Test case to reproduce the crash across save/restore
Filename:
MIME Type:
Creator:
Chris Lalancette
Created:
2007-09-28 17:58:25 UTC
Size:
1.38 KB
patch
obsolete
>#include <errno.h> >#include <fcntl.h> >#include <stdio.h> >#include <string.h> >#include <unistd.h> > >#include <sys/mman.h> >#include <sys/stat.h> >#include <sys/types.h> > >#define DEVICE "/dev/zero" >#define REGION_SIZE 16*1024*1024 > >int main(void) >{ > int fd; > void *mem, *lastmem = NULL; > > fd = open(DEVICE, O_RDONLY); > if ( fd == -1 ) > { > fprintf(stderr, "failed to open " DEVICE ": %s\n", strerror(errno)); > return 1; > } > > while (1) > { > mem = mmap(0, REGION_SIZE, PROT_READ, MAP_PRIVATE, fd, 0); > if ( mem == MAP_FAILED ) > { > fprintf(stderr, "failed to mmap region: %s\n", strerror(errno)); > return 1; > } > > if ( mprotect(mem, REGION_SIZE, PROT_NONE) < 0 ) > { > fprintf(stderr, "failed to mprotect region: %s\n", strerror(errno)); > return 1; > } > printf("mapped PROT_NONE region at %p.\n", mem); > > /* > * Unmap previous region after mapping the next so > * there is always at least one PROT_NONE region > * mapped. > * > * If the kernel does not correctly handle non-present > * PTEs then it will crash on unmap. > */ > if ( lastmem != NULL ) > { > if ( munmap(lastmem, REGION_SIZE) < 0 ) > { > fprintf(stderr, "failed to unmap region: %s\n", strerror(errno)); > return 1; > } > > printf("unmapped PROT_NONE region at %p.\n", lastmem); > } > > lastmem = mem; > > sleep(1); > } > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 311431
: 210741 |
210751
|
295746
|
295765