Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6656685ybi; Wed, 29 May 2019 11:00:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqylE6/9KGKO+Zhd1dEKnrAde4jEQAvMZtWu84SODG1wA2/amI/B0t7W/XjnDdkptGCCxlhm X-Received: by 2002:a17:90a:c481:: with SMTP id j1mr13844242pjt.96.1559152827605; Wed, 29 May 2019 11:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559152827; cv=none; d=google.com; s=arc-20160816; b=BfvgI/M4extRV+5D5uQLvPoLTtMCq2KywkC/bVLDiZ5HVEOQ5mOvPkh22Ht0UAunes 6ITBETBjKjoYAJiK5hEl3fQUQZc4g+nXdFcIssK2ySSJGXPfvi/80CG/3KzmZ0Dv0dQy 6jARk5St5dKBPHOV6FzMb/kRWGm9ZuxVqyaDankZGjyN3eUb9L4e+3YyJ9oNafytvYkG inmaYIeKUJBXcBEv2g1D3FV4rOLqn4teVzdtfl4CCOPPVzR6QJDw6EXXm6X7c55fzZps 6qYEecdvUyY9Xw/W21qssTx+da4yQVs1jbPxaJ5C4f1tKyUwJmBU29UouQrJNVIelGk6 Tukg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=BxwrAqO9UAXV6UenFSJjDbgaMZFeylmamm3RqPV+N2k=; b=ubA2slMp5XzDEMzpQD5T3ZPHanMo0RhcFLFaupWt6G8oi5INxZAvQnyNIPkVF1R7us 8/qc93AlnsXB1wlRtxWrR5KB072JcAlkdzQDjnfO3Mpv9Wllj7GU6+ls5H8gVtU37twB f9EEImMikfkigkULsu6tCv13WjkLBt9l0sLOqpM/Rgs/oJwJjunklwGeXrszyVE8YpAZ tbOEcRFZEPpVRQyVNDbF25EKb+zR7MiIpIGblou9DXbMwavorbKdH3yqXEbqdpXxwkqn 3azzGhdI74rmAoBRy495gpRCcoSsutojMbB+kdhhKaqQp7qrwFXWdPAHORkURmVO+2A+ DCXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tZ59KD1w; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m19si327412pgb.427.2019.05.29.11.00.01; Wed, 29 May 2019 11:00:27 -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=@gmail.com header.s=20161025 header.b=tZ59KD1w; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726205AbfE2R66 (ORCPT + 99 others); Wed, 29 May 2019 13:58:58 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:45008 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbfE2R65 (ORCPT ); Wed, 29 May 2019 13:58:57 -0400 Received: by mail-pg1-f193.google.com with SMTP id n2so325957pgp.11; Wed, 29 May 2019 10:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=BxwrAqO9UAXV6UenFSJjDbgaMZFeylmamm3RqPV+N2k=; b=tZ59KD1wTs2TjPkbXAhQzJkB5G/NBo1yGQ1cYu4X+m4W4fIUbT2O4NgcHvqQwUE/h1 ro0tS9OZi7F/oKAmx2a3DDICMaCM6X3+19xizHqFbXsM4RNtrXCcZv8FzDadAQHWAPhX wGFT8p4BvITfHOdjr2jIfyuOvLBtsdsU9FZQuNngBPq+oCLIG+YEwq4HjCsEMP7pIr/3 TYWbQJuqbtih6HAdGmswWyWn36aK9CgrbrEOXmKRDRUM3kxCGoh9ZhOgSnCyTX9HD6zk XSBj2wRzYTCV4tHRIOQRRMq7MZla8qhN2JrpSgbIEuPIltRArLNriYMX0EQac+kmvVEM oZMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=BxwrAqO9UAXV6UenFSJjDbgaMZFeylmamm3RqPV+N2k=; b=MnZSxpJ0R2vEHVH6MkAQg2yv74NHThLbbyTWIIGIQbn0XpDrs8RDLsLWNprmJO33qo /KY2Xo2H5edAlul6S0Zr6Mw2sw3bCYVPpDvtdUCkIoWQJniTSl2UJMlz4z5v0B4LPH9m h39ukSrEeyaEw7TS16QOQVvQp6wxCbfQgrDRf3lPl52in3Hl6+mTuUPMVb4Coz/Cw8Ju vGhzUl98IgnxwpybXC1YzTSkDMtTirICn/RWgytMMJuosZI67UiYNPfC6GrE73KPCHfZ xOEUPCAjuPMR6DQyxXSErmxb8syPoAiTSj9xfMCd5Lqwe+pCBYE1KDnDpC+p7ThaYIXf 98yw== X-Gm-Message-State: APjAAAXgaMo9mUUza8TXyL2BN7S3durYz7aD+4nI4G2rJ7vQqxsnOXyN 6yvwVV8ywkgU+J8AKhwuey8= X-Received: by 2002:aa7:8acb:: with SMTP id b11mr150551391pfd.115.1559152737270; Wed, 29 May 2019 10:58:57 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.89.153]) by smtp.gmail.com with ESMTPSA id l38sm182909pje.12.2019.05.29.10.58.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 May 2019 10:58:56 -0700 (PDT) Date: Wed, 29 May 2019 23:28:51 +0530 From: Hariprasad Kelam To: "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [Patch v2] wd719x: pass GFP_ATOMIC instead of GFP_KERNEL Message-ID: <20190529175851.GA10760@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org dont acquire lock before calling wd719x_chip_init. Issue identified by coccicheck Signed-off-by: Hariprasad Kelam ----- changes in v1: Replace GFP_KERNEL with GFP_ATOMIC. changes in v2: Call wd719x_chip_init without lock as suggested in review ---- --- drivers/scsi/wd719x.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c index c2f4006..340ec92 100644 --- a/drivers/scsi/wd719x.c +++ b/drivers/scsi/wd719x.c @@ -505,11 +505,9 @@ static int wd719x_host_reset(struct scsi_cmnd *cmd) { struct wd719x *wd = shost_priv(cmd->device->host); struct wd719x_scb *scb, *tmp; - unsigned long flags; int result; dev_info(&wd->pdev->dev, "host reset requested\n"); - spin_lock_irqsave(wd->sh->host_lock, flags); /* Try to reinit the RISC */ if (wd719x_chip_init(wd) == 0) result = SUCCESS; @@ -519,7 +517,6 @@ static int wd719x_host_reset(struct scsi_cmnd *cmd) /* flush all SCBs */ list_for_each_entry_safe(scb, tmp, &wd->active_scbs, list) wd719x_finish_cmd(scb, result); - spin_unlock_irqrestore(wd->sh->host_lock, flags); return result; } -- 2.7.4