From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755988AbdJJLEN (ORCPT ); Tue, 10 Oct 2017 07:04:13 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:35875 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755134AbdJJLEL (ORCPT ); Tue, 10 Oct 2017 07:04:11 -0400 X-ME-Sender: X-Sasl-enc: hF/HaMc3BLF32vH0O+JNH8W/9vXGKzmiO33R54oj9p+M 1507633450 Date: Tue, 10 Oct 2017 13:04:20 +0200 From: Greg KH To: Mario Limonciello Cc: dvhart@infradead.org, Andy Shevchenko , LKML , platform-driver-x86@vger.kernel.org, Andy Lutomirski , quasisec@google.com, pali.rohar@gmail.com, rjw@rjwysocki.net, mjg59@google.com, hch@lst.de Subject: Re: [PATCH v6 13/14] platform/x86: wmi: create character devices when requested by drivers Message-ID: <20171010110420.GA16994@kroah.com> References: <897883f9b8c45dc2cb24de1bb4642513734852d3.1507589249.git.mario.limonciello@dell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <897883f9b8c45dc2cb24de1bb4642513734852d3.1507589249.git.mario.limonciello@dell.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 09, 2017 at 05:51:51PM -0500, Mario Limonciello wrote: > +static long wmi_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) > +{ > + struct wmi_driver *wdriver = NULL; > + struct wmi_block *wblock = NULL; > + const char *driver_name; > + struct list_head *p; > + int ret; > + > + if (_IOC_TYPE(cmd) != WMI_IOC) > + return -ENOTTY; > + > + driver_name = filp->f_path.dentry->d_iname; > + > + list_for_each(p, &wmi_block_list) { No locking while walking the list, you are brave :(