]> err.no Git - linux-2.6/blobdiff - net/tipc/port.c
[TIPC]: Disallow config operations that aren't supported in certain modes.
[linux-2.6] / net / tipc / port.c
index 360920b3d821be3a711c9710c59d3ae99d223a99..99846a18d94e19b46301a6cef57c057802a3e818 100644 (file)
@@ -1061,6 +1061,7 @@ int tipc_createport(u32 user_ref,
 
        up_ptr = (struct user_port *)kmalloc(sizeof(*up_ptr), GFP_ATOMIC);
        if (up_ptr == NULL) {
+               warn("Port creation failed, no memory\n");
                return -ENOMEM;
        }
        ref = tipc_createport_raw(NULL, port_dispatcher, port_wakeup, importance);
@@ -1171,8 +1172,6 @@ int tipc_withdraw(u32 ref, unsigned int scope, struct tipc_name_seq const *seq)
        p_ptr = tipc_port_lock(ref);
        if (!p_ptr)
                return -EINVAL;
-       if (!p_ptr->publ.published)
-               goto exit;
        if (!seq) {
                list_for_each_entry_safe(publ, tpubl, 
                                         &p_ptr->publications, pport_list) {
@@ -1199,7 +1198,6 @@ int tipc_withdraw(u32 ref, unsigned int scope, struct tipc_name_seq const *seq)
        }
        if (list_empty(&p_ptr->publications))
                p_ptr->publ.published = 0;
-exit:
        tipc_port_unlock(p_ptr);
        return res;
 }