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-next>] [day] [month] [year] [list]
Message-id: <1474273371-6535-1-git-send-email-j.anaszewski@samsung.com>
Date:   Mon, 19 Sep 2016 10:22:51 +0200
From:   Jacek Anaszewski <j.anaszewski@...sung.com>
To:     linux-leds@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, greg@...ah.com,
        Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Jacek Anaszewski <j.anaszewski@...sung.com>
Subject: [PATCH] leds: triggers: Check return value of kobject_uevent_env()

From: Jacek Anaszewski <jacek.anaszewski@...il.com>

Log error message if kobject_uevent_env() fails in led_trigger_set().

Signed-off-by: Jacek Anaszewski <j.anaszewski@...sung.com>
---
 drivers/leds/led-triggers.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index c7a38d4..f538e8c 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -141,7 +141,8 @@ void led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trig)
 	if (event) {
 		envp[0] = event;
 		envp[1] = NULL;
-		kobject_uevent_env(&led_cdev->dev->kobj, KOBJ_CHANGE, envp);
+		if (kobject_uevent_env(&led_cdev->dev->kobj, KOBJ_CHANGE, envp))
+			pr_err("Error sending uevent after setting LED trigger\n");
 		kfree(event);
 	}
 }
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ