Re: [tip: sched/core] sched: Make struct sched_statistics independent of fair sched class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [tip: sched/core] sched: Make struct sched_statistics independent of fair sched class
- From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
- Date: Tue, 21 Sep 2021 09:17:27 +0300
- Cc: linux-tip-commits@xxxxxxxxxxxxxxx, Yafang Shao <laoar.shao@xxxxxxxxx>, "Peter Zijlstra (Intel)" <peterz@xxxxxxxxxxxxx>, Mel Gorman <mgorman@xxxxxxx>, x86@xxxxxxxxxx
- In-reply-to: <163179357090.25758.13267982301302997472.tip-bot2@tip-bot2>
- References: <20210905143547.4668-3-laoar.shao@gmail.com> <163179357090.25758.13267982301302997472.tip-bot2@tip-bot2>
- User-agent: Mutt/1.10.1 (2018-07-13)
On Thu, Sep 16, 2021 at 11:59:30AM -0000, tip-bot2 for Yafang Shao wrote:
> @@ -11424,7 +11441,7 @@ int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
> if (!cfs_rq)
> goto err;
>
> - se = kzalloc_node(sizeof(struct sched_entity),
> + se = kzalloc_node(sizeof(struct sched_entity_stats),
This wasn't there in the original patch and it causes a Smatch warning
because "se" is declared as a "sched_entity" but it's allocating a
larger "sched_entity_stats" which contains a sched_entity.
To me, ideally, we would update the type of se.
> GFP_KERNEL, cpu_to_node(i));
> if (!se)
> goto err_free_rq;
regards,
dan carpenter
[Index of Archives]
[Linux Stable Commits]
[Linux Stable Kernel]
[Linux Kernel]
[Linux USB Devel]
[Linux Video &Media]
[Linux Audio Users]
[Yosemite News]
[Linux SCSI]