Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp631674imm; Fri, 29 Jun 2018 03:56:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfqbLFdBQBlNBiOT5qdLIrtdWPj3LSpj/mN0SoSkgEt2JBbnfJzTED5G8o88Hk6EvvmQT+l X-Received: by 2002:a62:c00c:: with SMTP id x12-v6mr3966786pff.216.1530269803894; Fri, 29 Jun 2018 03:56:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530269803; cv=none; d=google.com; s=arc-20160816; b=OWY2vFkXjcOmIMgdeWRax98VgBIohbQJU6BdL1pZFRILeUXVDQArqo2VjcBcnpqREp YMiBTKhGIst5ia9EoD57LLuIwamIk3o8nfLOG/cV7FN3KjmwVcdRgVj6/MOdSOKUAHgN 70bxijyLwqnUwJBYJE3qj0mp2wzkad2T1/7IZVf4i6tuPqvafM0S9SZnRSJPSCTf89K/ dwjIwNieXPQVVe9eY3+3/dnVCsHJ1dalh2wweUw/TyH0e8kTwB7/akeskRMqTGKDzkEY f2P0S4dOC9UaCI0bPqsMYQYrZIGxpQowwPidlpC88bWfYoYYzJ7WJ0FT5fAs8AdYJfFF ObKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=1Z4iWXAJdVATxeVEZtwaaJnjo4B0FGuNpNp9tiTU/j8=; b=jvta7Nv14jXIsxAEqnhvXYJ5eHfDBT3UTdhiL7MztLGViWjtc6rjwuUzq8CcHrTLtV c2lb2BMJMwKmxn/PdE1TK3xXAucSMqVsSZPX/OpO4E0goIOE4CX4/n+HXn7qOar2WSL1 XVUEGG6igu1O1l72Tzcf4QxBaXV1xQj53KlLeqST5v6GdyYeH+ckgMnLQnXTHsLJNtea 93VXdqAgYDU3uY5RYmB9ZtQVWbrwYnIjvJxKE7OLjRv2KWGZCyrJfBPhSqiNLjp6+lDZ n1EkiRvjk/SczO8MXAPYF2FXioSSEQeVt1EFIt/dY/EwlrXgC3ECOro0+82TNtdl97W/ DuSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=S9OC0urU; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4-v6si8420012plm.181.2018.06.29.03.56.29; Fri, 29 Jun 2018 03:56:43 -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=@oracle.com header.s=corp-2017-10-26 header.b=S9OC0urU; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753900AbeF2HqV (ORCPT + 99 others); Fri, 29 Jun 2018 03:46:21 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:38566 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751106AbeF2HqT (ORCPT ); Fri, 29 Jun 2018 03:46:19 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5T7iEjs195275; Fri, 29 Jun 2018 07:45:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=1Z4iWXAJdVATxeVEZtwaaJnjo4B0FGuNpNp9tiTU/j8=; b=S9OC0urU60/U1WHieaIZ/Z2zt2ZfIN5hOjsC2oi1j2cee+0QQ2bVbPBbhUsigb6u3xP2 9UheXwj60r9kOr/PvHn3LqlWYTCDAojCrrDwL0qYKk+7CbjmkSj2SrDI8TUVMdQkeHSJ gH1le3lTtiYYvT8JWL//4shvqhI7p3SP/Hw6JRpfnz154lBxymLUwVU52O3DKKMnvso8 BWodoB3BoRyj/B44YGeZienjKayyOS8KHechaHq2Ev5TLeDMrwkYDfAdDJLcS520lHPs ObetP8FmpEhGghyWdGvUQXXTeqiFltdW5D9MSb6OgbL53M7qsCno2zXYXxfkrANShbCl CQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2jum0ad6c1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Jun 2018 07:45:48 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w5T7jkGO030750 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Jun 2018 07:45:47 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5T7jheC016541; Fri, 29 Jun 2018 07:45:43 GMT Received: from mwanda (/197.157.0.49) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 29 Jun 2018 00:45:42 -0700 Date: Fri, 29 Jun 2018 10:45:33 +0300 From: Dan Carpenter To: Karim Eshapa Cc: lars@metafoo.de, devel@driverdev.osuosl.org, Michael.Hennerich@analog.com, linux-iio@vger.kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, pmeerw@pmeerw.net, knaack.h@gmx.de, jic23@kernel.org Subject: Re: [PATCH 4/4] staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler Message-ID: <20180629074532.cbwwjx2lh6cc3f72@mwanda> References: <20180628234928.4205-1-karim.eshapa@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180628234928.4205-1-karim.eshapa@gmail.com> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8938 signatures=668703 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=636 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806290086 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 29, 2018 at 01:49:28AM +0200, Karim Eshapa wrote: > Use GFP_ATOMIC rather GFP_KERNEL in interrupt handler, > as GFP_KERNEL may sleep according to slab allocator. > This is a threaded IRQ so it can sleep. You should always think about the impact of a bug. If this were a bug it would have showed up in testing right away. Most of my patches are in error handling and so the impact is zero unless you deliberately try to inject errors that's why they can go undetected for years. Also you should always use the Fixes tag to see how the patch was introduced. I often see bugs where the patch is new and it was introduced by someone doing major subsystem cleanups and they don't have the hardware so I know it hasn't been tested. If the patch is a couple years old and the bug is in the success path which every one tests then I wonder if I am misreading the code somehow. regards, dan carpenter