Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5136003pxj; Tue, 22 Jun 2021 16:12:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzh5x8ZDTkDny8w/i7VbrJkqmmCN7zl3D4DHO8nTwCAhYNIYKkxL+IJmlVMSXImXVpMwk5d X-Received: by 2002:a17:906:718b:: with SMTP id h11mr6609325ejk.418.1624403560585; Tue, 22 Jun 2021 16:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624403560; cv=none; d=google.com; s=arc-20160816; b=tSJXZLLV2adtSyIwPI3oQq8hC1dB5fEW7SfrJdf/A0Rd1xphlhmCvoOa4KhAFEFr1e nDgWNpwyOK2xrgeqd53kK4rKO2M4ZrEbJczd11aTlup2RPLSddUNmnPz5Q/P7UPaDzv0 wu0MQ+bMyyXS1IwzhSWKsQ0gvWApprJUD1g2v8emevLpCTu7eZoDHS0b35wZZoZ97Us+ 5kiZQjaY0arcdqMmwwF/wNcWR/OqBn3vyc1nbAmqPYgGYiQH8f3SWlSVzSv9tz43Imlf /PNJ9jdZNMiCcumTcJXi4p387m2EIV3YbFJ3K8pW27tolzvxSVKUK/TKU4yBCCybnuC7 TaWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:mime-version :dkim-signature; bh=t0rN33g3Q0MvGCFxmrKuW3pAMBLtF/9lId0gYvbuvZg=; b=MHkivY57Hnefj0uP6w1En7hwy8AF3FwXEwLBeEOSvOGP79rr1h35FbHQ/GdUWHlFDe 0WR9/Ej2z6pec9ty/9sjrGLEDYb22JGU7rLvP7z9lw1rinrqpNo30CK6PXgaJc0On6ov 7GLrv/4KBLk+b1OW+EV7S+ySoqKHQqdRKqYbyCitjxmaH994O2msdepb5sy8LA0Hx2Jx 0WgoXI4/AGmVhTPGPBFvLFSCzjcwGmKnhuWrKocGNHgFLkF2za4ZZy0LDEAg7P8szp3O 9ToPvtXG3RdUk1qDb+xkXsDQAGU2nhkmYXCkOnPLJ8D7VhXYZf3G/OqPqv+hrydtSRN5 hw5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kdcPFGLa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ml18si10039769ejb.682.2021.06.22.16.12.17; Tue, 22 Jun 2021 16:12:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kdcPFGLa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229758AbhFVXNf (ORCPT + 99 others); Tue, 22 Jun 2021 19:13:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbhFVXNf (ORCPT ); Tue, 22 Jun 2021 19:13:35 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA6B7C061574; Tue, 22 Jun 2021 16:11:18 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id c16so414078ljh.0; Tue, 22 Jun 2021 16:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=t0rN33g3Q0MvGCFxmrKuW3pAMBLtF/9lId0gYvbuvZg=; b=kdcPFGLaop4Uk6y2NiUz5a4QiFpiCTvTvUvJA7bxJcwQHxAaVHMJb4Z4lggYPiM3tw aavZzfXu3Y6IYkvKrBXB7yE1yXwEzOlAI5TUQSfOBHSlkGCmMZ8eajz8f1yVnp4jlOC8 c3krqRxUblT48PqEEmVf+2xLob8wq2+yk/niXhrhTV+P4BRfOcO8pWzsk6rDQBE4Dcxy Oq0al/yfdlsmW6tblO9byG+iV1j7XUpq/vl1bSY+e2UyDkwTafZCyJ5rc8cui4x8YFO3 M7Da3/USEGHenCCqdp501EKlfks0L1vzHaDGnYhH7+DnLK9MB5LYO97l+ayM64LNqKLr b87Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=t0rN33g3Q0MvGCFxmrKuW3pAMBLtF/9lId0gYvbuvZg=; b=ozqhrcyNWYJs2sEUtY5vQGUjh15wJ/0U+Z1VeS+VRFELdukUEwdbyImx6AG2oXEXmw deNCfN8u84l22nUfp3oill763wl6dnSJTayQKEskdJMm2xbLKAsuJzcwGIXHVafYSntH tmPa1laGaFKqxy4p23n/UwDkL2dKF2YZ13FreGRM9j/lh2jYcQ1+lR6w3S85ahf6NPn5 P6Wn4cupQZpuB6elm8angMp9iN8OVjYLJin5Me5knpPgdD2TnmcQLX8sEco/6nxF4knT m56h+FN6FeH49z14mFY9V2U3hmqYoZgXPOcu6fNDOcglDeWJAcBl+F6F9YbA+gK4hnoS ak9g== X-Gm-Message-State: AOAM531l8UCrydBpMuFmuBY3dbc75T98YQEx44NPXXhH2wHlkILknqp2 7UJFC9GMjqNAipp6XArhGCxghFsiDXRLTgpi26FDPKY+dROMgg== X-Received: by 2002:a05:651c:a07:: with SMTP id k7mr5428900ljq.477.1624403477036; Tue, 22 Jun 2021 16:11:17 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Tue, 22 Jun 2021 18:11:06 -0500 Message-ID: Subject: coverity problems with certain macros To: CIFS , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Looks like coverity's scan of the Linux kernel has problems with analyzing locks across some debug print macros (which ironically don't use any locks related to this component) e.g. Coverity Linux issues: 1484748, 1484736, 1475751, 1475743 and 1475726 as an example it flags the section of code below, and others with calls to "cifs_dbf(VFS, ...) " in them (and note that the debug macros don't take a lock) starting with the cifs_dbg(VFS, ...) call. It says: "May result in deadlock if there is another attempt to acquire the lock. In find_cifs_entry: Missing a release of a lock on a path" Oddly it doesn't flag "cifs_dbg(FYI, ...") calls, and even more strangely the calls they flag are simply wrappers around calls to "pr_err__ ## ratefunc ..." See below snippet from fs/cifs/readdir.c e.g. cifs_dbg(VFS, "reached end of buf searching for pos in buf %d index to find %lld rc %d\n", pos_in_buf, index_to_find, rc); } rc = 0; *current_entry = cur_ent; } else { cifs_dbg(FYI, "index not in buffer - could not findnext into it\n"); return 0; } if (pos_in_buf >= cfile->srch_inf.entries_in_buffer) { cifs_dbg(FYI, "can not return entries pos_in_buf beyond last\n"); *num_to_ret = 0; } else *num_to_ret = cfile->srch_inf.entries_in_buffer - pos_in_buf; return rc; } -- Thanks, Steve