The patch titled rtc-at91sam9: Correct size given to memset has been added to the -mm tree. Its filename is rtc-at91sam9-correct-size-given-to-memset.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 *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: rtc-at91sam9: Correct size given to memset From: Julia Lawall <julia@xxxxxxx> Memset should be given the size of the structure, not the size of the pointer. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; T *x; expression E; @@ memset(x, E, sizeof( + * x)) // </smpl> Signed-off-by: Julia Lawall <julia@xxxxxxx> Signed-off-by: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/rtc-at91sam9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/rtc/rtc-at91sam9.c~rtc-at91sam9-correct-size-given-to-memset drivers/rtc/rtc-at91sam9.c --- a/drivers/rtc/rtc-at91sam9.c~rtc-at91sam9-correct-size-given-to-memset +++ a/drivers/rtc/rtc-at91sam9.c @@ -161,7 +161,7 @@ static int at91_rtc_readalarm(struct dev if (offset == 0) return -EILSEQ; - memset(alrm, 0, sizeof(alrm)); + memset(alrm, 0, sizeof(*alrm)); if (alarm != ALARM_DISABLED && offset != 0) { rtc_time_to_tm(offset + alarm, tm); _ Patches currently in -mm which might be from julia@xxxxxxx are linux-next.patch drivers-scsi-sesc-eliminate-double-free.patch kernel-credc-use-kmem_cache_free.patch arch-arm-plat-pxa-dmac-correct-null-test.patch drivers-gpu-drm-nouveau-nouveau_grctxc-correct-null-test.patch drivers-media-video-move-dereference-after-null-test.patch net-ipv4-correct-the-size-argument-to-kzalloc.patch drivers-scsi-libsas-use-sam_good.patch drivers-scsi-remove-unnecessary-null-test.patch drivers-message-move-dereference-after-null-test.patch drivers-scsi-correct-the-size-argument-to-kmalloc.patch drivers-scsi-bfa-bfad_imc-eliminate-useless-code.patch drivers-staging-tm6000-tm6000-videoc-correct-null-test.patch drivers-staging-go7007-s2250-loaderc-eliminate-useless-code.patch drivers-usb-serial-eliminate-useless-code.patch drivers-misc-iwmc3200top-mainc-eliminate-useless-code.patch rtc-at91sam9-correct-size-given-to-memset.patch drivers-edac-introduce-missing-kfree.patch drivers-char-mmtimerc-eliminate-useless-code.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