All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: Re: [RFC PATCH 5/5] ACPI: processor: do update when maximum cooling state changed
Date: Tue, 14 Apr 2020 15:37:08 +0300	[thread overview]
Message-ID: <20200414123708.GH1163@kadam> (raw)
In-Reply-To: <20200408041917.2329-5-rui.zhang@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2421 bytes --]

Hi Zhang,

url:    https://github.com/0day-ci/linux/commits/Zhang-Rui/thermal-rename-thermal_cooling_device_stats_update/20200408-122131
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/acpi/processor_thermal.c:158 acpi_thermal_cpufreq_exit() error: we previously assumed 'pr' could be null (see line 156)

# https://github.com/0day-ci/linux/commit/7d1c8f3879a36c7230c2842c651c4a3ce66b3d61
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 7d1c8f3879a36c7230c2842c651c4a3ce66b3d61
vim +/pr +158 drivers/acpi/processor_thermal.c

3000ce3c52f8b8 Rafael J. Wysocki 2019-10-16  149  void acpi_thermal_cpufreq_exit(struct cpufreq_policy *policy)
4be44fcd3bf648 Len Brown         2005-08-05  150  {
a1bb46c36ce389 Rafael J. Wysocki 2019-10-25  151  	unsigned int cpu;
a1bb46c36ce389 Rafael J. Wysocki 2019-10-25  152  
a1bb46c36ce389 Rafael J. Wysocki 2019-10-25  153  	for_each_cpu(cpu, policy->related_cpus) {
3000ce3c52f8b8 Rafael J. Wysocki 2019-10-16  154  		struct acpi_processor *pr = per_cpu(processors, policy->cpu);
^1da177e4c3f41 Linus Torvalds    2005-04-16  155  
2d8b39a62a5d38 Rafael J. Wysocki 2019-10-15 @156  		if (pr)
                                                                    ^^
Check

3000ce3c52f8b8 Rafael J. Wysocki 2019-10-16  157  			freq_qos_remove_request(&pr->thermal_req);
7d1c8f3879a36c Zhang Rui         2020-04-08 @158  		thermal_cdev_stats_update_max(pr->cdev);
                                                                                              ^^^^^^^^
Unchecked dereference.

^1da177e4c3f41 Linus Torvalds    2005-04-16  159  	}
a1bb46c36ce389 Rafael J. Wysocki 2019-10-25  160  }
^1da177e4c3f41 Linus Torvalds    2005-04-16  161  #else				/* ! CONFIG_CPU_FREQ */
d9460fd227ed2c Zhang Rui         2008-01-17  162  static int cpufreq_get_max_state(unsigned int cpu)
d9460fd227ed2c Zhang Rui         2008-01-17  163  {
d9460fd227ed2c Zhang Rui         2008-01-17  164  	return 0;
d9460fd227ed2c Zhang Rui         2008-01-17  165  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH 5/5] ACPI: processor: do update when maximum cooling state changed
Date: Tue, 14 Apr 2020 15:37:08 +0300	[thread overview]
Message-ID: <20200414123708.GH1163@kadam> (raw)
In-Reply-To: <20200408041917.2329-5-rui.zhang@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2421 bytes --]

Hi Zhang,

url:    https://github.com/0day-ci/linux/commits/Zhang-Rui/thermal-rename-thermal_cooling_device_stats_update/20200408-122131
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/acpi/processor_thermal.c:158 acpi_thermal_cpufreq_exit() error: we previously assumed 'pr' could be null (see line 156)

# https://github.com/0day-ci/linux/commit/7d1c8f3879a36c7230c2842c651c4a3ce66b3d61
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 7d1c8f3879a36c7230c2842c651c4a3ce66b3d61
vim +/pr +158 drivers/acpi/processor_thermal.c

3000ce3c52f8b8 Rafael J. Wysocki 2019-10-16  149  void acpi_thermal_cpufreq_exit(struct cpufreq_policy *policy)
4be44fcd3bf648 Len Brown         2005-08-05  150  {
a1bb46c36ce389 Rafael J. Wysocki 2019-10-25  151  	unsigned int cpu;
a1bb46c36ce389 Rafael J. Wysocki 2019-10-25  152  
a1bb46c36ce389 Rafael J. Wysocki 2019-10-25  153  	for_each_cpu(cpu, policy->related_cpus) {
3000ce3c52f8b8 Rafael J. Wysocki 2019-10-16  154  		struct acpi_processor *pr = per_cpu(processors, policy->cpu);
^1da177e4c3f41 Linus Torvalds    2005-04-16  155  
2d8b39a62a5d38 Rafael J. Wysocki 2019-10-15 @156  		if (pr)
                                                                    ^^
Check

3000ce3c52f8b8 Rafael J. Wysocki 2019-10-16  157  			freq_qos_remove_request(&pr->thermal_req);
7d1c8f3879a36c Zhang Rui         2020-04-08 @158  		thermal_cdev_stats_update_max(pr->cdev);
                                                                                              ^^^^^^^^
Unchecked dereference.

^1da177e4c3f41 Linus Torvalds    2005-04-16  159  	}
a1bb46c36ce389 Rafael J. Wysocki 2019-10-25  160  }
^1da177e4c3f41 Linus Torvalds    2005-04-16  161  #else				/* ! CONFIG_CPU_FREQ */
d9460fd227ed2c Zhang Rui         2008-01-17  162  static int cpufreq_get_max_state(unsigned int cpu)
d9460fd227ed2c Zhang Rui         2008-01-17  163  {
d9460fd227ed2c Zhang Rui         2008-01-17  164  	return 0;
d9460fd227ed2c Zhang Rui         2008-01-17  165  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

  parent reply	other threads:[~2020-04-14 12:37 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08  4:19 [RFC PATCH 1/5] thermal: rename thermal_cooling_device_stats_update() Zhang Rui
2020-04-08  4:19 ` [RFC PATCH 2/5] thermal: create statistics table in two steps Zhang Rui
2020-04-08  4:19 ` [RFC PATCH 3/5] thermal: support statistics table resizing at runtime Zhang Rui
2020-04-08  9:45   ` Takashi Iwai
2020-04-09  2:57     ` Zhang Rui
2020-04-08  4:19 ` [RFC PATCH 4/5] thermal: Add a sanity check for invalid state at stats update Zhang Rui
2020-04-08  4:19 ` [RFC PATCH 5/5] ACPI: processor: do update when maximum cooling state changed Zhang Rui
2020-04-09 13:34   ` Daniel Lezcano
2020-04-10  8:02     ` Zhang Rui
2020-04-10 12:10       ` Daniel Lezcano
2020-04-12  6:13         ` Zhang Rui
2020-04-12 10:07           ` Daniel Lezcano
2020-04-13  2:01             ` Zhang Rui
2020-04-13 18:06               ` Daniel Lezcano
2020-04-16  4:46                 ` Zhang Rui
2020-04-16  7:58                   ` Daniel Lezcano
2020-04-17  2:09                     ` Zhang Rui
2020-04-10 14:10       ` Rafael J. Wysocki
2020-04-11  4:41         ` Zhang Rui
2020-04-13 16:16   ` kbuild test robot
2020-04-14 12:37   ` Dan Carpenter [this message]
2020-04-14 12:37     ` Dan Carpenter
2020-04-08  9:47 ` [RFC PATCH 1/5] thermal: rename thermal_cooling_device_stats_update() Takashi Iwai
2020-04-09  2:59   ` Zhang Rui
2020-05-06 12:07 ` Amit Kucheria
  -- strict thread matches above, loose matches on Subject: below --
2020-04-13  5:07 [RFC PATCH 5/5] ACPI: processor: do update when maximum cooling state changed kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200414123708.GH1163@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.