]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/thunderbolt/xdomain.c
Merge tag 'compat-ioctl-fix' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd...
[linux.git] / drivers / thunderbolt / xdomain.c
index 880d784398a379529b3d865f54d27bbce2651472..053f918e00e8bcf6b31e855f7a74ff2fcbd7db99 100644 (file)
@@ -1220,7 +1220,13 @@ struct tb_xdomain *tb_xdomain_alloc(struct tb *tb, struct device *parent,
                                    u64 route, const uuid_t *local_uuid,
                                    const uuid_t *remote_uuid)
 {
+       struct tb_switch *parent_sw = tb_to_switch(parent);
        struct tb_xdomain *xd;
+       struct tb_port *down;
+
+       /* Make sure the downstream domain is accessible */
+       down = tb_port_at(route, parent_sw);
+       tb_port_unlock(down);
 
        xd = kzalloc(sizeof(*xd), GFP_KERNEL);
        if (!xd)