Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3505910ybn; Fri, 27 Sep 2019 07:22:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxdbcbx2C17uiqhMkTfkQcOjGw09TG2uhK88xz3lKmeqXS3ed4F9FDxiWtLzYXRs3btjmUS X-Received: by 2002:a17:906:5c16:: with SMTP id e22mr8050424ejq.105.1569594120085; Fri, 27 Sep 2019 07:22:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569594120; cv=none; d=google.com; s=arc-20160816; b=QBXhD2Q0KaC9M2GPsoiJlXjVY5k/tSUBYx3zZ7/QfhU/b166P9M1UEElk1bnEv2UR8 zJI6fSCocrYvRoILtkjjqv8de7xhsBltZqsDMg3mZNG/xCWannFBTYhhDhxz9sPeYnCy uYbP2a9skLuMDJLFLhpcuFvwjesdf3I8XfDBoBSJgK+7qON0U+/HQOepLs2I5WpNCjo7 3HtFeUiRcxOIuaOJEOrArL0VuwM2k8G2z0fAwNCNwKG1l1uhpAApkRmPth6AMW+d//Og I33Sosy0WYSwGIQ5NMPrqd1NSEmDZIox4QExfeB3ZTeRo00U+9HMGXzU89bfo5En2rnS lIbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=SDLEu3StL9n5qnqLOxiCCEj0vIUBiqdaDgZ3xegV3oU=; b=V90+j0ZRhzb6Md8zIlnvJZkfOVpgbfx21ziT/epL/n37PN69Rmy0N1VDjGcQhNredq ZQVk7Sitw5C1FXjvid4MA9HgoLJ8j1cOf4cgDZtYOtChLc0JktpjW7Hrf4q78e1PYVJw zEJY/i4xZHOniAlCIlgYnuwE8GtmzdJ02/x1v+KbXCtox65+9TPJhP11pLazZxKxD+JI NF4+FJe/BI39+ZHQcUSHqDQJZRubXkxJm7YmYJUeNOZCZ3FS1xycfUiG6atDXEXmOwNF EXZqbo9bILQRNubf+LIWzz1c1wzvrI3N7iidUaskxpN7qUj9HVAVdF0uwMIgR3nIJEMx ACKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oe23si2776598ejb.199.2019.09.27.07.21.33; Fri, 27 Sep 2019 07:22:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727252AbfI0OVB (ORCPT + 99 others); Fri, 27 Sep 2019 10:21:01 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:32962 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726926AbfI0OVB (ORCPT ); Fri, 27 Sep 2019 10:21:01 -0400 Received: (qmail 2579 invoked by uid 2102); 27 Sep 2019 10:21:00 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 27 Sep 2019 10:21:00 -0400 Date: Fri, 27 Sep 2019 10:21:00 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Greg Kroah-Hartman cc: Andrey Konovalov , "Rafael J. Wysocki" , syzbot , LKML , USB list , syzkaller-bugs Subject: Re: WARNING in pvr2_i2c_core_done In-Reply-To: <20190927051042.GA1767219@kroah.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 27 Sep 2019, Greg Kroah-Hartman wrote: > > It turns out the reason for this error is simple: The driver > > unregisters its subdevices in the release handler instead of in the > > disconnect handler. There probably is documentation about this > > somewhere, but I don't know exactly where -- maybe Greg remembers. > > Nope, I don't remember. It should happen in the disconnect handler, odd > of it to be in release, but maybe that's the "easiest" way for v4l to > handle this? This isn't a question of "easiest". Unregistering child devices in a release handler is just _wrong_, plain and simple. That's what gives rise to the "sysfs group 'power' not found for kobject 'i2c-0'" warning in the kernel log. The group can't be found because it has already been removed; it gets destroyed when the parent USB interface device is unregistered, because unregistering a device also removes from sysfs everything below that device. Alan Stern