Skip to content

Commit

Permalink
[PATCH] out_of_memory(): use of uninitialised
Browse files Browse the repository at this point in the history
Under some circumstances `points' can get printed before it's initialised.
Spotted by Carlos Martin <carlos@cmartin.tk>.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Mar 1, 2006
1 parent 0551fbd commit d6713e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order)
{
struct mm_struct *mm = NULL;
task_t *p;
unsigned long points;
unsigned long points = 0;

if (printk_ratelimit()) {
printk("oom-killer: gfp_mask=0x%x, order=%d\n",
Expand Down

0 comments on commit d6713e0

Please sign in to comment.