]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Blackfin arch: Fixing Bug: balance calls to get_task_mm with corresponding mmput...
authorBernd Schmidt <bernd.schmidt@analog.com>
Sun, 21 Oct 2007 14:32:27 +0000 (22:32 +0800)
committerBryan Wu <bryan.wu@analog.com>
Sun, 21 Oct 2007 14:32:27 +0000 (22:32 +0800)
We must balance calls to get_task_mm with corresponding mmput calls, otherwise
refcounting is screwed up and mms don't get freed when their task exits.

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
arch/blackfin/kernel/traps.c

index 8823e9ade5849b02968442e158990e3c02ade6c6..afd044e78af677ce483fe919408fd5cb98046bb3 100644 (file)
@@ -118,12 +118,14 @@ static int printk_address(unsigned long address)
                                        offset = (address - vma->vm_start) + (vma->vm_pgoff << PAGE_SHIFT);
 
                                write_unlock_irq(&tasklist_lock);
+                               mmput(mm);
                                return printk("<0x%p> [ %s + 0x%lx ]",
                                              (void *)address, name, offset);
                        }
 
                        vml = vml->next;
                }
+               mmput(mm);
        }
        write_unlock_irq(&tasklist_lock);