Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1327646imm; Thu, 5 Jul 2018 20:41:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfYSVLHqISwDLKiRry0UchzfS3DMgpO1NaYi5vhuwQu/kYZVCtSYPDEaUSqlJkvKwJ/29to X-Received: by 2002:a17:902:722:: with SMTP id 31-v6mr8869680pli.3.1530848516822; Thu, 05 Jul 2018 20:41:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530848516; cv=none; d=google.com; s=arc-20160816; b=IFv04aZZvROWAJfGd7OnhlOrQYMog/qhe7kxflWcK9Koou9Yx306xr5XWvaCZafj1o Ou6f5XNBnssgx6/Li7vJXnF9RbfWL3FzJLUzUdEiSEk2waGAYDOxhmqoLW0VFTRX0FdK O1NHi26DUrCX/eOHT6BUBY+3HKRIUZv2ny7nOwk9QWluPNMLR4dsGEqqQhjVd8vBc4M5 PcVf6bN+uulaHQ8UE0xC2FL0kLt3yIpljkXHFZehNYRCqq7PaxEItiWAZrNmpJBqF0Vp O0ucLomjK0vjIIWxjZhr26zGkReHTrLoAhhCH/zXuQJ2LM49/p4kMn3eUIb/7JgvDWNT g7aQ== 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 :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=/yJ8NcpzhiF1NfzY1W8nfS/c6NmN5+8oXV05+VnoLJI=; b=pYx1NrbA8+M7OSObT7G8B7P5PDlU3Qgtmt35LwBsCt/QY3CUdS31LLLpbXdImkwoit 5qTiknd1NQd12/M+DxZv4ZkQe2OeMEZF24l1ShV23A/k4fAmwiMOUBOFGeAuKfuxVrIH Au6cV0p6C6AlSEyhOEM8sYIaAPflqJr5qftiswQgqnPy9l/zcfEczd70SAy/ECsG9Yeu KT/5hLIZTXOSHJ00GWLRrBR4q/PCv/VWOiy3e4WYqxOZrSxJ4rqyh+SWers8ib1Cb70F BdoU/NKqaFQbcZgKgtzm8bNuR8tAKJM1rl7HMb/p6MEuPGbLuAEbU7Fn0xfTmApp3si2 6cmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail header.b=fD6SDzSX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y186-v6si7061437pgb.395.2018.07.05.20.41.42; Thu, 05 Jul 2018 20:41: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; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail header.b=fD6SDzSX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753974AbeGFDkY (ORCPT + 99 others); Thu, 5 Jul 2018 23:40:24 -0400 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:34687 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753902AbeGFDkX (ORCPT ); Thu, 5 Jul 2018 23:40:23 -0400 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 448F08364F for ; Fri, 6 Jul 2018 15:40:21 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail; t=1530848421; bh=/yJ8NcpzhiF1NfzY1W8nfS/c6NmN5+8oXV05+VnoLJI=; h=From:To:CC:Subject:Date:References:In-Reply-To; b=fD6SDzSXttuHnOfOFuqaZjiovNp3ASHxOZRKqBmaR1voTi5Lzynsw42f9IrCj0Nx1 AipmMpz5ub8gqZwX+Y8kajEo+DmJCjaRirASyHSKuPQGtGR3IAERU23QFp/k7UKMvK HbgspwpNqI/eqD4johhprqOFskVsi1MToZ+GRQrk= Received: from svr-chch-ex1.atlnz.lc (Not Verified[10.32.16.77]) by mmarshal3.atlnz.lc with Trustwave SEG (v7,5,8,10121) id ; Fri, 06 Jul 2018 15:40:21 +1200 Received: from svr-chch-ex1.atlnz.lc (2001:df5:b000:bc8::77) by svr-chch-ex1.atlnz.lc (2001:df5:b000:bc8::77) with Microsoft SMTP Server (TLS) id 15.0.1156.6; Fri, 6 Jul 2018 15:40:21 +1200 Received: from svr-chch-ex1.atlnz.lc ([fe80::409d:36f5:8899:92e8]) by svr-chch-ex1.atlnz.lc ([fe80::409d:36f5:8899:92e8%12]) with mapi id 15.00.1156.000; Fri, 6 Jul 2018 15:40:21 +1200 From: Hamish Martin To: "xiubli@redhat.com" , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" CC: "jannh@google.com" , "pkalever@redhat.com" , "pkarampu@redhat.com" , "atumball@redhat.com" , "sabose@redhat.com" , "mchristi@redhat.com" Subject: Re: [PATCH v3 3/3] uio: fix crash after the device is unregistered Thread-Topic: [PATCH v3 3/3] uio: fix crash after the device is unregistered Thread-Index: AQHUFNUb+Q1iLh9WX02pkU8h29ZSG6SAw0sA Date: Fri, 6 Jul 2018 03:40:20 +0000 Message-ID: References: <1530845836-49101-1-git-send-email-xiubli@redhat.com> <1530845836-49101-4-git-send-email-xiubli@redhat.com> In-Reply-To: <1530845836-49101-4-git-send-email-xiubli@redhat.com> Accept-Language: en-NZ, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.32.16.78] Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org TG9va3Mgb2sgdG8gbWUuDQoNClJldmlld2VkLWJ5OiBIYW1pc2ggTWFydGluIDxoYW1pc2gubWFy dGluQGFsbGllZHRlbGVzaXMuY28ubno+DQoNCk9uIDA3LzA2LzIwMTggMDI6NTcgUE0sIHhpdWJs aUByZWRoYXQuY29tIHdyb3RlOg0KPiBGcm9tOiBYaXVibyBMaSA8eGl1YmxpQHJlZGhhdC5jb20+ DQo+DQo+IEZvciB0aGUgdGFyZ2V0X2NvcmVfdXNlciB1c2UgY2FzZSwgYWZ0ZXIgdGhlIGRldmlj ZSBpcyB1bnJlZ2lzdGVyZWQNCj4gaXQgbWF5YmUgc3RpbGwgb3BlbmVkIGluIHVzZXIgc3BhY2Us IHRoZW4gdGhlIGtlcm5lbCB3aWxsIGNyYXNoLCBsaWtlOg0KPg0KPiBbICAyNTEuMTYzNjkyXSBC VUc6IHVuYWJsZSB0byBoYW5kbGUga2VybmVsIE5VTEwgcG9pbnRlciBkZXJlZmVyZW5jZSBhdCAw MDAwMDAwMDAwMDAwMDA4DQo+IFsgIDI1MS4xNjM4MjBdIElQOiBbPGZmZmZmZmZmYzA3MzYyMTM+ XSBzaG93X25hbWUrMHgyMy8weDQwIFt1aW9dDQo+IFsgIDI1MS4xNjM5NjVdIFBHRCA4MDAwMDAw MDYyNjk0MDY3IFBVRCA2MjY5NjA2NyBQTUQgMA0KPiBbICAyNTEuMTY0MDk3XSBPb3BzOiAwMDAw IFsjMV0gU01QDQo+IC4uLg0KPiBbICAyNTEuMT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