The patch titled Subject: drivers/rtc/rtc-tps65910.c: fix potential NULL-pointer dereference has been added to the -mm tree. Its filename is rtc-tps65910-fix-potential-null-pointer-dereference.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/rtc-tps65910-fix-potential-null-pointer-dereference.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/rtc-tps65910-fix-potential-null-pointer-dereference.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Thierry Reding <treding@xxxxxxxxxx> Subject: drivers/rtc/rtc-tps65910.c: fix potential NULL-pointer dereference The interrupt handler gets the driver data associated with the RTC device and doesn't check it for validity. This can cause a NULL pointer being dereferenced when and interrupt fires before the driver data was properly set up. Fix this by setting the driver data earlier (before the interrupt is requested). Signed-off-by: Thierry Reding <treding@xxxxxxxxxx> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/rtc-tps65910.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/rtc/rtc-tps65910.c~rtc-tps65910-fix-potential-null-pointer-dereference drivers/rtc/rtc-tps65910.c --- a/drivers/rtc/rtc-tps65910.c~rtc-tps65910-fix-potential-null-pointer-dereference +++ a/drivers/rtc/rtc-tps65910.c @@ -258,6 +258,8 @@ static int tps65910_rtc_probe(struct pla if (ret < 0) return ret; + platform_set_drvdata(pdev, tps_rtc); + irq = platform_get_irq(pdev, 0); if (irq <= 0) { dev_warn(&pdev->dev, "Wake up is not possible as irq = %d\n", @@ -283,8 +285,6 @@ static int tps65910_rtc_probe(struct pla return ret; } - platform_set_drvdata(pdev, tps_rtc); - return 0; } _ Patches currently in -mm which might be from treding@xxxxxxxxxx are origin.patch rtc-tps65910-fix-potential-null-pointer-dereference.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html