Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1650171imm; Thu, 18 Oct 2018 01:42:04 -0700 (PDT) X-Google-Smtp-Source: ACcGV61yTNrGywuahex2NkzYFQRdKpcq/+4LshVgtMCFGDtkm1w2tLpqi1Wc807rrZtdlVQJIOqT X-Received: by 2002:a17:902:ba8d:: with SMTP id k13-v6mr29372678pls.12.1539852124364; Thu, 18 Oct 2018 01:42:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539852124; cv=none; d=google.com; s=arc-20160816; b=B0f41rD3tFMDk7bkpAv+VDYE30YtIRyiuTWoKcKjcnGUucNbgsfltBBSbKmo9oDjGk PNRs7IgZaL/6mEK+vsXOm787GXw8AxnygNniYMSuGQHoEfrNfIGRHwCgVWoez2w6M3fl lOgmpJy8qO7dKU1VVgyXzbrza7UHJr1XIV4BZW5H8SKL90Wvs4mmhnEQw3CU4Rq70E6K sdqOx8IbW8h7eGk/XvYnj+AT0gqaf3ue3PQDHZ04x3/SuYRDANGA3iN8gXVQTbNlscKz hGwRSIJ7AoDQVN+FCX2WLAYXKZ87764HSkMD8qXrUfjtAP53lH58BwRH2xqALQ38Xev+ kekw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=FNvJBbSmqK56TmUnXFhfz6AtQJ1sV1Tr9rhAggP80ok=; b=okCbW0mmbnGPExfFI0dONe8rdRukglD1PXfWurVyHd978CE/yfXhm2B3KPeV94yT/m H5rbawoy0YlbR3Ko5cePuRUU57lLMlzx1bGHlB1FrTHl0xtn1NZlxKtnuRVOcRK8boiF EsnEl6F84KCEe299TPrBz6KGESjHIyMsXCL60+jLl06XPl4ZQix7qQgVxWx0fY4YhRZJ igJ8cOGuKRklcnU6UhekL4NfYa+3l2Hfa14+j8Cml6XhMYEBjbets5py3t7uJ1Eva8rh NBxIo2+zKZp/0TZxqFed6XNc2LDg+2M1cpzsSimpYMERNJ35MwQtkIKQVW/kXC/V2UFD Hf+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=mJBpMJPV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e10-v6si19389778pgo.44.2018.10.18.01.41.48; Thu, 18 Oct 2018 01:42:04 -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=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=mJBpMJPV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727785AbeJRQlP (ORCPT + 99 others); Thu, 18 Oct 2018 12:41:15 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:37611 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727486AbeJRQlO (ORCPT ); Thu, 18 Oct 2018 12:41:14 -0400 Received: by mail-io1-f65.google.com with SMTP id m16-v6so20500747ioj.4 for ; Thu, 18 Oct 2018 01:41:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FNvJBbSmqK56TmUnXFhfz6AtQJ1sV1Tr9rhAggP80ok=; b=mJBpMJPVbrS8PzM3ROdJ3NuNfzewFw1HjBx+ovEiN5QFO0eooCVdbZOhffmjJH9N0m rfXoS4pCB9S3AgdyHX+yQAdjIJSUlelnMdua/n29E9xA/dO0tf3Kfi2Z/h48WGCfbCbD PoXuWCACWkxNOHNpaT8LFXOTqZ8xab9EjUfuM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FNvJBbSmqK56TmUnXFhfz6AtQJ1sV1Tr9rhAggP80ok=; b=gHgfh1n725V5I4ktoja6FdhD2geXDpLlKwr/lN6oKxU3ybTRo6geGWey6X2ZE+f9q8 z93M970zRB5ruEPs18Cpf8ukfD68E2mMZYSOQpBQVUntIRpIQ6c9I5yBQVaqFu6502Jm iwcz5btZhFlaiBPE27e5REDs+Ex9wVEhTTjL7zMtXL76KiMeryLdlvx5T3CAKJ16bEbp gDck5uCxdUhqaPQ1E0SbXxNk+do3ZljR3lOoSfFV6tmpKw04O4eUcWRwPWhHASQc6QEv DG/YQyYuHyUfHbSrq/lxPvDpr23OlDrRgeIsFREuGSjMV5fBqg8ddWv4HWFdzOaPY414 wdCw== X-Gm-Message-State: ABuFfoga9Umt1Q8BNlwWsSjy8Ir4RYQi1oI5PUn3fLgjZ8pMkNAKRQkr uKa1LGmoONduucVBHS74rfPfnkxkRXtshx2uZJCB5A== X-Received: by 2002:a5e:8b06:: with SMTP id g6-v6mr15996127iok.144.1539852078693; Thu, 18 Oct 2018 01:41:18 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:bf41:0:0:0:0:0 with HTTP; Thu, 18 Oct 2018 01:41:17 -0700 (PDT) X-Originating-IP: [212.96.48.140] In-Reply-To: References: <00000000000058404b0578797a9d@google.com> From: Miklos Szeredi Date: Thu, 18 Oct 2018 10:41:17 +0200 Message-ID: Subject: Re: possible deadlock in ovl_copy_up_start To: Amir Goldstein Cc: syzbot+3ef5c0d1a5cb0b21e6be@syzkaller.appspotmail.com, linux-kernel , overlayfs , syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 18, 2018 at 8:26 AM, Amir Goldstein wrote: > Can someone tell me what the expected behavior of a nested > mutex_lock_interruptible(&lock); ? > > Why does the reproducer only warn and not really deadlock. > It is because that is considered the lesser evil? > and obviously, then inner unlock releases the outer lock? No, it's not the same lock, just the same lock class (first one is OVL_I(d_inode(old))->lock, the other is OVL_I(d_inode(new->d_parent)))->lock). So we could possibly get away with annotating with mutex_lock_nested(). Is this the only place that ovl_i_lock is nested? Thanks, Miklos