From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751465AbdBSFSa (ORCPT ); Sun, 19 Feb 2017 00:18:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38870 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382AbdBSFS2 (ORCPT ); Sun, 19 Feb 2017 00:18:28 -0500 Date: Sun, 19 Feb 2017 07:18:27 +0200 From: "Michael S. Tsirkin" To: Dmitry Vyukov Cc: Jason Wang , David Miller , Eric Dumazet , LKML , Cong Wang , netdev , syzkaller Subject: Re: net: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected in skb_array_produce Message-ID: <20170219071640-mutt-send-email-mst@kernel.org> References: <50038580.20299907.1486634551103.JavaMail.zimbra@redhat.com> <20170209200936-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sun, 19 Feb 2017 05:18:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 18, 2017 at 06:28:39PM +0100, Dmitry Vyukov wrote: > On Fri, Feb 10, 2017 at 6:17 AM, Jason Wang wrote: > > > > > > On 2017年02月10日 02:10, Michael S. Tsirkin wrote: > >> > >> On Thu, Feb 09, 2017 at 05:02:31AM -0500, Jason Wang wrote: > >>> > >>> ----- Original Message ----- > >>>> > >>>> Hello, > >>>> > >>>> I've got the following report while running syzkaller fuzzer on mmotm > >>>> (git://git.kernel.org/pub/scm/linux/kernel/git/mhocko/mm.git) > >>>> remotes/mmotm/auto-latest ee4ba7533626ba7bf2f8b992266467ac9fdc045e: > >>>> > >>> [...] > >>> > >>>> other info that might help us debug this: > >>>> > >>>> Possible interrupt unsafe locking scenario: > >>>> > >>>> CPU0 CPU1 > >>>> ---- ---- > >>>> lock(&(&r->consumer_lock)->rlock); > >>>> local_irq_disable(); > >>>> lock(&(&r->producer_lock)->rlock); > >>>> lock(&(&r->consumer_lock)->rlock); > >>>> > >>>> lock(&(&r->producer_lock)->rlock); > >>>> > >>> Thanks a lot for the testing. > >>> > >>> Looks like we could address this by using skb_array_consume_bh() instead. > >>> > >>> Could you pls verify if the following patch works? > >> > >> I think we should use _bh for the produce call as well, > >> since resizing takes the producer lock. > > > > Looks not since irq was disabled during resizing? > > > Hello, > > Is there a fix for this that we can pick up? > This killed 10'000 VMs on our testing infra over the last day. Still > happening on linux-next. > > Thanks I posted a fix. ptr_ring: fix race conditions when resizing Just reposted. I'll push into linux-next ASAP. -- MST