Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp950163imm; Wed, 20 Jun 2018 09:07:33 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ02f+9KFr8XvLHD5JumQyPgGWzTynVKhW9kJ0b7HvNy9CeN8utsjjoaYBTBJvtwb8YUFfc X-Received: by 2002:aa7:8058:: with SMTP id y24-v6mr14844662pfm.148.1529510853134; Wed, 20 Jun 2018 09:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529510853; cv=none; d=google.com; s=arc-20160816; b=ZEhov5XmjO7P8TrNMAzKU8JjxwNHkJRNh2KV5B3fWeQVvPGyRuYBLgHrX15DiWvaV3 /NWhWDqdg81xEDTQ2m9HE395M1NX52lMFSnt9V2tO8nzgWaDzg9If59NSw2CjKp6j0xE rLy0zvGVW4wYBQWC95i8rFjW3gW2EdKhdnS59YzhOEGArQzBtcjbk5EXmO3FofKpSaMU /UEqGUQRuh5yjyEYadr3Fe3I9A0TbkSWcf+WzgNEwHFfCuXsb8uqJeNDbGPwJxWg2ueN aAIoUe2m2m0SqX9VGPC3PjD+JLNh4JHP00+5uaYuXtIAcflSsgskWpLo8SMT5CEK9XGx wMRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:date:message-id:subject:from:to :arc-authentication-results; bh=aHVJcgRvQgbPlEr6yY0johurfHDKeWEtAYgq6tHFTOc=; b=MoVdaKZfNW3/kq3Gu6FQB6JIX4164SdRTPByJTIXMo+cTfF4oQwgnJ8jldzqaErpws Uxolbg2ShJeGyMbUKzHDwQx1UG5ibH9dQD8OOS7ZoCR+Z7KhD4mHkVlyoh2iGhjf8jfN 1LSi17TukU5lTiK0Tjb1t1ynmqH6AzklX9yBOYncwFE4TkuVyLv2nxm2Ca7/Ye/22bMt CrnkCftw2l2uRx5uKj6QMYv6V5/SnvENItL/lmfEb8r94ZwnEDo/Fds1NrfIB9X4CjF6 4S+JDo6HvY/eCeHkZkQg5JfcpUMyaeFvLIiDq59OysG12F++zKW78CKvlrlcNhfkjY+s fjcA== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1-v6si2117555pge.263.2018.06.20.09.07.18; Wed, 20 Jun 2018 09:07:33 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754243AbeFTQGO (ORCPT + 99 others); Wed, 20 Jun 2018 12:06:14 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:53642 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754184AbeFTQGN (ORCPT ); Wed, 20 Jun 2018 12:06:13 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D69B940201A2; Wed, 20 Jun 2018 16:06:12 +0000 (UTC) Received: from [10.10.124.140] (ovpn-124-140.rdu2.redhat.com [10.10.124.140]) by smtp.corp.redhat.com (Postfix) with ESMTP id 221AE2026A41; Wed, 20 Jun 2018 16:06:12 +0000 (UTC) To: hamish.martin@alliedtelesis.co.nz, chris.packham@alliedtelesis.co.nz, Greg KH , Linux Kernel List From: Mike Christie Subject: uio regression in 4.18-rc1 due to "uio: Prevent device destruction while fds are open" Message-ID: <5B2A7B73.5090000@redhat.com> Date: Wed, 20 Jun 2018 11:06:11 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 20 Jun 2018 16:06:12 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 20 Jun 2018 16:06:12 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mchristi@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hamish, I am hitting a regression with your patch: commit a93e7b331568227500186a465fee3c2cb5dffd1f Author: Hamish Martin Date: Mon May 14 13:32:23 2018 +1200 uio: Prevent device destruction while fds are open The problem is the addition of spin_lock_irqsave in uio_write. This leads to hitting uio_write -> copy_from_user -> _copy_from_user -> might_fault and the logs filling up with sleeping warnings. I also noticed some uio drivers allocate memory, sleep, grab mutexes from callouts like open() and release and uio is now doing spin_lock_irqsave while calling them. Note target_core_user's irqcontrol looks buggy and was just doing more work than it should in that callout. I can fix that driver.