Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp95480img; Tue, 19 Mar 2019 18:51:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyazePy5HT45oOZtdnoKhBjtncgjIkSzoEqkiz4PjB2Xnv3y68a5JasEhRzXGJ8K0hYor9a X-Received: by 2002:a63:5659:: with SMTP id g25mr4483974pgm.436.1553046716541; Tue, 19 Mar 2019 18:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553046716; cv=none; d=google.com; s=arc-20160816; b=ew3xnEyY5wIz+HYgJLqhNojUoAdoP5+cDJRaxWlYpjMx3BCcviyEBkkfXyqY9cIkxy EUkADOBwbqI72wYaRuXgMQQfoZaSe8/ITMnUpyL+Pl+bym0ouWBqLLMY6Nw5c3lcadw/ N3NASa/VZ3xjuXjKCT7uDsrHJRzzwS4DkGw2vjG58DOtcdxUkeClDj/Ovh9p6iq8BnJ8 YhRsPj3Gz8CcAX5u9IEsKsdE/vP3Hu0ZAALqm94gnlitysRS/KTSuEptHm8SbuBIn1/7 bd89i8rvIktX0ucWXcVPdntwFpcUTH4ToHCXGH+aFYbxYU2qVJoy1CJZy+aiQp/ZJ74I HPSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=Z6YM3z2HxWHruj+ozRRXzjQ4LniCWXOTdnHYp7PZU/4=; b=q2cQ4UgFfoY4IzcPVhpkQXsR8edwHdpxNjderboTsauN+B2drzWwBWEpRClIdBr2lq oN4KFXadn5HzTP317q/Ly6+kainoxNUnCafaHLAVLLB0Q9fZ3abmn8ztszvXmZRXcuds DLkTjqBCMm8pcuuM4/td4cbM9YKdxv4/VKU4SmSwoZnG/3idsLP+yEe5CEJzYGCJhOhV jm9aBZEtbgzpF0EBPw1g+LksC1FU8sER3Mwgb6ochh2x30ootkplHTmE1q+7ch37QgkS 2nZxtA8NYtafV0YwAOy3My9RAkKfixDZL4f/SO0zNUO4j9dkhG2PSBMmxrVZvR8pbDhD AH/g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si418632pgo.394.2019.03.19.18.51.40; Tue, 19 Mar 2019 18:51:56 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727413AbfCTBu4 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 19 Mar 2019 21:50:56 -0400 Received: from mga11.intel.com ([192.55.52.93]:5867 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726884AbfCTBu4 (ORCPT ); Tue, 19 Mar 2019 21:50:56 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2019 18:50:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,246,1549958400"; d="scan'208";a="135736603" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga007.fm.intel.com with ESMTP; 19 Mar 2019 18:50:55 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 19 Mar 2019 18:50:55 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 19 Mar 2019 18:50:55 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.74]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.252]) with mapi id 14.03.0415.000; Wed, 20 Mar 2019 09:50:53 +0800 From: "He, Bo" To: Jiri Kosina CC: "benjamin.tissoires@redhat.com" , "linux-input@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Zhang, Jun" , "Zhang, Yanmin" Subject: RE: must hold the driver_input_lock in hid_debug_rdesc_show Thread-Topic: must hold the driver_input_lock in hid_debug_rdesc_show Thread-Index: AdTaDWtNLTEcOrQfQrCEZYJMmjpu/wEEXTCAACgVOfA= Date: Wed, 20 Mar 2019 01:50:52 +0000 Message-ID: References: In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmMzOGZiN2EtMzc1OS00NDljLWI4MjMtNWFkYmRkMjYwN2JhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTHRJdm52MENHYzZMYUpmVGxENEY3Zlh3VTUyNVwvdVFPa1A1NDJ5a3R0Rmh1aEJmMTgwWE5VdVRpTXNRYjVLRTMifQ== dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org thanks, without the patch we can reproduce with the way in 10 hours Suspend/Resume test, with the test, we can't reproduce for 30 hours. -----Original Message----- From: Jiri Kosina Sent: Tuesday, March 19, 2019 10:42 PM To: He, Bo Cc: benjamin.tissoires@redhat.com; linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; Zhang, Jun ; Zhang, Yanmin Subject: Re: must hold the driver_input_lock in hid_debug_rdesc_show On Thu, 14 Mar 2019, He, Bo wrote: > we see the below kernel panic logs when run suspend resume test with > usb mouse and usb keyboard connected. > > the scenario is the userspace call the hid_debug_rdesc_show to dump > the input device while the device is removed. the patch hold the > driver_input_lock to avoid the race. > > [ 5381.757295] selinux: SELinux: Could not stat > /sys/devices/pci0000:00/0000:00:15.0/usb1/1-2/1-2:1.0/0003:03F0:0325.0320/input/input960/input960::scrolllock: > No such file or directory. > [ 5382.636498] BUG: unable to handle kernel paging request at 0000000783316040 > [ 5382.651950] CPU: 1 PID: 1512 Comm: getevent Tainted: G U O 4.19.20-quilt-2e5dc0ac-00029-gc455a447dd55 #1 > [ 5382.663797] RIP: 0010:hid_dump_device+0x9b/0x160 [ 5382.758853] > Call Trace: > [ 5382.761581] hid_debug_rdesc_show+0x72/0x1d0 [ 5382.766343] > seq_read+0xe0/0x410 [ 5382.769941] full_proxy_read+0x5f/0x90 [ > 5382.774121] __vfs_read+0x3a/0x170 [ 5382.788392] > vfs_read+0xa0/0x150 [ 5382.791984] ksys_read+0x58/0xc0 [ 5382.801404] > __x64_sys_read+0x1a/0x20 [ 5382.805483] do_syscall_64+0x55/0x110 [ > 5382.809559] entry_SYSCALL_64_after_hwframe+0x49/0xbe > > Signed-off-by: he, bo > Signed-off-by: "Zhang, Jun" I rewrote the changelog to explain the situation a bit more clearly, and applied. Thanks, -- Jiri Kosina SUSE Labs