The patch titled Subject: net/9p/protocol.c: return -ENOMEM when kmalloc() failed has been added to the -mm tree. Its filename is 9p-net-protocolc-return-enomem-when-kmalloc-failed.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/9p-net-protocolc-return-enomem-when-kmalloc-failed.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/9p-net-protocolc-return-enomem-when-kmalloc-failed.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/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: piaojun <piaojun@xxxxxxxxxx> Subject: net/9p/protocol.c: return -ENOMEM when kmalloc() failed We should return -ENOMEM to upper user when kmalloc failed to indicate accurate errno. Link: http://lkml.kernel.org/r/5B4552C5.60000@xxxxxxxxxx Signed-off-by: Jun Piao <piaojun@xxxxxxxxxx> Reviewed-by: Yiwen Jiang <jiangyiwen@xxxxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Eric Van Hensbergen <ericvh@xxxxxxxxx> Cc: Ron Minnich <rminnich@xxxxxxxxxx> Cc: Latchesar Ionkov <lucho@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- net/9p/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN net/9p/protocol.c~9p-net-protocolc-return-enomem-when-kmalloc-failed net/9p/protocol.c --- a/net/9p/protocol.c~9p-net-protocolc-return-enomem-when-kmalloc-failed +++ a/net/9p/protocol.c @@ -156,7 +156,7 @@ p9pdu_vreadf(struct p9_fcall *pdu, int p *sptr = kmalloc(len + 1, GFP_NOFS); if (*sptr == NULL) { - errcode = -EFAULT; + errcode = -ENOMEM; break; } if (pdu_read(pdu, *sptr, len)) { _ Patches currently in -mm which might be from piaojun@xxxxxxxxxx are net-9p-clientc-put-refcount-of-trans_mod-in-error-case-in-parse_opts.patch ocfs2-return-erofs-when-filesystem-becomes-read-only.patch net-9p-clientc-add-missing-n-at-the-end-of-p9_debug.patch 9p-net-protocolc-return-enomem-when-kmalloc-failed.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