Displaying 2 results from an estimated 2 matches for "donecr".
Did you mean:
donec
2017 Mar 17
1
[PATCH] tty: hvc: don't allocate a buffer for console print on stack
...ivers/tty/hvc/hvc_console.c
> @@ -143,10 +143,15 @@ static struct hvc_struct *hvc_get_by_index(int index)
> static void hvc_console_print(struct console *co, const char *b,
> unsigned count)
> {
> - char c[N_OUTBUF] __ALIGNED__;
> unsigned i = 0, n = 0;
> int r, donecr = 0, index = co->index;
>
> + /*
> + * Access to the buffer is serialized by console_sem in caller code from
> + * kernel/printk/printk.c
> + */
> + static char c[N_OUTBUF] __ALIGNED__;
What about allocating it dynamically? That's the correct thing to do.
thanks,
g...
2017 Mar 17
1
[PATCH] tty: hvc: don't allocate a buffer for console print on stack
...ivers/tty/hvc/hvc_console.c
> @@ -143,10 +143,15 @@ static struct hvc_struct *hvc_get_by_index(int index)
> static void hvc_console_print(struct console *co, const char *b,
> unsigned count)
> {
> - char c[N_OUTBUF] __ALIGNED__;
> unsigned i = 0, n = 0;
> int r, donecr = 0, index = co->index;
>
> + /*
> + * Access to the buffer is serialized by console_sem in caller code from
> + * kernel/printk/printk.c
> + */
> + static char c[N_OUTBUF] __ALIGNED__;
What about allocating it dynamically? That's the correct thing to do.
thanks,
g...