Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164772
b: refs/heads/master
c: 678ad5d
h: refs/heads/master
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Sep 23, 2009
1 parent 3aeb84a commit 4c14b60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 90396f96b7da0e2305ffe0266d22b6f8221f28ba
refs/heads/master: 678ad5d8aaf8925cb8465f84e1e47d9b1284666a
6 changes: 5 additions & 1 deletion trunk/fs/proc/kcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ static void free_kclist_ents(struct list_head *head)
*/
static void __kcore_update_ram(struct list_head *list)
{
int nphdr;
size_t size;
struct kcore_list *tmp, *pos;
LIST_HEAD(garbage);

Expand All @@ -121,6 +123,7 @@ static void __kcore_update_ram(struct list_head *list)
} else
list_splice(list, &garbage);
kcore_need_update = 0;
proc_root_kcore->size = get_kcore_size(&nphdr, &size);
write_unlock(&kclist_lock);

free_kclist_ents(&garbage);
Expand Down Expand Up @@ -429,7 +432,8 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
unsigned long start;

read_lock(&kclist_lock);
proc_root_kcore->size = size = get_kcore_size(&nphdr, &elf_buflen);
size = get_kcore_size(&nphdr, &elf_buflen);

if (buflen == 0 || *fpos >= size) {
read_unlock(&kclist_lock);
return 0;
Expand Down

0 comments on commit 4c14b60

Please sign in to comment.