Le samedi 13 mars 2010 23:27:49, Ithamar R. Adema a écrit :
> This fixes the following BUG:
> 
> BUG: sleeping function called from invalid context at mm/slab.c:3055
> in_atomic(): 0, irqs_disabled(): 1, pid: 253, name: dd
> 1 lock held by dd/253:
>  #0:  (&state->mutex){......}, at: [<80148294>] uart_open+0x7c/0x448
> Call Trace:
> [<8000a1ac>] dump_stack+0x8/0x34
> [<8008a72c>] kmem_cache_alloc+0x44/0x1c4
> [<8005aaac>] request_threaded_irq+0xac/0x170
> [<801495e4>] ifxmipsasc_startup+0xb8/0x1c0
> [<801474c0>] uart_startup+0x8c/0x1c0
> [<8014836c>] uart_open+0x154/0x448
> [<8013d06c>] tty_open+0x324/0x484
> [<800918d8>] chrdev_open+0x180/0x1ec
> [<8008bc48>] __dentry_open+0x1d8/0x370
> [<8008becc>] nameidata_to_filp+0x3c/0x60
> [<8009b808>] do_filp_open+0x418/0x8a0
> [<8008b9e8>] do_sys_open+0x6c/0xc8
> [<80004104>] stack_done+0x20/0x3c
> 
> Signed-off-by: Ithamar R. Adema <ithamar.ad...@team-embedded.nl>
> ---
>  .../linux/ifxmips/patches-2.6.30/120-serial.patch  |    7 +------
>  1 files changed, 1 insertions(+), 6 deletions(-)
> 
> diff --git a/target/linux/ifxmips/patches-2.6.30/120-serial.patch
>  b/target/linux/ifxmips/patches-2.6.30/120-serial.patch index
>  8aa9dbb..f91a073 100644
> --- a/target/linux/ifxmips/patches-2.6.30/120-serial.patch
> +++ b/target/linux/ifxmips/patches-2.6.30/120-serial.patch
> @@ -30,7 +30,7 @@ Index: linux-2.6.30.8/drivers/serial/ifxmips_asc.c
>  ===================================================================
>  --- /dev/null        1970-01-01 00:00:00.000000000 +0000
>  +++ linux-2.6.30.8/drivers/serial/ifxmips_asc.c      2009-10-19
>  21:41:27.000000000 +0200 -@@ -0,0 +1,561 @@
> +@@ -0,0 +1,556 @@
>  +/*
>  + *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
>  + *
> @@ -258,7 +258,6 @@ Index: linux-2.6.30.8/drivers/serial/ifxmips_asc.c
>  +
>  +static int ifxmipsasc_startup(struct uart_port *port)
>  +{
> -+    unsigned long flags;
>  +    int retval;
>  +
>  +    port->uartclk = ifxmips_get_fpi_hz();
> @@ -271,8 +270,6 @@ Index: linux-2.6.30.8/drivers/serial/ifxmips_asc.c
>  +    wmb();
>  +    ifxmips_w32(ifxmips_r32(port->membase + IFXMIPS_ASC_CON) |
>  ASCCON_M_8ASYNC | ASCCON_FEN | ASCCON_TOEN | ASCCON_ROEN, port->membase +
>  IFXMIPS_ASC_CON); +
> -+    local_irq_save(flags);
> -+
>  +    retval = request_irq(port->irq, ifxmipsasc_tx_int, IRQF_DISABLED,
>  "asc_tx", port); +   if (retval) {
>  +            printk(KERN_ERR "failed to request ifxmipsasc_tx_int\n");
> @@ -293,14 +290,12 @@ Index: linux-2.6.30.8/drivers/serial/ifxmips_asc.c
>  +
>  +    ifxmips_w32(ASC_IRNREN_RX_BUF | ASC_IRNREN_TX_BUF | ASC_IRNREN_ERR |
>  ASC_IRNREN_TX, port->membase + IFXMIPS_ASC_IRNREN); +
> -+    local_irq_restore(flags);
>  +    return 0;
>  +
>  +err2:
>  +    free_irq(port->irq + 2, port);
>  +err1:
>  +    free_irq(port->irq, port);
> -+    local_irq_restore(flags);
>  +    return retval;
>  +}
>  +
> 
Applied in r20273, thanks!
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to