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 867215 Details for
Bug 1069393
systemd-208-14.fc20 segfaults if /proc/swaps does not exist
[?]
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.
[patch]
patch to check for ENOENT and return from swap_dispatch_reload and swap_enumerate
0001-Do-not-segfault-if-proc-swaps-cannot-be-opened.patch (text/plain), 1.68 KB, created by
Matt Mullins
on 2014-02-25 00:49:57 UTC
(
hide
)
Description:
patch to check for ENOENT and return from swap_dispatch_reload and swap_enumerate
Filename:
MIME Type:
Creator:
Matt Mullins
Created:
2014-02-25 00:49:57 UTC
Size:
1.68 KB
patch
obsolete
>From a86c40182e34e81e11238d251beb1cff13ed4417 Mon Sep 17 00:00:00 2001 >From: Matt Mullins <mokomull@gmail.com> >Date: Mon, 24 Feb 2014 15:03:52 -0800 >Subject: [PATCH] Do not segfault if /proc/swaps cannot be opened. > >In https://bugzilla.redhat.com/show_bug.cgi?id=1069393, it was discovered that >the refactoring in 85a77eea8d7114675602a33d2e067fd7c4ad0624 caused >swap_dispatch_reload and swap_enumerate to continue even if fopen() failed with >ENOENT. > >This should instead be modified to return from swap_dispatch_reload and >swap_enumerate, rather than continuing to load the list of swaps when >m->proc_swaps is NULL. >--- > src/core/swap.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/src/core/swap.c b/src/core/swap.c >index 727bb95e7c1a..3c009da7035e 100644 >--- a/src/core/swap.c >+++ b/src/core/swap.c >@@ -1074,7 +1074,7 @@ static int open_proc_swaps(Manager *m) { > > m->proc_swaps = fopen("/proc/swaps", "re"); > if (!m->proc_swaps) >- return (errno == ENOENT) ? 0 : -errno; >+ return -errno; > > m->swap_watch.type = WATCH_SWAP; > m->swap_watch.fd = fileno(m->proc_swaps); >@@ -1097,7 +1097,7 @@ int swap_dispatch_reload(Manager *m) { > > r = open_proc_swaps(m); > if (r < 0) >- return r; >+ return (r == -ENOENT) ? 0 : r; > > return swap_fd_event(m, EPOLLPRI); > } >@@ -1250,7 +1250,7 @@ static int swap_enumerate(Manager *m) { > > r = open_proc_swaps(m); > if (r < 0) >- return r; >+ return (r == -ENOENT) ? 0 : r; > > r = swap_load_proc_swaps(m, false); > if (r < 0) >-- >1.7.9.5 >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1069393
: 867215