lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5c77e7070705140343q51208efdk2746b4d80db353ba@mail.gmail.com>
Date:	Mon, 14 May 2007 12:43:43 +0200
From:	"Carsten Otte" <cotte.de@...il.com>
To:	bharata@...ux.vnet.ibm.com
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	"Jan Blunck" <j.blunck@...harburg.de>
Subject: Re: [RFC][PATCH 9/14] Union-mount readdir

On 5/14/07, Bharata B Rao <bharata@...ux.vnet.ibm.com> wrote:
> +/* This is a copy from fs/readdir.c */
> +struct getdents_callback {
> +       struct linux_dirent __user *current_dir;
> +       struct linux_dirent __user *previous;
> +       int count;
> +       int error;
> +};
This should go into a header file.

> +static int union_cache_find_entry(struct list_head *uc_list,
> +                                 const char *name, int namelen)
> +{
> +       struct union_cache_entry *p;
> +       int ret = 0;
> +
> +       list_for_each_entry(p, uc_list, list) {
> +               if (p->name.len != namelen)
> +                       continue;
> +               if (strncmp(p->name.name, name, namelen) == 0) {
> +                       ret = 1;
> +                       break;
> +               }
> +       }
> +       return ret;
> +}
Why not use strlen instead of having both string and length as parameter?

> +static struct file * __dentry_open_read(struct dentry *dentry,
> +                                       struct vfsmount *mnt, int flags)
> +{
> +       struct file *f;
> +       struct inode *inode;
> +       int error;
> +
> +       error = -ENFILE;
> +       f = get_empty_filp();
> +       if (!f)
> +               goto out;
This is the only case where error is not explicitly set to a different
value before hitting out/cleanup => consider setting conditionally.

so long,
Carsten
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ