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]
Date:	Tue, 19 May 2015 16:14:27 +0100
From:	Richard Watts <rrw@...esim.co.uk>
To:	linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org
Subject: [PATCH 001/003] Attempt to cope with device changes and delayed kobject
 deallocation

Expose kobject_get_unless_zero() which will shortly be
  needed by get_device_parent().

Signed-off-by: Richard Watts <rrw@...esim.co.uk>
---
  include/linux/kobject.h | 1 +
  lib/kobject.c           | 2 +-
  2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 2d61b90..662b136 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -107,6 +107,7 @@ extern int __must_check kobject_rename(struct 
kobject *, const char *new_name);
  extern int __must_check kobject_move(struct kobject *, struct kobject *);

  extern struct kobject *kobject_get(struct kobject *kobj);
+extern struct kobject * __must_check kobject_get_unless_zero(struct 
kobject *kobj);
  extern void kobject_put(struct kobject *kobj);

  extern const void *kobject_namespace(struct kobject *kobj);
diff --git a/lib/kobject.c b/lib/kobject.c
index 3b841b9..3ba1db4 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -586,7 +586,7 @@ struct kobject *kobject_get(struct kobject *kobj)
  	return kobj;
  }

-static struct kobject * __must_check kobject_get_unless_zero(struct 
kobject *kobj)
+struct kobject * __must_check kobject_get_unless_zero(struct kobject *kobj)
  {
  	if (!kref_get_unless_zero(&kobj->kref))
  		kobj = NULL;
-- 
1.9.1

--
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