Message ID | 20190213185324.21652-8-hmadhani@marvell.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-scsi-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 318BC922 for <patchwork-linux-scsi@patchwork.kernel.org>; Wed, 13 Feb 2019 18:54:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 207C82DEAD for <patchwork-linux-scsi@patchwork.kernel.org>; Wed, 13 Feb 2019 18:54:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 150EA2E047; Wed, 13 Feb 2019 18:54:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF2A22DEAD for <patchwork-linux-scsi@patchwork.kernel.org>; Wed, 13 Feb 2019 18:54:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436554AbfBMSyz (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Wed, 13 Feb 2019 13:54:55 -0500 Received: from mail-eopbgr810054.outbound.protection.outlook.com ([40.107.81.54]:44832 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2436550AbfBMSyx (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Wed, 13 Feb 2019 13:54:53 -0500 Received: from BYAPR07CA0068.namprd07.prod.outlook.com (2603:10b6:a03:60::45) by MWHPR07MB2910.namprd07.prod.outlook.com (2603:10b6:300:1e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.22; Wed, 13 Feb 2019 18:54:52 +0000 Received: from DM3NAM05FT011.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::203) by BYAPR07CA0068.outlook.office365.com (2603:10b6:a03:60::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1622.16 via Frontend Transport; Wed, 13 Feb 2019 18:54:52 +0000 Authentication-Results: spf=fail (sender IP is 199.233.58.38) smtp.mailfrom=marvell.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=marvell.com; Received-SPF: Fail (protection.outlook.com: domain of marvell.com does not designate 199.233.58.38 as permitted sender) receiver=protection.outlook.com; client-ip=199.233.58.38; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (199.233.58.38) by DM3NAM05FT011.mail.protection.outlook.com (10.152.98.120) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1580.2 via Frontend Transport; Wed, 13 Feb 2019 18:54:51 +0000 Received: from dut1171.mv.qlogic.com (10.112.88.18) by CAEXCH02.caveonetworks.com (10.67.98.110) with Microsoft SMTP Server (TLS) id 14.2.347.0; Wed, 13 Feb 2019 10:53:47 -0800 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id x1DIrloO021715; Wed, 13 Feb 2019 10:53:47 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x1DIrlj0021714; Wed, 13 Feb 2019 10:53:47 -0800 From: Himanshu Madhani <hmadhani@marvell.com> To: <James.Bottomley@HansenPartnership.com>, <martin.petersen@oracle.com> CC: <hmadhani@marvell.com>, <linux-scsi@vger.kernel.org> Subject: [PATCH v2 07/12] qla2xxx: Prevent SysFS access when chip is down Date: Wed, 13 Feb 2019 10:53:19 -0800 Message-ID: <20190213185324.21652-8-hmadhani@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190213185324.21652-1-hmadhani@marvell.com> References: <20190213185324.21652-1-hmadhani@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Matching-Connectors: 131945576921013042;(abac79dc-c90b-41ba-8033-08d666125e47);(abac79dc-c90b-41ba-8033-08d666125e47) X-Forefront-Antispam-Report: CIP:199.233.58.38;IPV:CAL;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(39860400002)(136003)(376002)(346002)(396003)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(47776003)(26005)(336012)(4744005)(87636003)(86362001)(305945005)(51416003)(36756003)(80596001)(48376002)(1076003)(76176011)(69596002)(54906003)(2616005)(11346002)(446003)(126002)(476003)(53936002)(486006)(50466002)(4326008)(105606002)(106466001)(8676002)(356004)(2906002)(316002)(81166006)(110136005)(26826003)(16586007)(97736004)(498600001)(50226002)(85426001)(36906005)(42186006)(68736007)(81156014)(6666004)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR07MB2910;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Fail;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;DM3NAM05FT011;1:b1ULehvvkK1+HQGRJOxtIevDp5iDrFuFrgSU0h2sSpV6CtLw2EN/a2fYQNu8Y07e6Px4iWtJr20F1TpGwygvNfmVEPeux/bvHHtcaMclaAbD0xQt2pQVZG54DId3lgg5SCOkZqzNlC44vV3F35BtTA== X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8805567a-e33f-48ed-f232-08d691e4bc77 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600110)(711020)(4605077)(2017052603328);SRVR:MWHPR07MB2910; X-MS-TrafficTypeDiagnostic: MWHPR07MB2910: X-Microsoft-Antispam-PRVS: <MWHPR07MB291020CC8CD0BE38828EA7BDD6660@MWHPR07MB2910.namprd07.prod.outlook.com> X-Forefront-PRVS: 094700CA91 X-Microsoft-Exchange-Diagnostics: 1;MWHPR07MB2910;23:/rDFhmIRHpa9ecscxauPZKHH6A2aKD3bj899hyTdSGIni1p7yPY39HsuMy+L2VdxRDwIrv7+m8WZnmuSCL9JJ3P39Ukr2GZ2V5uh7AYK9qxDRS2+ZVvRZ52emyI2j6iO638LxPGCSD+NcPhOHzA/IqW017dqI18U5C6fXVnGzPbB2DWHieOd/zrvsZRVvO5GdHJFskxVgeBXU33udVXseRRTgkFd9Hn9eJNsbVqHjOXplJMvncsi+Dnr277aytXLZR3tIpk9PvGPGS6pGkoUoxrhIBmQ2Gc7dc2ouxGd9V3enbSTiqenw4YYIgony3D8aHwnphg9ptgIYi1fwlHAFxDAFmFtCFiR/V27v2eWzryXh7h4OztH0JIXVoFn7nuh9Vils7FHAt3VZ2OVLgUo3MFCC6HtXRX8VZ8eg7yhvJuwQtf25kGNRA/SkLt26p1PfAFpZD6pVm3tFnAgMPdqnyjOnEeIEjY2VbrTODr69XLmNhFTYGEXDJpHYapt9cMB+7ToCaHPRXNpWGD+yNX+TQHNOSJ/JfevxMteaUMe1sV5KnxN+D0xM+HZTbXlUG0kHwqHXV9teS+d9BG5lZtn+4NFROnQ3DK4xYdSS3YLvst891k+ncTJQMupdAsYlm/knXG6zJTmSNj8GkCNKE9CCOvRL2fkFb01OCyGTP5DRZ7d+5r9L5A2mEn0yWEPE8M3LOkrsa3aBlj+P02vuEWoZNSzGu1hYD4KoX+hSakCxpep+ceOzL1IhfXWRMBJcqDHmjlgucVmXT1+F9Cw0ug2m+fgGQd5rQWOIbVxedoNPamVx+9Uw3F6J28QzGfDIRuOe+9ZR/NzVgAhsgvDSZXmfOOjLZjiFHeXS69MsjedHaKBFMb4M+1wOOFDyIFGrOo9JSlNUOLmKT4dpp6CD7hZXXSsEaXZoYohKVeDcyN0Nk863J0AsZytn8DCDQZdY89hKCzuKeR3prgETBaP5HoHbzhpmRdsvYWnZawfepjpyCizPV/ZGRt4SK4Y8g1XK35nVHnOnKBWVcgOvOX1o93GM47+uXaR3K+y+czJeLzv3rDpvsWGUwoMkZwi2wwLUpPVXZ3zBPcBGI4PMbyd0vhmPXrGs4lGEA0SNyvn6eR/7ThPT5gNZUrW6oRrI1Sr44RoQFNATFjpKjhbW1URpPcF5a8j6LnotY0MgIbW57gDE3MvJXnRTUbkLDesSuASrck+QRZUuXUSj1T900A5WvPtgA== X-Microsoft-Antispam-Message-Info: d5yZpPATs9UAubdHc9Jhflnm/PSlcnIpPrwVaMzeREVeXPQrIAM3ZcCny/Tiy4O0kmSxMV3l4Mv74hD70uF05+5lm6GMNjU7iTtkFiPNTA470RMmfaWHKPq+tCXcY88MdDjV7hFM767eyEMUyq3mqGrRlC+o9qUFw0NlE0huQ/J5R6IeS5z9j1V+wDOnLpVTIL3PGUrz8DWv5Ah9SHbNbwdRZvhYVoiiVy7CM5BmmQpPyw6VS7QXz0CnKCFD+0cZ6ZG+VsW3upiiW0ErWwX0dPRrwXI/KEppu5DQsD59dCS/OqapxtyL4CWqTH23KjayvlWCPpiUW9pLdqVCovSUXLaQUQbvGVUFhVUCSZBpNeJc6JZLpu6AZ9Gay0iFCJZ2mH5Kcqvc05yPWPufXDnRo3AF30S8XpKQX0x6Nc4bwHA= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Feb 2019 18:54:51.6519 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8805567a-e33f-48ed-f232-08d691e4bc77 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[199.233.58.38];Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB2910 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
qla2xxx: Misc bug fixes for the driver
|
expand
|
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index dcdfcf3bc955..ad947bdbc924 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -543,6 +543,9 @@ qla2x00_sysfs_write_vpd(struct file *filp, struct kobject *kobj, if (unlikely(pci_channel_offline(ha->pdev))) return 0; + if (qla2x00_chip_is_down(vha)) + return 0; + if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->vpd_size || !ha->isp_ops->write_nvram) return 0;