Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp7749242ybh; Thu, 8 Aug 2019 22:45:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqwpwew7a9DZ/ecm8dQ5CwhKhPTyvlnLMBw2Xojm+L0z3dpV0HTyTDEQSl6N1pnItbMGmiv1 X-Received: by 2002:aa7:9ad2:: with SMTP id x18mr20349557pfp.192.1565329516863; Thu, 08 Aug 2019 22:45:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565329516; cv=none; d=google.com; s=arc-20160816; b=Wdbo6Dw8fbgvediKBBBRov5PHh28IzJwdiNS3obc4hlr3SDKSBVYua70ivbqKIb9eV ktQGNy3Hzv/gm4GjguYhXelGsPbCNfIc5SBU4mTPhh04KmiZ3bKojc6Yw98mNossDpQC iW6wL6cz47GZu6zPZ64cwYnqsxedkLwXnewROhATt6ZnWieDeNRc7Tl6G9dXklE36SWZ 0VzCWpoVzNEEVAYeNP8XX7SBAkUo3lrzl2w5Wmou45/WFdN7QEAZt82I28ooo0sL/+Fs e8YjSG2ka1pR+o+Q3Bz8ILXfERg9hHV3OX4Y0LbMWZsYYPU6UlthrnbfH7+3QQA9lp2M dquA== 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 :references:in-reply-to:from:subject:cc:to:message-id:date; bh=XGk75uSDZlnZlWdE7OFh8L9TFQOaENGMQEKBSI5ZzhU=; b=JNXZdbMk/S9sbFIvcYL+2+oLYvkpk8bV/0BoRpsODytfStOT5scm6yGBqXilNBiLaE aIPvXQOj7hjtffq6K1/qj19wvLJEMVHSfrHERE0EGMLyVjTln7FsRwJzKcj4DmfAkOlL OxKfJ6Cn4jiRbHy4ORt0rBTUCY9rsqCmxLae773WgRL99mgNC3OanDE5rZygx1PF2Kjk suMVYwDb0xgAxC+5B/uIjeKQkcDQ3MHLEv4WOx5t/CCTpIdiq9i9EgLLZM4on6WpDP+x 6qQU3vUWAxzFdrvAkm/eGtNBWxBhQhZ7r/vqG683bna/ik0wPQosELRn3KTgnSQgEpe0 NFLg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f26si55593767pfd.193.2019.08.08.22.45.01; Thu, 08 Aug 2019 22:45:16 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405565AbfHIFnz (ORCPT + 99 others); Fri, 9 Aug 2019 01:43:55 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:56316 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405542AbfHIFnz (ORCPT ); Fri, 9 Aug 2019 01:43:55 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 65A631449CBB2; Thu, 8 Aug 2019 22:43:54 -0700 (PDT) Date: Thu, 08 Aug 2019 22:43:53 -0700 (PDT) Message-Id: <20190808.224353.2118603027227019314.davem@davemloft.net> To: huangfq.daxian@gmail.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] net: tundra: tsi108: use spin_lock_irqsave instead of spin_lock_irq in IRQ context From: David Miller In-Reply-To: <20190809053539.8341-1-huangfq.daxian@gmail.com> References: <20190809053539.8341-1-huangfq.daxian@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 08 Aug 2019 22:43:54 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fuqian Huang Date: Fri, 9 Aug 2019 13:35:39 +0800 > As spin_unlock_irq will enable interrupts. > Function tsi108_stat_carry is called from interrupt handler tsi108_irq. > Interrupts are enabled in interrupt handler. > Use spin_lock_irqsave/spin_unlock_irqrestore instead of spin_(un)lock_irq > in IRQ context to avoid this. > > Signed-off-by: Fuqian Huang > --- > Changes in v2: > - Preserve reverse christmas tree ordering of local variables. Applied, thanks.