aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-28 23:44:29 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-28 23:44:29 -0500
commitb07039b79c9ea64c1eacda1e01d645082e4a0d5d (patch)
tree61532ba8425fdf897d6a67a74391a1c6f322a07b /lib
parent02061181d3a9ccfe15ef6bc15fa56283acc47620 (diff)
parent16df1456aa858a86f398dbc7d27649eb6662b0cc (diff)
Merge tag 'driver-core-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH: "Here is the "big" set of driver core patches for 4.21-rc1. It's not really big, just a number of small changes for some reported issues, some documentation updates to hopefully make it harder for people to abuse the driver model, and some other minor cleanups. All of these have been in linux-next for a while with no reported issues" * tag 'driver-core-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: mm, memory_hotplug: update a comment in unregister_memory() component: convert to DEFINE_SHOW_ATTRIBUTE sysfs: Disable lockdep for driver bind/unbind files driver core: Add missing dev->bus->need_parent_lock checks kobject: return error code if writing /sys/.../uevent fails driver core: Move async_synchronize_full call driver core: platform: Respect return code of platform_device_register_full() kref/kobject: Improve documentation drivers/base/memory.c: Use DEVICE_ATTR_RO and friends driver core: Replace simple_strto{l,ul} by kstrtou{l,ul} kernfs: Improve kernfs_notify() poll notification latency kobject: Fix warnings in lib/kobject_uevent.c kobject: drop unnecessary cast "%llu" for u64 driver core: fix comments for device_block_probing() driver core: Replace simple_strtol by kstrtoint
Diffstat (limited to 'lib')
-rw-r--r--lib/kobject.c2
-rw-r--r--lib/kobject_uevent.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index 97d86dc17c42..b72e00fd7d09 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -639,7 +639,7 @@ static void kobject_cleanup(struct kobject *kobj)
639 kobject_name(kobj), kobj, __func__, kobj->parent); 639 kobject_name(kobj), kobj, __func__, kobj->parent);
640 640
641 if (t && !t->release) 641 if (t && !t->release)
642 pr_debug("kobject: '%s' (%p): does not have a release() function, it is broken and must be fixed.\n", 642 pr_debug("kobject: '%s' (%p): does not have a release() function, it is broken and must be fixed. See Documentation/kobject.txt.\n",
643 kobject_name(kobj), kobj); 643 kobject_name(kobj), kobj);
644 644
645 /* send "remove" if the caller did not do it but sent "add" */ 645 /* send "remove" if the caller did not do it but sent "add" */
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 63d0816ab23b..27c6118afd1c 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -240,6 +240,7 @@ static int kobj_usermode_filter(struct kobject *kobj)
240 ops = kobj_ns_ops(kobj); 240 ops = kobj_ns_ops(kobj);
241 if (ops) { 241 if (ops) {
242 const void *init_ns, *ns; 242 const void *init_ns, *ns;
243
243 ns = kobj->ktype->namespace(kobj); 244 ns = kobj->ktype->namespace(kobj);
244 init_ns = ops->initial_ns(); 245 init_ns = ops->initial_ns();
245 return ns != init_ns; 246 return ns != init_ns;
@@ -390,6 +391,7 @@ static int kobject_uevent_net_broadcast(struct kobject *kobj,
390 ops = kobj_ns_ops(kobj); 391 ops = kobj_ns_ops(kobj);
391 if (!ops && kobj->kset) { 392 if (!ops && kobj->kset) {
392 struct kobject *ksobj = &kobj->kset->kobj; 393 struct kobject *ksobj = &kobj->kset->kobj;
394
393 if (ksobj->parent != NULL) 395 if (ksobj->parent != NULL)
394 ops = kobj_ns_ops(ksobj->parent); 396 ops = kobj_ns_ops(ksobj->parent);
395 } 397 }
@@ -579,7 +581,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
579 581
580 mutex_lock(&uevent_sock_mutex); 582 mutex_lock(&uevent_sock_mutex);
581 /* we will send an event, so request a new sequence number */ 583 /* we will send an event, so request a new sequence number */
582 retval = add_uevent_var(env, "SEQNUM=%llu", (unsigned long long)++uevent_seqnum); 584 retval = add_uevent_var(env, "SEQNUM=%llu", ++uevent_seqnum);
583 if (retval) { 585 if (retval) {
584 mutex_unlock(&uevent_sock_mutex); 586 mutex_unlock(&uevent_sock_mutex);
585 goto exit; 587 goto exit;