From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f69.google.com (mail-oo1-f69.google.com [209.85.161.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B5153C1F46 for ; Thu, 14 May 2026 11:40:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.69 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778758808; cv=none; b=alBOeqKyv8akxlFeFwDiRRjiYmp4a1SlYkyGehMhxnvT1MwdA9Yw8l8W9f8VzC7Np6aFDqggmmgUVwPrOeGtLIpXgSCnFJoGL3DM/6v0c1cCPlvMtfHFMKMntlj+qwndUYxnqzjv7X9wy0FsBQX2DeG3Ecky2jyvFAIPV+tD4Z8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778758808; c=relaxed/simple; bh=yTgsrPTXrj1ZuABHTMAL4RG1W9eTuuQfWaDLnlN9+WA=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=Gkxzaj4GSt2lZtnON3zOfq2sZGRNJ9fLID6suTk+liI1NNqBRyfHqZsfXtmbFCp2YAaosWOPmOCqm0dpo+K/th6KEcfAXsf7isxJTKFNvD0JloefHkyVlJSgd4bl6rcXNoNmjrdKLUfUPe/gZJjvc/wDfF7ziU7/mem7cNGIR+U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.161.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oo1-f69.google.com with SMTP id 006d021491bc7-69b8b4075a4so280657eaf.1 for ; Thu, 14 May 2026 04:40:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778758804; x=1779363604; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZvejxErBzTJJ0E+4pKXE9s9MEdDpVLPqGnvLnvxkz7o=; b=bksDu7RCQONbMliKuN3UksDzslOcdRvPacT9N2Q2UaDsHQRaRUl50gfhTM7KB2PBag S+THEUiZDImsX3wqybb1ubqAG4SLHH+FtEq2iiPycDuOrorY9Du0lwx9F1TXYT6uhiId jOyfQ6xcfNMTDdTDaX5RIvZxf9/S4HFDoUi4UEZnoXoe0sAweF2r6Oe8JZ32s/jWaOX8 kPCmOWBC0JUYlWKsy8pku2mTvrbnmJZ7FvrJyXzzc6KIPkdfv6oo7WyAJGO9qcpfw1yT aAs3P+m+mZZ0FWN08oC61XCvgcxxHu+RD7TkhCKqc02S6wtE7Y0YuRRemESiadzOfc+u rziw== X-Gm-Message-State: AOJu0YxmgVooT0JvCiVSjaPg3YbzFwglhDEcQtgvaEVfuLKLnaZ6F84I th9jsI3FI6bSMd8FD1tXRQV5ZZFR2QY6yilFuzRa7hIOhIvwTRd3MKwjZlEQLnaEzTtS5g10YxC ez4pFv6zhpFx8ViJS7KWhcysrBiB2+iw/hF+1qVe+zcO9OHwYGstnwQXhQoQ= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:213:b0:696:637e:4837 with SMTP id 006d021491bc7-69b7aa7db62mr3717041eaf.27.1778758804728; Thu, 14 May 2026 04:40:04 -0700 (PDT) Date: Thu, 14 May 2026 04:40:04 -0700 In-Reply-To: <683a9833.a70a0220.1a6ae.000a.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6a05b494.050a0220.d11c8.0009.GAE@google.com> Subject: Forwarded: [PATCH] media: dvb-usb-v2: abort probe on power-on failure From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [PATCH] media: dvb-usb-v2: abort probe on power-on failure Author: raoxu@uniontech.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master dvb_usbv2_init() powers the device on before registering the I2C adapter and DVB resources, but it ignores errors from the power control callback. For CE6230, the power control callback selects interface 1 alternate setting 1 with usb_set_interface(). A malformed device may not provide that alternate setting, causing the initial power-on request to fail. Probe nevertheless continues and may publish the I2C adapter before failing later during adapter/frontend initialization. That leaves the probe error path to synchronously unregister the I2C adapter while USB probe locks are still held. Userspace may already have opened the newly published i2c-dev node, holding an adapter reference and making i2c_del_adapter() wait indefinitely in the probe path. Abort initialization as soon as the initial power-on step fails. This keeps malformed devices from exposing partially initialized I2C/DVB resources. Fixes: c79b339f9292 ("[media] dvb_usb_v2: copy current dvb_usb as a starting point") Reported-by: syzbot+f3f24bbe63f3f6db9f44@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/683a9833.a70a0220.1a6ae.000a.GAE@google.com/ Signed-off-by: Xu Rao --- drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c index bd86d250433d..5635394e5b7d 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c @@ -852,7 +852,9 @@ static int dvb_usbv2_init(struct dvb_usb_device *d) int ret; dev_dbg(&d->udev->dev, "%s:\n", __func__); - dvb_usbv2_device_power_ctrl(d, 1); + ret = dvb_usbv2_device_power_ctrl(d, 1); + if (ret < 0) + goto err; if (d->props->read_config) { ret = d->props->read_config(d); -- 2.43.0