[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <op.vedzcjyz7p4s8u@pikus>
Date: Wed, 16 Jun 2010 11:30:09 +0200
From: Michał Nazarewicz <m.nazarewicz@...sung.com>
To: Sergei Shtylyov <sshtylyov@...sta.com>
Cc: linux-usb@...r.kernel.org,
David Brownell <dbrownell@...rs.sourceforge.net>,
Kyungmin Park <kyungmin.park@...sung.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] USB: gadget: g_fs: possible invalid pointer reference bug
fixed
> Michal Nazarewicz wrote:
>> diff --git a/drivers/usb/gadget/g_ffs.c b/drivers/usb/gadget/g_ffs.c
>> index 2f26470..da3a9e4 100644
>> --- a/drivers/usb/gadget/g_ffs.c
>> +++ b/drivers/usb/gadget/g_ffs.c
>> @@ -392,6 +392,17 @@ static int __gfs_do_config(struct usb_configuration *c,
>> if (unlikely(ret < 0))
>> return ret;
>>
>> + /* After previous do_configs there may be some invalid
>> + * pointers in c->interface array. This happens every time
>> + * a user space function with fewer interfaces than a user
>> + * space function that was run before the new one is run. The
>> + * compasit's set_config() assumes that if there is no more
>> + * then MAX_CONFIG_INTERFACES interfaces in a configuration
>> + * then there is a NULL pointer after the last interface in
>> + * c->interface array. We need to make sure this is true. */
On Tue, 15 Jun 2010 12:10:36 +0200, Sergei Shtylyov <sshtylyov@...sta.com> wrote:
> According to CodingStyle, the preferred style of the multi-line comments
> is this:
>
> /*
> * bla
> * bla
> */
You are of course correct but on the other hand I have consistently used
the incorrect form so far also in g_ffs.c so... I think correcting only
this comment would bring inconsistency so I should rather resend it with
other (two) comments corrected as well. Anyone thinks I should do that?
And I promise, I will remember to use the correct format in my future
files.
--
Best regards, _ _
| Humble Liege of Serenely Enlightened Majesty of o' \,=./ `o
| Computer Science, Michał "mina86" Nazarewicz (o o)
+----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists