diff --git a/cifs-fix-ERR_PTR-dereference-in-cifs_get_root.patch b/cifs-fix-ERR_PTR-dereference-in-cifs_get_root.patch new file mode 100644 index 000000000..f15a0e952 --- /dev/null +++ b/cifs-fix-ERR_PTR-dereference-in-cifs_get_root.patch @@ -0,0 +1,120 @@ +Return-Path: kernel-bounces@lists.fedoraproject.org +Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO + zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by + mail02.corp.redhat.com with LMTP; Thu, 25 Aug 2011 10:45:29 -0400 (EDT) +Received: from localhost (localhost.localdomain [127.0.0.1]) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D94C212A429; + Thu, 25 Aug 2011 10:40:08 -0400 (EDT) +X-Quarantine-ID: +Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id C-k2lztK9Aht; Thu, 25 Aug 2011 10:40:08 -0400 (EDT) +Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 99EEE12A424; + Thu, 25 Aug 2011 10:40:08 -0400 (EDT) +Received: from mx1.redhat.com (ext-mx12.extmail.prod.ext.phx2.redhat.com [10.5.110.17]) + by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p7PEe7jY023291; + Thu, 25 Aug 2011 10:40:08 -0400 +Received: from bastion.fedoraproject.org (bastion02.phx2.fedoraproject.org [10.5.126.11]) + by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7PEe54S022197; + Thu, 25 Aug 2011 10:40:05 -0400 +Received: from lists.fedoraproject.org (collab1.vpn.fedoraproject.org [192.168.1.21]) + by bastion02.phx2.fedoraproject.org (Postfix) with ESMTP id E3F1D1108EB; + Thu, 25 Aug 2011 14:40:04 +0000 (UTC) +Received: from collab1.fedoraproject.org (localhost.localdomain [127.0.0.1]) + by lists.fedoraproject.org (Postfix) with ESMTP id 52AA23267A7; + Thu, 25 Aug 2011 14:40:04 +0000 (UTC) +X-Original-To: kernel@lists.fedoraproject.org +Delivered-To: kernel@lists.fedoraproject.org +Received: from smtp-mm02.fedoraproject.org (smtp-mm02.fedoraproject.org + [66.35.62.164]) + by lists.fedoraproject.org (Postfix) with ESMTP id 8FD8232679C + for ; + Thu, 25 Aug 2011 14:40:01 +0000 (UTC) +Received: from mail-gx0-f173.google.com (mail-gx0-f173.google.com + [209.85.161.173]) + by smtp-mm02.fedoraproject.org (Postfix) with ESMTP id 42F73E721F + for ; + Thu, 25 Aug 2011 14:40:01 +0000 (UTC) +Received: by gxk26 with SMTP id 26so2067938gxk.32 + for ; + Thu, 25 Aug 2011 07:40:00 -0700 (PDT) +Received: by 10.91.21.4 with SMTP id y4mr6531700agi.115.1314283200592; + Thu, 25 Aug 2011 07:40:00 -0700 (PDT) +Received: from salusa.poochiereds.net (cpe-075-177-182-191.nc.res.rr.com + [75.177.182.191]) + by mx.google.com with ESMTPS id l13sm579931anj.16.2011.08.25.07.39.59 + (version=SSLv3 cipher=OTHER); Thu, 25 Aug 2011 07:40:00 -0700 (PDT) +From: Jeff Layton +To: kernel@lists.fedoraproject.org +Subject: [PATCH 2/2] CIFS: Fix ERR_PTR dereference in cifs_get_root +Date: Thu, 25 Aug 2011 10:39:54 -0400 +Message-Id: <1314283194-26086-3-git-send-email-jlayton@redhat.com> +In-Reply-To: <1314283194-26086-1-git-send-email-jlayton@redhat.com> +References: <1314283194-26086-1-git-send-email-jlayton@redhat.com> +X-BeenThere: kernel@lists.fedoraproject.org +X-Mailman-Version: 2.1.9 +Precedence: list +List-Id: "Fedora kernel development." +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +MIME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Sender: kernel-bounces@lists.fedoraproject.org +Errors-To: kernel-bounces@lists.fedoraproject.org +X-RedHat-Spam-Score: -0.502 (RP_MATCHES_RCVD) +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 +X-Scanned-By: MIMEDefang 2.68 on 10.5.110.17 + +From: Pavel Shilovsky + +move it to the beginning of the loop. + +Cc: +Signed-off-by: Pavel Shilovsky +Reviewed-by: Jeff Layton +--- + fs/cifs/cifsfs.c | 10 ++++++---- + 1 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c +index fc7e57b..53e7d72 100644 +--- a/fs/cifs/cifsfs.c ++++ b/fs/cifs/cifsfs.c +@@ -566,6 +566,12 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb) + struct inode *dir = dentry->d_inode; + struct dentry *child; + ++ if (!dir) { ++ dput(dentry); ++ dentry = ERR_PTR(-ENOENT); ++ break; ++ } ++ + /* skip separators */ + while (*s == sep) + s++; +@@ -581,10 +587,6 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb) + mutex_unlock(&dir->i_mutex); + dput(dentry); + dentry = child; +- if (!dentry->d_inode) { +- dput(dentry); +- dentry = ERR_PTR(-ENOENT); +- } + } while (!IS_ERR(dentry)); + _FreeXid(xid); + kfree(full_path); +-- +1.7.6 + +_______________________________________________ +kernel mailing list +kernel@lists.fedoraproject.org +https://admin.fedoraproject.org/mailman/listinfo/kernel diff --git a/kernel.spec b/kernel.spec index 0c46c89ef..f6e396b4a 100644 --- a/kernel.spec +++ b/kernel.spec @@ -678,6 +678,9 @@ Patch21003: TEGRA-2.6.40.2-enable-USB-ports.patch # rhbz#719607 Patch21004: vfs-fix-automount-for-negative-autofs-dentries.patch +# rhbz#727927 rhbz#731278 rhbz#732934 +Patch21005: cifs-fix-ERR_PTR-dereference-in-cifs_get_root.patch + %endif BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root @@ -1224,6 +1227,10 @@ ApplyPatch utrace.patch # rhbz#719607 ApplyPatch vfs-fix-automount-for-negative-autofs-dentries.patch +# rhbz#727927 rhbz#731278 rhbz#732934 +# cifs-possible-memory-corruption-on-mount.patch is already queued for 3.0.4 +ApplyPatch cifs-fix-ERR_PTR-dereference-in-cifs_get_root.patch + # END OF PATCH APPLICATIONS %endif @@ -1844,6 +1851,9 @@ fi # and build. %changelog +* Fri Aug 26 2011 Chuck Ebbert +- Add fixes for cifs mount oopses (rhbz#727927 rhbz#731278 rhbz#732934) + * Thu Aug 25 2011 Chuck Ebbert - Reduce severity of host bridge window conflict warnings (rhbz#729652)