Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4462768pxf; Tue, 30 Mar 2021 08:23:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyll2DkDLPeabKFj5r3HQN/F2kN7M2KSaj2dEwXm/WQrUKYvKi/AnJbLUEZOeQ8WEnZoJqE X-Received: by 2002:a05:6402:614:: with SMTP id n20mr33884883edv.58.1617117822071; Tue, 30 Mar 2021 08:23:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617117822; cv=none; d=google.com; s=arc-20160816; b=K1OwbZR8XrtxbCfKMN67Bf21o5Sxd/6osn1boNiJ87PLwIdu4jOSLh39GPFMQ0NrYA QVDkMsi2DlZfqtMfgpdWzRjGEnjNdONdZjRuu7aCf2WJFAQXHVPsysOFo+IlDWsgaNQk svgzgr+BJCRHRa2sUhL/oPYIVFucEOKcRMr9IvLDhORXhRpskQ47cXSxaZZd1rPN6b8j Le5K3BU/EwA1x9I/+k57g2nG37Pm/xRq+pVyLN+qZ8xgsWeAILTqRsbBneXneTwNxKoN llzoVV2+xAHEci44HS3Z6C6uwkl4O8Kx/zfeq3rY3ipONdIF6DIVYxpnGIJbBr7Dj2nE OVGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9iMan1bbUTwSgDV3VovjmPVu+tzJrr1PlmcoHDc286A=; b=ywYVIVZRFocDlM5ljmFWVH30fn4gnAHqC/TKsQSzkW4fGK1QpyxRxKIvi+m9KXlwDs KS7B8ldhj8ID8t4Ng2/uDLF0WIKrdbNdp+gjUCiY23lYEcLkd4vMuNa7GZbiYy0nQDIa V1ssXu6U6OxCEqaJDrA1eQSWoJxy8Uh7RBwbv/UEIgdfL5CM3PyLiXAgEW1CiECGVpXL Nt+ft4OqkE2t2FQJakhcJ3I0ruV3K1Mp5FEQ6UzxNwoyU4sbOne6DRjlpbbT3mvOvTRY iTT8WfwqkCPXEY0K+rhwH287QqYK7vJDiz35z49SdqVFXORdY65yedxRYAKJr/PDtIGG Arfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i5PF2w81; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si16418587edq.430.2021.03.30.08.23.19; Tue, 30 Mar 2021 08:23:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i5PF2w81; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232023AbhC3PWD (ORCPT + 99 others); Tue, 30 Mar 2021 11:22:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:34734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231808AbhC3PVs (ORCPT ); Tue, 30 Mar 2021 11:21:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 175F36195C; Tue, 30 Mar 2021 15:21:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617117708; bh=uGwUP3LzjKRd9E1KoxeHAndEnuORzm0H6YS3esSamOk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i5PF2w81bVXHY5TwySMtGBo2nNi4PqgeFA/qVDFG/2rM3QM9K/7S7YEUIKXO3HBne 1M3QsIheQ4jK+ZIEY62C/lfH8sJX1rXfqK7ndOiv9+G5vIC0+ZzHH+Ujyj2ms/oZZi TZSsMkAX8ZN3CL4lQEBDoiG2G8bUwsZFS1IkwQTHhfD08H8CdKS3daBbvKqOJP/IJq Re96AJv434bJ362Rwqfyb2xxnYRB62v+lP3xQElI++Gml8ko5h277pNBnddX3F87Q5 KzUD+4HQakv6avPe4N8zYdFiJOUtePIerogCzdcK5AoyrX6PtoEFobedlvsGIJLX8b TWU0RlBtTdHLA== Received: from johan by xi.lan with local (Exim 4.93.0.4) (envelope-from ) id 1lRGC1-0002Y3-Sc; Tue, 30 Mar 2021 17:22:09 +0200 Date: Tue, 30 Mar 2021 17:22:09 +0200 From: Johan Hovold To: Oliver Neukum Cc: Mauro Carvalho Chehab , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] USB: serial: add support for multi-interface functions Message-ID: References: <20210330143820.9103-1-johan@kernel.org> <20210330143820.9103-4-johan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 30, 2021 at 04:44:32PM +0200, Oliver Neukum wrote: > Am Dienstag, den 30.03.2021, 16:38 +0200 schrieb Johan Hovold: > > @@ -1115,6 +1161,8 @@ static void usb_serial_disconnect(struct usb_interface *interface) > > if (serial->type->disconnect) > > serial->type->disconnect(serial); > > > > + release_sibling(serial, interface); > > + > > /* let the last holder of this object cause it to be cleaned up */ > > usb_serial_put(serial); > > dev_info(dev, "device disconnected\n"); > > Hi, > > does this assume you are called for the original interface first? No, I handle either interface being unbound first (e.g. see release_sibling()). > I am afraid that is an assumption you cannot make. In fact, if somebody > is doing odd things with sysfs you cannot even assume both will see a > disconnect() Right, but disconnect() will still be called also for the sibling interface as part of release_sibling() above. Johan