|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v8 08/24] x86: refactor psr: set value: implement framework.
>>> On 10.03.17 at 08:46, <yi.y.sun@xxxxxxxxxxxxxxx> wrote:
> On 17-03-08 09:07:10, Jan Beulich wrote:
> [...]
>> > /* Called with domain lock held, no extra lock needed for 'psr_cos_ids' */
>> > static void psr_free_cos(struct domain *d)
>> > {
>> > - if( !d->arch.psr_cos_ids )
>> > + unsigned int socket, cos;
>> > +
>> > + if ( !d->arch.psr_cos_ids )
>> > return;
>>
>> As in an earlier patch I've asked for this check to be removed, I
>> think you will need to add a check on socket_info to be non-
>> NULL somewhere in this function.
>>
> d->arch.psr_cos_ids is used in the loop below. Shall I not check it?
>
>> > + for ( socket = 0; socket < nr_sockets; socket++ )
>> > + {
>> > + struct psr_socket_info *info;
>> > +
>> > + /* cos 0 is default one which does not need be handled. */
>> > + if ( (cos = d->arch.psr_cos_ids[socket]) == 0 )
> Here.
Oh, yes, you should. But the check should be added here instead
of in the earlier patch.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |