mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] ipc/mqueue: Add missing error code in init_mqueue_fs()
@ 2018-01-09  9:29 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2018-01-09  9:29 UTC (permalink / raw)
  To: Al Viro
  Cc: Ingo Molnar, Andrew Morton, Jonathan Haws, Deepa Dinamani,
	linux-kernel, kernel-janitors

We should propogate the error code here but we accidentally return
success.

Fixes: 946086abeddf ("mqueue: switch to on-demand creation of internal mount")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 89b5c53e0203..70423581dc92 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -1610,8 +1610,10 @@ static int __init init_mqueue_fs(void)
 		goto out_filesystem;
 
 	m = kern_mount_data(&mqueue_fs_type, &init_ipc_ns);
-	if (IS_ERR(m))
+	if (IS_ERR(m)) {
+		error = PTR_ERR(m);
 		goto out_filesystem;
+	}
 	init_ipc_ns.mq_mnt = m;
 	return 0;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-09  9:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-09  9:29 [patch] ipc/mqueue: Add missing error code in init_mqueue_fs() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®