[ 3.5.y.z extended stable ] Patch "ifb: fix oops when loading the ifb failed" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Thu Jul 25 14:42:10 UTC 2013
This is a note to let you know that I have just added a patch titled
ifb: fix oops when loading the ifb failed
to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 7fa24219b2ab80da29e506d7e75cc6ba5a87df88 Mon Sep 17 00:00:00 2001
From: dingtianhong <dingtianhong at huawei.com>
Date: Thu, 11 Jul 2013 19:04:06 +0800
Subject: [PATCH] ifb: fix oops when loading the ifb failed
commit f2966cd5691058b8674a20766525bedeaea9cbcf upstream.
If __rtnl_link_register() return faild when loading the ifb, it will
take the wrong path and get oops, so fix it just like dummy.
Signed-off-by: Ding Tianhong <dingtianhong at huawei.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/net/ifb.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index 04ab337..635d01c 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -290,6 +290,8 @@ static int __init ifb_init_module(void)
rtnl_lock();
err = __rtnl_link_register(&ifb_link_ops);
+ if (err < 0)
+ goto out;
for (i = 0; i < numifbs && !err; i++) {
err = ifb_init_one(i);
@@ -297,6 +299,8 @@ static int __init ifb_init_module(void)
}
if (err)
__rtnl_link_unregister(&ifb_link_ops);
+
+out:
rtnl_unlock();
return err;
--
1.8.1.2
More information about the kernel-team
mailing list