Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1975761pxy; Mon, 2 Aug 2021 15:39:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPD0ncvzJLy5S/wNsBKZTPs/rOKKsM2tjYMPHWwYzU9C/ufk15QeBjcxfceIQo4FEc7xfM X-Received: by 2002:a17:907:20bb:: with SMTP id pw27mr18020111ejb.332.1627943969038; Mon, 02 Aug 2021 15:39:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627943969; cv=none; d=google.com; s=arc-20160816; b=JeCl7gwQLMMcXyybyM95FmZHR6Ep76wC+C5c2xO/WuExThXGAZlO53hxfyVD3cVC8e Jhu1n6lrPDT6nWgC2MzYHF2wOqFnn+MmrKq2iAvEgafo43F8K+5YJaboP2i/jFmtTCWw 5w+j/vjWzRaiTiO/t1aRAjut8svQyNphyS3v61WIULjko0Z1h/cVYD6iwMOCj6uJcq48 ly9xluif32z0WfO9I7jXnH0qlCfLFePWhzSvTM5CQdETMV0UV62TSrAxxJO47C14Df1d IOLzEvhKi5h4PqJjgkkk/hZOdxsHTM1XqNAKF0NEY0x7HZRyY93jh0VAdqLUuLhfm0ZP KoXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=1NYy3xMVa4GkO751TKcuObegthDWDqsbdIWZPwNk3T8=; b=SrxjaU1Rzd28mAvct1KkUr+gwqNrwS8B5MlzMQDT8HeCVl/GofKDQ+USy09tPaEhhu 8wfl9gMr3lnjOSkLUYkION8QIjrXKwiAYzeV14qNMRAdBDA8b7o2xQ0ahwsyWhkqqPYP G6WODIi9uqzLiMitcPQOlsPcxBwLEkMtJAH9VfIkBNguRghy3ksrTlQ/4oH5NRFuony6 PgB8PT1RFv0Fgg1/l+eCpaBOpL5Z011rYdhyZnx3S8XK1AxnQYHgLhwRbO2Lrim/PXXY TCgnqfFnXeMU1HnaNGReje5htwS7V7vkcC1vIbKOf1o//qfJ9Ff1Mbr5FCqMW7EX0xCU Nmgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fp14hetu; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si11570609eds.482.2021.08.02.15.39.02; Mon, 02 Aug 2021 15:39:29 -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=@gmail.com header.s=20161025 header.b=fp14hetu; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232333AbhHBWhT (ORCPT + 99 others); Mon, 2 Aug 2021 18:37:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230313AbhHBWhT (ORCPT ); Mon, 2 Aug 2021 18:37:19 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ECAEC06175F for ; Mon, 2 Aug 2021 15:37:08 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id u15so11307388wmj.1 for ; Mon, 02 Aug 2021 15:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=1NYy3xMVa4GkO751TKcuObegthDWDqsbdIWZPwNk3T8=; b=fp14hetuEWvtVi1U9vDQzbHmtEf4HT7iARzzKd1/K8u2r1+4ZD+niYk9EnL3TX4lxk 6HgiNN9dHbkkvBUoHTLJLD/Oy8BgjvfroQqV1MT7Sf5AzGZoh39DN8oNJ/zS9WoiZtXb Qlwp5BIauGrnv3kqnbh5ew83aHsCuB+zzpui8mq7gFutfY+gdmSdaDt4lryru0J0exbP Tk3ek7Rw5CzyBmrvidyu1tiMMxPxQLZYI4lYG1mXNXJxhHqtWRF9vIuUmesRYOBPVNVQ 1IpKk2dJ1vrdUVVCYGzccf97XFAyB/NRRRFZpdCur+oaLwBjgkjDFBfrWkyg9R1MxQ3f djGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=1NYy3xMVa4GkO751TKcuObegthDWDqsbdIWZPwNk3T8=; b=Y3oet/rNaeIPX1ofIRrWMZBxDQhlaZrnBXnG3/0ByRebjlwRHq5yJTCCkD0ekMHpMj 6Y32TwQS5eO5aHN4KHqPlK1o1lsfrORArGgrTZ//qjEJl2RacFI5pYQs7lQJx1bpOg7Y y912S9vCn0G5lIQvOvuqO9Mw9jLdMb7jRkNrrZzi4MR/CKlirFj7w9vsKIf5UXMrO2zk 6vYzjySEE0cDDGE9zp3/MLFfod0G8UhVltixlIPWCdbiwa2FbbhawcrwXkvGJAXL9AlC r6HV4zjTUD+I+9omnczTAblwF6+3SWoCeR4ZxHhV44/qPxyRItOq4yoeDv0LITmS2gTc wSRw== X-Gm-Message-State: AOAM530sbuLM3ruH96XvX/520ffP1Y8vZRQ4jMTx7sDLSzhvGZsK6lTi sqYpGDwwVXI7pyWe/cDXJEE= X-Received: by 2002:a1c:f414:: with SMTP id z20mr1100122wma.94.1627943826859; Mon, 02 Aug 2021 15:37:06 -0700 (PDT) Received: from pc ([196.235.140.151]) by smtp.gmail.com with ESMTPSA id f15sm12061885wrp.12.2021.08.02.15.37.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Aug 2021 15:37:06 -0700 (PDT) Date: Mon, 2 Aug 2021 23:37:03 +0100 From: Salah Triki To: Greg Kroah-Hartman , Dan Carpenter , Amey Narkhede Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] staging: gdm724x: get lock before calling usb_[disable|enable]_autosuspend() Message-ID: <20210802223703.GA1425480@pc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Based on the documentation of usb_[disable|enable]_autosuspend(), the caller must hold udev's device lock. Signed-off-by: Salah Triki --- drivers/staging/gdm724x/gdm_usb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/gdm724x/gdm_usb.c b/drivers/staging/gdm724x/gdm_usb.c index 54bdb64f52e8..31b3b3e563c8 100644 --- a/drivers/staging/gdm724x/gdm_usb.c +++ b/drivers/staging/gdm724x/gdm_usb.c @@ -846,7 +846,9 @@ static int gdm_usb_probe(struct usb_interface *intf, udev->intf = intf; intf->needs_remote_wakeup = 1; + usb_lock_device(usbdev); usb_enable_autosuspend(usbdev); + usb_unlock_device(usbdev); pm_runtime_set_autosuspend_delay(&usbdev->dev, AUTO_SUSPEND_TIMER); /* List up hosts with big endians, otherwise, -- 2.25.1