summaryrefslogtreecommitdiffstats
path: root/libdwfl/linux-proc-maps.c
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2008-09-30 06:35:35 +0000
committerRoland McGrath <[email protected]>2008-09-30 06:35:35 +0000
commit9cf28e4f899f97ecdc983a0af8e2be62f3d69058 (patch)
treedf4ddf5910d2854a66e71081fd4753acb1ebd6d8 /libdwfl/linux-proc-maps.c
parentbb48a2702b6db50614fbbf08b02a1c7d83e28ecf (diff)
libdwfl/
2008-09-29 Roland McGrath <[email protected]> * segment.c (insert): Must realloc DWFL->lookup_module here too. (dwfl_report_segment): Clear DWFL->lookup_module before insert calls.
Diffstat (limited to 'libdwfl/linux-proc-maps.c')
-rw-r--r--libdwfl/linux-proc-maps.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libdwfl/linux-proc-maps.c b/libdwfl/linux-proc-maps.c
index b4bb6cfc..2206f63c 100644
--- a/libdwfl/linux-proc-maps.c
+++ b/libdwfl/linux-proc-maps.c
@@ -267,6 +267,9 @@ read_proc_memory (void *arg, void *data, GElf_Addr address,
{
const int fd = *(const int *) arg;
ssize_t nread = pread64 (fd, data, maxread, (off64_t) address);
+ /* Some kernels don't actually let us do this read, ignore those errors. */
+ if (nread < 0 && (errno == EINVAL || errno == EPERM))
+ return 0;
if (nread > 0 && (size_t) nread < minread)
nread = 0;
return nread;