From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752001AbdIMS6U (ORCPT ); Wed, 13 Sep 2017 14:58:20 -0400 Received: from mail-by2nam01on0076.outbound.protection.outlook.com ([104.47.34.76]:59223 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751148AbdIMS6Q (ORCPT ); Wed, 13 Sep 2017 14:58:16 -0400 From: "Jorgen S. Hansen" To: Michal Hocko CC: Aditya Sarwade , Thomas Hellstrom , LKML , "netdev@vger.kernel.org" , Masik Petr , Ben Hutchings , Sasha Levin , Stable tree Subject: Re: scheduling while atomic from vmci_transport_recv_stream_cb in 3.16 kernels Thread-Topic: scheduling while atomic from vmci_transport_recv_stream_cb in 3.16 kernels Thread-Index: AQHTK6bE/Qg14aOkgESrjQLfshgbOqKy7LaAgAADa4CAAD0PAA== Date: Wed, 13 Sep 2017 18:58:13 +0000 Message-ID: References: <20170912090852.qshtrioffwexkslw@dhcp22.suse.cz> <20170913151939.gf7n6rvvjtz47tz7@dhcp22.suse.cz> In-Reply-To: <20170913151939.gf7n6rvvjtz47tz7@dhcp22.suse.cz> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [80.197.119.203] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR05MB2233;20:NtBssQeAKyO59DofOeeLtewmsQeL0hPZGFpNqVTBXGHvUI5FlqRhQDGbi25tc5lsFwrUY2g9qkoKpbOwJ4Zr60Iah3rUZzFzYGRd2WMshh3ivmxa6MG7AQB5r/Vu5gy//BCk98pexacjwKzs1jA7NMxsixwHjK3RQwQFHoZ7UUI= x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10009020)(6009001)(346002)(376002)(377424004)(377454003)(51914003)(24454002)(199003)(189002)(6246003)(97736004)(86362001)(575784001)(83716003)(2950100002)(6512007)(6916009)(189998001)(99286003)(102836003)(8676002)(36756003)(6116002)(54906002)(7736002)(53936002)(25786009)(2900100001)(3846002)(316002)(81166006)(110136004)(81156014)(54356999)(305945005)(6506006)(478600001)(76176999)(68736007)(8936002)(33656002)(5660300001)(50986999)(101416001)(2906002)(82746002)(66066001)(53546010)(3660700001)(4326008)(45080400002)(106356001)(3280700002)(229853002)(105586002)(77096006)(6436002)(6486002)(14454004);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR05MB2233;H:CY1PR05MB2217.namprd05.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; x-ms-office365-filtering-correlation-id: faadfa41-4611-42ff-fc4a-08d4fad962c2 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR05MB2233; x-ms-traffictypediagnostic: CY1PR05MB2233: authentication-results: spf=none (sender IP is ) smtp.mailfrom=jhansen@vmware.com; x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123562025)(20161123558100)(20161123560025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR05MB2233;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR05MB2233; x-forefront-prvs: 042957ACD7 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <47E3E5F49507CF4EBB8F5B1CEC487C85@namprd05.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Sep 2017 18:58:13.5531 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB2233 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v8DIwT6f023532 > On Sep 13, 2017, at 5:19 PM, Michal Hocko wrote: > > On Wed 13-09-17 15:07:26, Jorgen S. Hansen wrote: >> >>> On Sep 12, 2017, at 11:08 AM, Michal Hocko wrote: >>> >>> Hi, >>> we are seeing the following splat with Debian 3.16 stable kernel >>> >>> BUG: scheduling while atomic: MATLAB/26771/0x00000100 >>> Modules linked in: veeamsnap(O) hmac cbc cts nfsv4 dns_resolver rpcsec_gss_krb5 nfsd auth_rpcgss oid_registry nfs_acl nfs lockd fscache sunrpc vmw_vso$ >>> CPU: 0 PID: 26771 Comm: MATLAB Tainted: G O 3.16.0-4-amd64 #1 Debian 3.16.7-ckt20-1+deb8u3 >>> Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 09/21/2015 >>> ffff88315c1e4c20 ffffffff8150db3f ffff88193f803dc8 ffffffff8150acdf >>> ffffffff815103a2 0000000000012f00 ffff8819423dbfd8 0000000000012f00 >>> ffff88315c1e4c20 ffff88193f803dc8 ffff88193f803d50 ffff88193f803dc0 >>> Call Trace: >>> [] ? dump_stack+0x41/0x51 >>> [] ? __schedule_bug+0x48/0x55 >>> [] ? __schedule+0x5d2/0x700 >>> [] ? schedule_timeout+0x229/0x2a0 >>> [] ? select_task_rq_fair+0x390/0x700 >>> [] ? check_preempt_wakeup+0x120/0x1d0 >>> [] ? wait_for_completion+0xa8/0x120 >>> [] ? wake_up_state+0x10/0x10 >>> [] ? call_rcu_bh+0x20/0x20 >>> [] ? wait_rcu_gp+0x4b/0x60 >>> [] ? ftrace_raw_output_rcu_utilization+0x40/0x40 >>> [] ? vmci_event_unsubscribe+0x75/0xb0 [vmw_vmci] >>> [] ? vmci_transport_destruct+0x1d/0xe0 [vmw_vsock_vmci_transport] >>> [] ? vsock_sk_destruct+0x13/0x60 [vsock] >>> [] ? __sk_free+0x1a/0x130 >>> [] ? vmci_transport_recv_stream_cb+0x1e8/0x2d0 [vmw_vsock_vmci_transport] >>> [] ? vmci_datagram_invoke_guest_handler+0xaa/0xd0 [vmw_vmci] >>> [] ? vmci_dispatch_dgs+0xc1/0x200 [vmw_vmci] >>> [] ? tasklet_action+0xf4/0x100 >>> [] ? __do_softirq+0xf1/0x290 >>> [] ? irq_exit+0x95/0xa0 >>> [] ? do_IRQ+0x52/0xe0 >>> [] ? common_interrupt+0x6d/0x6d >>> >>> AFAICS this has been fixed by 4ef7ea9195ea ("VSOCK: sock_put wasn't safe >>> to call in interrupt context") but this patch hasn't been backported to >>> stable trees. It applies cleanly on top of 3.16 stable tree but I am not >>> familiar with the code to send the backport to the stable maintainer >>> directly. >>> >>> Could you double check that the patch below (just a blind cherry-pick) >>> is correct and it doesn't need additional patches on top? >> >> Hi, >> >> The patch below has been used to fix the above issue by other distros >> - among them Redhat for the 3.10 kernel, so it should work for 3.16 as >> well. > > Thanks for the confirmation. I do not see 4ef7ea9195ea ("VSOCK: sock_put > wasn't safe to call in interrupt context") in 3.10 stable branch > though. > >> In addition to the patch above, there are two other patches that >> need to be applied on top for the fix to be correct: >> >> 8566b86ab9f0f45bc6f7dd422b21de9d0cf5415a "VSOCK: Fix lockdep issue." >> >> and >> >> 8ab18d71de8b07d2c4d6f984b718418c09ea45c5 "VSOCK: Detach QP check should filter out non matching QPs." > > Good to know. I will send all three patches cherry-picked on top of the > current 3.16 stable branch. Could you have a look please? The patch series look good to me. Thanks for taking care of this, Jorgen