From patchwork Tue Feb 10 01:48:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haynes X-Patchwork-Id: 5804421 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E32C0BF440 for ; Tue, 10 Feb 2015 01:48:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 202502010E for ; Tue, 10 Feb 2015 01:48:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 113E52011D for ; Tue, 10 Feb 2015 01:48:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752349AbbBJBsl (ORCPT ); Mon, 9 Feb 2015 20:48:41 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:56621 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752093AbbBJBsl (ORCPT ); Mon, 9 Feb 2015 20:48:41 -0500 Received: by mail-pa0-f41.google.com with SMTP id kx10so13313940pab.0 for ; Mon, 09 Feb 2015 17:48:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GK32G993TTpLZMevmLv+yBQvzESl6aPH9JNEXlRjX9s=; b=UHUSholSWI5UJeYSL4egRC6IBkpNp3AftWPjSfH9t58rMRAa5eq5CI0+s1x2W689LV 9VPYUe8lGwAicVMaxXkKnOxSlh7lH42N9t1uAtmFPBaSiSC06gZ+A1MgrcO3PwKu3tXd sCG72/jRcFowc9mxjW1yqq/yD4f9WYWlBHnakd96i/MeENIq7cP3FhboWWQfeO5aDsDA DzKU7H18guQ8YGHICF9nDXKOn8gsEmV3qsNpgtU/yNHoLT7eHLzb8lW9SP207VYUnBdq Q61QDnVSHU6WY/qeaUNXUxyXqMyoKy90rRCbvDguSzIEKWfW80pelS+WkinTnsmYyTmn eQuQ== X-Gm-Message-State: ALoCoQla6HA94aOwdveJgXGd+DLABgcpL/XARmcqqmOfSAit1/5FFjtDZdpZbpJ8hs4+qJLeokYr X-Received: by 10.68.197.133 with SMTP id iu5mr33831651pbc.131.1423532920931; Mon, 09 Feb 2015 17:48:40 -0800 (PST) Received: from localhost.localdomain ([50.242.95.105]) by mx.google.com with ESMTPSA id zq10sm17704383pab.19.2015.02.09.17.48.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Feb 2015 17:48:40 -0800 (PST) From: Tom Haynes X-Google-Original-From: Tom Haynes To: Trond Myklebust Cc: Linux NFS Mailing list , Julia Lawall Subject: [PATCH] pnfs/flexfiles: Do not dprintk after the free Date: Mon, 9 Feb 2015 17:48:32 -0800 Message-Id: <1423532912-79079-1-git-send-email-loghyr@primarydata.com> X-Mailer: git-send-email 1.9.3 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Found by 0-DAY kernel test infrastructure: fs/nfs/flexfilelayout/flexfilelayoutdev.c:520:13-16: ERROR: reference preceded by free on line 518 fs/nfs/flexfilelayout/flexfilelayoutdev.c:520:26-29: ERROR: reference preceded by free on line 518 fs/nfs/flexfilelayout/flexfilelayoutdev.c:520:39-42: ERROR: reference preceded by free on line 518 fs/nfs/flexfilelayout/flexfilelayoutdev.c:521:3-6: ERROR: reference preceded by free on line 518 Reported-by: Julia Lawall Signed-off-by: Tom Haynes --- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index 3bbb16b..e2c01f2 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c @@ -515,10 +515,10 @@ int ff_layout_encode_ds_ioerr(struct nfs4_flexfile_layout *flo, *p++ = cpu_to_be32(err->opnum); *count += 1; list_del(&err->list); - kfree(err); dprintk("%s: offset %llu length %llu status %d op %d count %d\n", __func__, err->offset, err->length, err->status, err->opnum, *count); + kfree(err); } return 0;