Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8d76527e728d00d1cf9d5dd663caffb2dcf05ae6
Commit:     8d76527e728d00d1cf9d5dd663caffb2dcf05ae6
Parent:     f0e48dbfc5c74e967fea4c0fd0c5ad07557ae0c8
Author:     Herbert Xu <[EMAIL PROTECTED]>
AuthorDate: Mon Jun 4 23:34:08 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Jun 7 13:39:03 2007 -0700

    [IPV4]: Only panic if inetdev_init fails for loopback
    
    When I made the inetdev_init call work on all devices I incorrectly
    left in the panic call as well.  It is obviously undesirable to
    panic on an allocation failure for a normal network device.  This
    patch moves the panic call under the loopback if clause.
    
    Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/devinet.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 7f95e6e..88a22d2 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1057,9 +1057,10 @@ static int inetdev_event(struct notifier_block *this, 
unsigned long event,
        if (!in_dev) {
                if (event == NETDEV_REGISTER) {
                        in_dev = inetdev_init(dev);
-                       if (!in_dev)
-                               panic("devinet: Failed to create loopback\n");
                        if (dev == &loopback_dev) {
+                               if (!in_dev)
+                                       panic("devinet: "
+                                             "Failed to create loopback\n");
                                in_dev->cnf.no_xfrm = 1;
                                in_dev->cnf.no_policy = 1;
                        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to