Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286956
b: refs/heads/master
c: ce59791
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and Greg Kroah-Hartman committed Jan 24, 2012
1 parent 6593c36 commit f6e4fa4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8381b5e88a19b780f19fc52b7dd67f2b05d07dca
refs/heads/master: ce597919361dcec97341151690e780eade2a9cf4
6 changes: 6 additions & 0 deletions trunk/fs/sysfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,12 @@ int sysfs_attr_ns(struct kobject *kobj, const struct attribute *attr,
const void *ns = NULL;
int err;

if (!dir_sd) {
WARN(1, KERN_ERR "sysfs: kobject %s without dirent\n",
kobject_name(kobj));
return -ENOENT;
}

err = 0;
if (!sysfs_ns_type(dir_sd))
goto out;
Expand Down
5 changes: 4 additions & 1 deletion trunk/fs/sysfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,11 @@ int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const void *ns, const cha
struct sysfs_addrm_cxt acxt;
struct sysfs_dirent *sd;

if (!dir_sd)
if (!dir_sd) {
WARN(1, KERN_WARNING "sysfs: can not remove '%s', no directory\n",
name);
return -ENOENT;
}

sysfs_addrm_start(&acxt, dir_sd);

Expand Down

0 comments on commit f6e4fa4

Please sign in to comment.