~ubuntu-branches/ubuntu/gutsy/linux-source-2.6.22/gutsy-updates

« back to all changes in this revision

Viewing changes to fs/namei.c

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Bader, Stefan Bader, Upstream Kernel Changes
  • Date: 2008-08-14 10:11:31 UTC
  • Revision ID: james.westby@ubuntu.com-20080814101131-zq1nshdgm9dj9qbu
Tags: 2.6.22-15.58
[Stefan Bader]

* mm: Fix zero length segment loop
  - LP: #249340
  follow-up for CVE-2008-0598

[Upstream Kernel Changes]

* Fix compiler warning on 64-bit
  follow-up for CVE-2008-1673
* netfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP
  follow-up for CVE-2008-1673

Show diffs side-by-side

added added

removed removed

Lines of Context:
493
493
         */
494
494
        result = d_lookup(parent, name);
495
495
        if (!result) {
496
 
                struct dentry * dentry = d_alloc(parent, name);
 
496
                struct dentry *dentry;
 
497
 
 
498
                /* Don't create child dentry for a dead directory. */
 
499
                result = ERR_PTR(-ENOENT);
 
500
                if (IS_DEADDIR(dir))
 
501
                        goto out_unlock;
 
502
 
 
503
                dentry = d_alloc(parent, name);
497
504
                result = ERR_PTR(-ENOMEM);
498
505
                if (dentry) {
499
506
                        result = dir->i_op->lookup(dir, dentry, nd);
502
509
                        else
503
510
                                result = dentry;
504
511
                }
 
512
out_unlock:
505
513
                mutex_unlock(&dir->i_mutex);
506
514
                return result;
507
515
        }
1270
1278
 
1271
1279
        dentry = cached_lookup(base, name, nd);
1272
1280
        if (!dentry) {
1273
 
                struct dentry *new = d_alloc(base, name);
 
1281
                struct dentry *new;
 
1282
 
 
1283
                /* Don't create child dentry for a dead directory. */
 
1284
                dentry = ERR_PTR(-ENOENT);
 
1285
                if (IS_DEADDIR(inode))
 
1286
                        goto out;
 
1287
 
 
1288
                new = d_alloc(base, name);
1274
1289
                dentry = ERR_PTR(-ENOMEM);
1275
1290
                if (!new)
1276
1291
                        goto out;