Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp645567imm; Thu, 4 Oct 2018 00:36:02 -0700 (PDT) X-Google-Smtp-Source: ACcGV61mcH9mkkxTU/pRGmHTJHHKs7nr8T2e2TSBshxeO2xJZxvU+LO14KJJmU5gATZV7tiY01ZE X-Received: by 2002:a17:902:be16:: with SMTP id r22-v6mr3658578pls.293.1538638562213; Thu, 04 Oct 2018 00:36:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538638562; cv=none; d=google.com; s=arc-20160816; b=cCnFww+m7Fv4L5WeugAx+t/8yqCxkqWGGamjUY6XJ42Z2HXtcZMgLp2k6YWSa7X7P9 IYVCOviighIcC2p+eRkr9vLVBazCqFm8drGdApOmIxzua/AcSDDufc+cwY8+5frC4gFJ bzotz1yAbN0gFTVg8+lCIixNva1jCLx0Y9WcLbKIGZt9Xa4+pKR43kGmVIZTu5HjVlbF rwXtl0CCyal+wScqi+hvS8WDg+mYJZ4J1mPWAbK4bb08UUw6KKDvufgTzi59Ngq8LLsZ 9L2ugOyDEW49Kzh3fPWIXVrhodPwmD4rOnKRUyeStmQvjLoGw//laHJop/bRwCLVj/g7 fsrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=uapnb2YWCohD7Zxt2TKLTBlYPqcV92/LLa94Km3ZO1g=; b=LwzQdSP0Elcz4EfDte76Xnr2PkvRFX+saeEyKwKIAfIvqS82gdeRq12UjQSg4+4ujA ugfSM4Y6o2UKfF8cvTOpY/5tOT4Ei8KVrjzjNP0TH+0T0/oZs8ZE7/bPVdhYSnqVwXJh IYbGa/Dj1vS81o6rHLAS6vyphrdzTpZAyh7Cg8OSrfiZ1l3TEKqKimVA2FHhJL2+Ipbk /eA7VPVZpaXnURs4R5SEbx34v/3gaQ3wA132z2u7olRVdnM5rFEni9/oBdEKhSUiFI6x +bR59g+Flhu/hkI1yu84SqSPwbFG8brIyfNE0nAfq+76WTzsPKgfsRWhU3WcOBKPS169 76AA== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z20-v6si522263pfe.245.2018.10.04.00.35.44; Thu, 04 Oct 2018 00:36:02 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727354AbeJDO1a (ORCPT + 99 others); Thu, 4 Oct 2018 10:27:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:37056 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727206AbeJDO1a (ORCPT ); Thu, 4 Oct 2018 10:27:30 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 79877ACC5; Thu, 4 Oct 2018 07:35:36 +0000 (UTC) Date: Thu, 4 Oct 2018 09:35:35 +0200 (CEST) From: Jiri Kosina To: Jia-Ju Bai cc: benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] hid: hid-core: Fix a sleep-in-atomic-context bug in __hid_request() In-Reply-To: <6bea4185-3325-b04d-56ed-2fdf4c74d8ae@gmail.com> Message-ID: References: <20180913033432.16336-1-baijiaju1990@gmail.com> <4c0096c6-3745-963c-5086-5f579792599b@gmail.com> <6bea4185-3325-b04d-56ed-2fdf4c74d8ae@gmail.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Oct 2018, Jia-Ju Bai wrote: > > Why? Forcing all the report buffer to be limited to be non-sleeping > > allocations just because of two drivers, looks like an overkill, and > > actually calls for more issues (as GFP_ATOMIC is of course in principle > > less likely to succeed). > > Okay, I thought that using GFP_ATOMIC is the simplest way to fix these bugs. > But I check the Linux kernel code again, and find that hid_hw_request() are > called at many places. > So changing this function may affect many drivers. > I agree to only change the two drivers, and explicitly anotate __hid_request() > with might_sleep(). Thanks. Are you planning to submit a patch to do that? -- Jiri Kosina SUSE Labs