lkml.org 
[lkml]   [2014]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] vt: initialize con_driver->node in con_init
On Fri, Feb 07, 2014 at 08:45:00AM -0800, Greg KH wrote:
> On Mon, Dec 30, 2013 at 11:11:02AM +0800, Wang YanQing wrote:
> > Commit 6db4063c5b72b46e9793b0f141a7a3984ac6facf
> > ("[PATCH] VT binding: Add sysfs control to the VT layer")
> > add node item into struct con_driver.
>
> That commit was almost a decade ago, is this patch really needed?
>
> > This patch initialize con_driver->node in con_init.
>
> You are saying what it does, not _why_ it is needed or why this change
> is happening.
>
> Please rewrite this with more information because as-is, I have no idea
> why I should accept this patch.

This patch meet the same situation with another patch I sended
("[PATCH v2]vt: fix potential dual con_driver register for conswitchp"),
if conswitchp in con_init is always the first con_driver we register,
then no problem will happen due to node will be initialized to zero.

But if it isn't the first, we get trouble due to use uninitialized value
of con_driver->node.

At least the code in con_init is not perfect, if we make sure con_driver
is always the first con_driver, then we don't need for(;;), just use
registered_con_driver[0] is enough.

Ok, if this two patches really don't fix any problem, it will protect you
from seeing *the same uselss patches* in your inbox again at least I think:).

Thanks.


\
 
 \ /
  Last update: 2014-02-11 02:21    [W:0.179 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site