From patchwork Wed Oct 25 01:55:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 117002 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp320183qgn; Tue, 24 Oct 2017 18:56:59 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RQ0DgnIMnuAXTnw2Nw8QIYRM9Wh3nN0JW6Yz5+eDcQ7c8mB5/q8GBVQGuBqKCoeEJrOCLt X-Received: by 10.98.33.90 with SMTP id h87mr599796pfh.312.1508896619316; Tue, 24 Oct 2017 18:56:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508896619; cv=none; d=google.com; s=arc-20160816; b=TyxOvMd9PjGLW87ng7DNIWXHEmyH5jijpGl0Mskv6T7UAJfLXxJB/aruc/zRpPe8to v0VxC0R/tTI2BH0JT7Jq0tBSeCqk536BTjUc0NJ+3eLExADeqMjtDUJu/cYTi58xFd/U wyVxEdylNVqfezJY8uIaR53kIOvMDFM+j/0qQeDJQx0hAg05GPWEof6uLc50HlERCHGj hzZpIbf9JSAZ1Cq7WyyjOUHEiMu5ecC1TUQlvwUr+lHCyd9y+3UblAfqcccURJCqTnHw CQGAnJXhyPSzwDp2r9B5sn+bkSp0k/qJbZtSRmr+v5myomOENrQRdxPXDRjDajXIZL/2 RUBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:dkim-signature :dkim-signature:cc:from:dkim-signature:arc-authentication-results; bh=2G5QbN9pVgGoShaPRdHP0l+HgTi+f4ZKRLTLE/tSbj8=; b=gpv1LuBiUosvfLvH40fYf3sW6OYCQpWWVW0yiNDWzmtM1t8qBkDw7xmrOrVQ9aSZ9+ I5N9qS1S+V0e73OpOQU6VEtTRue/1PRgk/C91aStPcgE4rZbp4zCaogdVacMfByoqN3D W5ALIG6U4gGcX80zqrVIWZCupxihDjmijgFEwgah/nXQrVg8SioXRroHBbzatYpy5Mz+ rk8PO8Hyk77XsfVLIWhZsViJ7IB7ks0j0bGo7KWZbsHftwS8qX6ImIXlpeRa/gxFne4e kk5FitK8lpNkvnrh4ipozvltDn8BvXxU5S2dUZ1K6K8cUZubTzXjHtZVBRUXmoktFlrY Xgmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verizon.com header.s=corp header.b=H3CkHrrF; dkim=fail header.i=@verizon.com header.s=corp header.b=rBWYJ2q0; dkim=fail header.i=@verizon.com header.s=corp header.b=rBWYJ2q0; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g34si902586pld.207.2017.10.24.18.56.59; Tue, 24 Oct 2017 18:56:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@verizon.com header.s=corp header.b=H3CkHrrF; dkim=fail header.i=@verizon.com header.s=corp header.b=rBWYJ2q0; dkim=fail header.i=@verizon.com header.s=corp header.b=rBWYJ2q0; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932231AbdJYB45 (ORCPT + 9 others); Tue, 24 Oct 2017 21:56:57 -0400 Received: from omzsmtpe03.verizonbusiness.com ([199.249.25.208]:16025 "EHLO omzsmtpe03.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932290AbdJYB4k (ORCPT ); Tue, 24 Oct 2017 21:56:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1508896600; x=1540432600; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=p3bHQYe5vvQ1w+/gFuyWizTDEkwpqe5WyyMssjGjxBk=; b=H3CkHrrFNmJIv4KopxKvjWecYxP1kshek2aOidMUzkneCFYUz6QU+o/Q GcQlwgnx/8HbOt54M3tuT77yNCX0Uh/Py7ALlzL3+dTIZ05GRl3+hSUGb +HPqCgDUBSq+7wNOcIk2jru9pIuULk+lNWrwtJiBmcRI7RPDRD9mL1gRd 8=; Received: from unknown (HELO fldsmtpi02.verizon.com) ([166.68.71.144]) by omzsmtpe03.verizonbusiness.com with ESMTP; 25 Oct 2017 01:56:38 +0000 From: "Levin, Alexander (Sasha Levin)" Cc: Viresh Kumar , "Rafael J . Wysocki" , "Levin, Alexander (Sasha Levin)" Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi02.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Oct 2017 01:56:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1508896563; x=1540432563; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=p3bHQYe5vvQ1w+/gFuyWizTDEkwpqe5WyyMssjGjxBk=; b=rBWYJ2q0uZ+8qU8Mv7vj50YnM9gusSHvDNK2smMlD/CHnrGltVLNsv32 UfaOTE0Hclaq5DoRNQgAbLtSnLBw+n2EWxAEWYsfR+2y3BB+Irq/BlDx5 AupGFR6U9PJkeenYh0M23rpqIpkosBsaE2vuJHQCMjaKd2LzSloMbPtuv Y=; Received: from mariner.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.84]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Oct 2017 21:56:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1508896563; x=1540432563; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=p3bHQYe5vvQ1w+/gFuyWizTDEkwpqe5WyyMssjGjxBk=; b=rBWYJ2q0uZ+8qU8Mv7vj50YnM9gusSHvDNK2smMlD/CHnrGltVLNsv32 UfaOTE0Hclaq5DoRNQgAbLtSnLBw+n2EWxAEWYsfR+2y3BB+Irq/BlDx5 AupGFR6U9PJkeenYh0M23rpqIpkosBsaE2vuJHQCMjaKd2LzSloMbPtuv Y=; X-Host: mariner.tdc.vzwcorp.com Received: from ohtwi1exh001.uswin.ad.vzwcorp.com ([10.144.218.43]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 25 Oct 2017 01:56:03 +0000 Received: from tbwexch09apd.uswin.ad.vzwcorp.com (153.114.162.33) by OHTWI1EXH001.uswin.ad.vzwcorp.com (10.144.218.43) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 24 Oct 2017 21:56:02 -0400 Received: from OMZP1LUMXCA19.uswin.ad.vzwcorp.com (144.8.22.197) by tbwexch09apd.uswin.ad.vzwcorp.com (153.114.162.33) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 24 Oct 2017 21:56:02 -0400 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA19.uswin.ad.vzwcorp.com (144.8.22.197) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 24 Oct 2017 20:55:57 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Tue, 24 Oct 2017 20:55:57 -0500 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.9 09/50] PM / OPP: Error out on failing to add static OPPs for v1 bindings Thread-Topic: [PATCH AUTOSEL for 4.9 09/50] PM / OPP: Error out on failing to add static OPPs for v1 bindings Thread-Index: AQHTTTRk17WBvj8g80mmv+Rpwp9tmQ== Date: Wed, 25 Oct 2017 01:55:54 +0000 Message-ID: <20171025015539.24525-9-alexander.levin@verizon.com> References: <20171025015539.24525-1-alexander.levin@verizon.com> In-Reply-To: <20171025015539.24525-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Viresh Kumar [ Upstream commit 04a86a84c42ca18f37ab446127dc619b41dd3b23 ] The code adding static OPPs for V2 bindings already does so. Make the V1 bindings specific code behave the same. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/base/power/opp/of.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -- 2.11.0 diff --git a/drivers/base/power/opp/of.c b/drivers/base/power/opp/of.c index 5552211e6fcd..b52c617947ad 100644 --- a/drivers/base/power/opp/of.c +++ b/drivers/base/power/opp/of.c @@ -386,7 +386,7 @@ static int _of_add_opp_table_v1(struct device *dev) { const struct property *prop; const __be32 *val; - int nr; + int nr, ret; prop = of_find_property(dev->of_node, "operating-points", NULL); if (!prop) @@ -409,9 +409,13 @@ static int _of_add_opp_table_v1(struct device *dev) unsigned long freq = be32_to_cpup(val++) * 1000; unsigned long volt = be32_to_cpup(val++); - if (_opp_add_v1(dev, freq, volt, false)) - dev_warn(dev, "%s: Failed to add OPP %ld\n", - __func__, freq); + ret = _opp_add_v1(dev, freq, volt, false); + if (ret) { + dev_err(dev, "%s: Failed to add OPP %ld (%d)\n", + __func__, freq, ret); + dev_pm_opp_of_remove_table(dev); + return ret; + } nr -= 2; } From patchwork Wed Oct 25 01:56:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 117007 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp332443qgn; Tue, 24 Oct 2017 19:14:31 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SDb1bADPL293SCYYzUYd3JcvrQvnX3eihu+D2aHDSLoJ/QiFcTdlRkfZz5nXhgddAesDZy X-Received: by 10.99.95.76 with SMTP id t73mr585799pgb.57.1508897671604; Tue, 24 Oct 2017 19:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508897671; cv=none; d=google.com; s=arc-20160816; b=hA1WuUr8LpqamL+a/nnArj0rCm27xUneE29Q23RTBRvO7urmk1W2DcyYfcGcMYbV+k +1SqGtwkGPMU9eQcZCIZGthsHnq11BsSWKzIXrUomQyTXjSxOqk+GAapOSsVcDnHFhXT 7jiwsQ8MH9kt77z/IttcCkeYMZSlwH444bYFE4Rm5WC3haimNwJOr1ZPVRNzoZCqw/Xb EL924jZu7XicySQ1/3mEymdxn6r7QQKF52OHgllSmKRS8MNn+7XjJDJRxi6xyW1rmbwL 16SDJWf03Bezg+pPNxfGa3ULV9QAqPX7rjUubO7aEZO7lPLDLen9BzbdfnefJ24d+apM 15/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:dkim-signature :dkim-signature:cc:from:dkim-signature:arc-authentication-results; bh=I2/ColT1m6pN5adw5VQA7KMdwu/mMX63+Z4i9HRFB/A=; b=uq1jna2kEah6ts4vmv+w74N/QtkOPE+qQW3EIsuImYruHDZrGwUBME7xA5OnBUn4HP utHopg618qETyt18fW8iLCfneATiBDL5Uy8eIcvts3ibEXFHTeUhcJv9pndRaldLzyU4 7Wpj5LTK+D8qOl0MMfnNoC6qxj8FEDQRDLo8E4wE6ryjaDn7yjZ3J35L/2m7Vjpd6Ow0 T3DTksgUwvr+PRUw/mcoR+u19G4Zd6tYmaghXhn2GTbdEpDXI/zCxodw9qEX3lybBKdA svwjPNzmylb4AT8Bm4Ki4e/+qe2ZlarmxmCdNSCD8giFNu8cV+5bCeW/vF8LWb9BYLAd 1ZUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verizon.com header.s=corp header.b=VP9a2VtY; dkim=fail header.i=@verizon.com header.s=corp header.b=n90T85ta; dkim=fail header.i=@verizon.com header.s=corp header.b=n90T85ta; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q81si1127687pfi.503.2017.10.24.19.14.31; Tue, 24 Oct 2017 19:14:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@verizon.com header.s=corp header.b=VP9a2VtY; dkim=fail header.i=@verizon.com header.s=corp header.b=n90T85ta; dkim=fail header.i=@verizon.com header.s=corp header.b=n90T85ta; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751987AbdJYCOa (ORCPT + 9 others); Tue, 24 Oct 2017 22:14:30 -0400 Received: from omzsmtpe03.verizonbusiness.com ([199.249.25.208]:16025 "EHLO omzsmtpe03.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932348AbdJYB4x (ORCPT ); Tue, 24 Oct 2017 21:56:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1508896613; x=1540432613; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=s+xKgcmjAdTVce/RlxKairRMXsZrwgjUYha70LdWhtI=; b=VP9a2VtYeZKuUNVsWD3x1i1liKdgsHDAfNIF61udjkxdWkSZD2UKL2Qu hNYrv2mxGyeI1HSx+AcJp+C8nbpqXC6QsLAzDmd/aFLd37XJ7/xA2Vttr VYXJZY7TNTAFn++RAe6dRRnN2LJ0aGBqG2rL7fUn3XF1+MXS09yJ9SxNL E=; Received: from unknown (HELO fldsmtpi02.verizon.com) ([166.68.71.144]) by omzsmtpe03.verizonbusiness.com with ESMTP; 25 Oct 2017 01:56:46 +0000 From: "Levin, Alexander (Sasha Levin)" Cc: Gilad Ben-Yossef , Steffen Klassert , "Levin, Alexander (Sasha Levin)" Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi02.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Oct 2017 01:56:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1508896606; x=1540432606; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=s+xKgcmjAdTVce/RlxKairRMXsZrwgjUYha70LdWhtI=; b=n90T85tah7ng79DMUF7Lo9Vsr8alm+O05BcDRH338AU9zEN/VwcFvSVG I9mRIeUtaq/AVJnztq5aV9Dxc33QJgIttIRkUkZGHwX7DnXHgG2RRnXhB CnargjzHvjeIKoUz4i/fuk7V+UxTBkfopjnVCf3KuG2O6EHZmR5IFiEEx M=; Received: from mariner.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.84]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Oct 2017 21:56:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1508896606; x=1540432606; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=s+xKgcmjAdTVce/RlxKairRMXsZrwgjUYha70LdWhtI=; b=n90T85tah7ng79DMUF7Lo9Vsr8alm+O05BcDRH338AU9zEN/VwcFvSVG I9mRIeUtaq/AVJnztq5aV9Dxc33QJgIttIRkUkZGHwX7DnXHgG2RRnXhB CnargjzHvjeIKoUz4i/fuk7V+UxTBkfopjnVCf3KuG2O6EHZmR5IFiEEx M=; X-Host: mariner.tdc.vzwcorp.com Received: from ohtwi1exh001.uswin.ad.vzwcorp.com ([10.144.218.43]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 25 Oct 2017 01:56:46 +0000 Received: from tbwexch06apd.uswin.ad.vzwcorp.com (153.114.162.30) by OHTWI1EXH001.uswin.ad.vzwcorp.com (10.144.218.43) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 24 Oct 2017 21:56:46 -0400 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by tbwexch06apd.uswin.ad.vzwcorp.com (153.114.162.30) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 24 Oct 2017 21:56:45 -0400 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 24 Oct 2017 20:56:44 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Tue, 24 Oct 2017 20:56:44 -0500 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.9 36/50] IPsec: do not ignore crypto err in ah4 input Thread-Topic: [PATCH AUTOSEL for 4.9 36/50] IPsec: do not ignore crypto err in ah4 input Thread-Index: AQHTTTRohMno4A3g0USkqi3UpwWQAQ== Date: Wed, 25 Oct 2017 01:56:01 +0000 Message-ID: <20171025015539.24525-36-alexander.levin@verizon.com> References: <20171025015539.24525-1-alexander.levin@verizon.com> In-Reply-To: <20171025015539.24525-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Gilad Ben-Yossef [ Upstream commit ebd89a2d0675f1325c2be5b7576fd8cb7e8defd0 ] ah4 input processing uses the asynchronous hash crypto API which supplies an error code as part of the operation completion but the error code was being ignored. Treat a crypto API error indication as a verification failure. While a crypto API reported error would almost certainly result in a memcpy of the digest failing anyway and thus the security risk seems minor, performing a memory compare on what might be uninitialized memory is wrong. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Steffen Klassert Signed-off-by: Sasha Levin --- net/ipv4/ah4.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.11.0 diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index f2a71025a770..22377c8ff14b 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c @@ -270,6 +270,9 @@ static void ah_input_done(struct crypto_async_request *base, int err) int ihl = ip_hdrlen(skb); int ah_hlen = (ah->hdrlen + 2) << 2; + if (err) + goto out; + work_iph = AH_SKB_CB(skb)->tmp; auth_data = ah_tmp_auth(work_iph, ihl); icv = ah_tmp_icv(ahp->ahash, auth_data, ahp->icv_trunc_len); From patchwork Wed Oct 25 01:56:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 117006 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp329420qgn; Tue, 24 Oct 2017 19:09:48 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RqUXR2O9VOEuyIJbqo5Ii4DMS74zljEB6DwVsACcopH/oRFzhylmKu1nCDsSRdHM+nJecw X-Received: by 10.98.198.28 with SMTP id m28mr605460pfg.217.1508897388243; Tue, 24 Oct 2017 19:09:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508897388; cv=none; d=google.com; s=arc-20160816; b=vfGHpQCJR/1CtT1a/GoxZ68uUBr0PmDWE8nceWWZnbIEVQ0QfJHyUwgR4o6jBokGCN zEc+p/Lck6OMZk0NeylItWZWE3hRBZG7WEQJIu8ktxaJX1bSpNwOL1tm3dyu7OdBHJmo ROr6riRZ6h7Wg95CV2N9P0qHHTFIPToiIhZolBBszxwYywAvnhwiDvVlJin6KBWOJg1R jBIliyyE5Gi9Pea/lyaLdaKe/jN8qdhEou0HtmzBMewf/UymGgBLMEM06+DGPgszBTRR dZhhclU8LgtWSORYENtZUQFLmvuZ17aSkQfMkVRe5Zhxd/UYKeLxAi7HWhr2ocVgFpqT 8t9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:dkim-signature :dkim-signature:cc:from:dkim-signature:arc-authentication-results; bh=zCpxbJpq29w+ZUbxvnIWqpHsaNs98LaBH6WY5s/Hxnc=; b=lrahclcAHns0+6c4OfJrdhEwO3OLGJWaf6R6wGrsWl5EeaUQLBs4NkksJzsfPNahaK gSfjWKrjv9Z3U3pXgfbeHHEEGK/QG2h5EbPclpsbs/S3cKXEa4ymmLqImIu283AoQKt0 ZuYI5sG2sVek7VCpe1E9Qn4TZY5NZqbJithgGHCpREG6sdicUL0kITH3YNG5QLVnQ09y LsDUmT1KDD2Fk19i8wnJTDM9AJ6UQ9VEUK6ClzqqLQo9Wm999xMQ6jyPx7ZfO7s0JTrF 2YSINccA7TxZkWSZs/ENcq1zlqF4G4U4ZrVvorXhw6wu3zsB2ugx09SD5B5fA0hdFHZe UmEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verizon.com header.s=corp header.b=IiwAkr1f; dkim=fail header.i=@verizon.com header.s=corp header.b=INw3p6vS; dkim=fail header.i=@verizon.com header.s=corp header.b=INw3p6vS; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k15si1020886pgr.633.2017.10.24.19.09.47; Tue, 24 Oct 2017 19:09:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@verizon.com header.s=corp header.b=IiwAkr1f; dkim=fail header.i=@verizon.com header.s=corp header.b=INw3p6vS; dkim=fail header.i=@verizon.com header.s=corp header.b=INw3p6vS; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751918AbdJYCJo (ORCPT + 9 others); Tue, 24 Oct 2017 22:09:44 -0400 Received: from omzsmtpe01.verizonbusiness.com ([199.249.25.210]:57664 "EHLO omzsmtpe01.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932464AbdJYB53 (ORCPT ); Tue, 24 Oct 2017 21:57:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1508896649; x=1540432649; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=24mzLNqv07mMk4ABWvYhaWuTjV/rMihaBAGR0dkOxvQ=; b=IiwAkr1fGRgjHOKwXDHa+dfd83vPueA1+587RJVgXLKVn5g6XlrSPtcd HoH0QMRpXv/E/CyRhstZiZk+mnuqFTXwGKZ1Impe4gknZKmcm8gTiFvVP Jhn+hOgBUOe42npweglafKZfVIXhkxNs110BYggEP6m/duzjUkzUrAe4+ g=; Received: from unknown (HELO fldsmtpi03.verizon.com) ([166.68.71.145]) by omzsmtpe01.verizonbusiness.com with ESMTP; 25 Oct 2017 01:57:28 +0000 From: "Levin, Alexander (Sasha Levin)" Cc: Bjorn Andersson , Kalle Valo , "Levin, Alexander (Sasha Levin)" Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi03.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Oct 2017 01:56:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1508896613; x=1540432613; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=24mzLNqv07mMk4ABWvYhaWuTjV/rMihaBAGR0dkOxvQ=; b=INw3p6vSBlmnY7Z/E3UfMT0z6XLVvb5YmUTcpq6gGDvGSoR54FE22mJl rfBWow4cvLKihKIcenMXmOrnaDRkReTITKvxKxJ/TBAap867vmbGq82jO znfOPNnoiJge/7jZkYkUdLGeF4tM48H/Znl0QHudUF+HNVdxiGf8Sw/JA g=; Received: from pioneer.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.34]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Oct 2017 21:56:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1508896613; x=1540432613; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=24mzLNqv07mMk4ABWvYhaWuTjV/rMihaBAGR0dkOxvQ=; b=INw3p6vSBlmnY7Z/E3UfMT0z6XLVvb5YmUTcpq6gGDvGSoR54FE22mJl rfBWow4cvLKihKIcenMXmOrnaDRkReTITKvxKxJ/TBAap867vmbGq82jO znfOPNnoiJge/7jZkYkUdLGeF4tM48H/Znl0QHudUF+HNVdxiGf8Sw/JA g=; X-Host: pioneer.tdc.vzwcorp.com Received: from ohtwi1exh003.uswin.ad.vzwcorp.com ([10.144.218.45]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 25 Oct 2017 01:56:52 +0000 Received: from tbwexch17apd.uswin.ad.vzwcorp.com (153.114.162.41) by OHTWI1EXH003.uswin.ad.vzwcorp.com (10.144.218.45) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 24 Oct 2017 21:56:52 -0400 Received: from OMZP1LUMXCA12.uswin.ad.vzwcorp.com (144.8.22.187) by tbwexch17apd.uswin.ad.vzwcorp.com (153.114.162.41) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 24 Oct 2017 21:56:52 -0400 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA12.uswin.ad.vzwcorp.com (144.8.22.187) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 24 Oct 2017 20:56:51 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Tue, 24 Oct 2017 20:56:51 -0500 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.9 47/50] wcn36xx: Don't use the destroyed hal_mutex Thread-Topic: [PATCH AUTOSEL for 4.9 47/50] wcn36xx: Don't use the destroyed hal_mutex Thread-Index: AQHTTTRqqVeWnDK1+k2gLf9I5wEf7g== Date: Wed, 25 Oct 2017 01:56:03 +0000 Message-ID: <20171025015539.24525-47-alexander.levin@verizon.com> References: <20171025015539.24525-1-alexander.levin@verizon.com> In-Reply-To: <20171025015539.24525-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Bjorn Andersson [ Upstream commit d53628882255481b710641dd0118fbd80af6e983 ] ieee80211_unregister_hw() might invoke operations to stop the interface, that uses the hal_mutex. So don't destroy it until after we're done using it. Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/wcn36xx/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.11.0 diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index e1d59da2ad20..ca8797c65312 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1165,11 +1165,12 @@ static int wcn36xx_remove(struct platform_device *pdev) wcn36xx_dbg(WCN36XX_DBG_MAC, "platform remove\n"); release_firmware(wcn->nv); - mutex_destroy(&wcn->hal_mutex); ieee80211_unregister_hw(hw); iounmap(wcn->dxe_base); iounmap(wcn->ccu_base); + + mutex_destroy(&wcn->hal_mutex); ieee80211_free_hw(hw); return 0;