[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121129134136.36cbf936@pyramind.ukuu.org.uk>
Date: Thu, 29 Nov 2012 13:41:36 +0000
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Chen Gang <gang.chen@...anux.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [Suggestion] drivers/tty: drivers/char/: for
MAX_ASYNC_BUFFER_SIZE
On Thu, 29 Nov 2012 13:07:28 +0800
Chen Gang <gang.chen@...anux.com> wrote:
> Hello Greg Kroah-Hartman:
>
> for MAX_ASYNC_BUFFER_SIZE:
> it is defined as 4096;
> but for the max buffer size which it processes, is 65535.
> so suggest to #define MAX_ASYNC_BUFFER_SIZE 0x10000 (better than 0xffff)
I don't see the need to change this. Possibly some of the old synclink
drivers need to check more carefully for overflows if configured for very
large frame sizes ?
>
> ---------------------------------------------------------------------------------
> Step 3:
>
> one sample in drivers/tty/n_gsm.c (same for another implementation)
>
> receive_buf is a function ptr which may be gsmld_receive_buf at line 2819.
> it does not check the length of count whether larger than MAX_ASYNC_BUFFER_SIZE.
> if count is larger than MAX_ASYNC_BUFFER_SIZE, will cause issue.
Why should it - MAX_ASYNC_BUFFER_SIZE is an internal detail of the
synclink drivers.
Alan
--
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