The patch titled Subject: kernel/relay.c: fix potential memory leak has been added to the -mm tree. Its filename is relay-fix-potential-memory-leak.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/relay-fix-potential-memory-leak.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/relay-fix-potential-memory-leak.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: Zhouyi Zhou <yizhouzhou@xxxxxxxxx> Subject: kernel/relay.c: fix potential memory leak When relay_open_buf() fails in relay_open(), code will goto free_bufs, but chan is nowhere freed. Link: http://lkml.kernel.org/r/1464777927-19675-1-git-send-email-yizhouzhou@xxxxxxxxx Signed-off-by: Zhouyi Zhou <zhouzhouyi@xxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/relay.c | 1 + 1 file changed, 1 insertion(+) diff -puN kernel/relay.c~relay-fix-potential-memory-leak kernel/relay.c --- a/kernel/relay.c~relay-fix-potential-memory-leak +++ a/kernel/relay.c @@ -614,6 +614,7 @@ free_bufs: kref_put(&chan->kref, relay_destroy_channel); mutex_unlock(&relay_channels_mutex); + kfree(chan); return NULL; } EXPORT_SYMBOL_GPL(relay_open); _ Patches currently in -mm which might be from yizhouzhou@xxxxxxxxx are relay-fix-potential-memory-leak.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