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: <aYXvS1h3Bxf_5sCj@stanley.mountain>
Date: Fri, 6 Feb 2026 16:40:27 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
Cc: Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: [bug report] ACPI: battery: Adjust event notification routine

[ Smatch checking is paused while we raise funding.  #SadFace
  https://lore.kernel.org/all/aTaiGSbWZ9DJaGo7@stanley.mountain/ -dan ]


Hello Rafael J. Wysocki,

This is a semi-automatic email about new static checker warnings.

Commit 08b54fd57782 ("ACPI: battery: Adjust event notification
routine") from Dec 15, 2025, leads to the following Smatch complaint:

    drivers/acpi/battery.c:1062 acpi_battery_notify()
    warn: variable dereferenced before check 'battery' (see line 1059)

drivers/acpi/battery.c
  1058		struct acpi_battery *battery = data;
  1059		struct acpi_device *device = battery->device;
                                             ^^^^^^^^^^^^^^^
The patch adds a dereference.

  1060		struct power_supply *old;
  1061	
  1062		if (!battery)
                    ^^^^^^^^
Checked too late.

  1063			return;
  1064	

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ