[PATCH V2] Gadget: race between ffs_epfile_io() and ffs_func_eps_disable()

2014-04-13 Thread Chao Bi
;desc = NULL || usb_ep_align_maybe(): - it refers ep->desc->wMaxPacketSize- Signed-off-by: Chao Bi --- drivers/usb/gadget/f_fs.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index 2e164dc..1e

[PATCH] Gadget: race between ffs_epfile_io() and ffs_func_eps_disable()

2014-04-07 Thread Chao Bi
;desc = NULL || usb_ep_align_maybe(): - it refers ep->desc->wMaxPacketSize- Signed-off-by: Chao Bi --- drivers/usb/gadget/f_fs.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index 2e164dc..1e

[PATCH] Gadget: race between ffs_epfile_io() and ffs_func_eps_disable()

2014-04-07 Thread Chao Bi
ile_io ffs_func_eps_disable || - usb_ep_disable(): epfile->ep->ep->desc = NULL || usb_ep_align_maybe(): - it refers ep->desc->wMaxPacketSize- S

Re: [PATCH] WIFI: handle a neglected case in nl80211_new_interface()

2013-11-27 Thread Chao Bi
On Thu, 2013-11-28 at 11:53 +0800, Chao Bi wrote: > On Wed, 2013-11-27 at 20:43 +0530, Ujjal Roy wrote: > > Hi, > > > > > > We can use IS_ERR_OR_NULL(wdev) to check NULL as well as error value. > > > > Thanks, > > UjjaL > > > > On Wed

Re: [PATCH] WIFI: handle a neglected case in nl80211_new_interface()

2013-11-27 Thread Chao Bi
On Wed, 2013-11-27 at 20:43 +0530, Ujjal Roy wrote: > Hi, > > > We can use IS_ERR_OR_NULL(wdev) to check NULL as well as error value. > > Thanks, > UjjaL > > On Wed, Nov 27, 2013 at 8:30 AM, Chao Bi wrote: > In nl80211_new_interface(), it calls rde

[PATCH] WIFI: handle a neglected case in nl80211_new_interface()

2013-11-26 Thread Chao Bi
rface. when get a NULL returned value, nl80211_new_interface() is expected to return but it actually runs down to access the NULL pointer, this could lead to a panic. Signed-off-by: Chao Bi --- net/wireless/nl80211.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wir

[PATCH V3] n_gsm: race between ld close and gsmtty open

2013-11-25 Thread Chao Bi
event gsm_dlci_release() releasing dlci after gsmtty_install() allocats dlci but before gsmtty_open increases dlci's ref count; 3) Decrease dlci's ref count in gsmtty_remove(), a tty framework API, this is the opposite process of step 2). Signed-off-by: Chao Bi

[PATCH] SPI: SSP SPI Controller driver v3

2012-12-17 Thread chao bi
* Copyright (c) 2010, Intel Corporation. + * Ken Mills + * Sylvain Centelles + * Jun Chen + * Chao Bi + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Sof

[PATCH] SPI: SSP SPI Controller driver

2012-12-17 Thread chao bi
* Copyright (c) 2010, Intel Corporation. + * Ken Mills + * Sylvain Centelles + * Jun Chen + * Chao Bi + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Sof

[PATCH] serial:ifx6x60:Keep word size accordance with SPI controller

2012-12-11 Thread chao bi
As protocol driver, IFX SPI driver initiate to setup SPI master with default SPI word size as 16 bit/word, however, SPI master may not adopt this default value due to SPI controller's capability, it might choose an available value by itself and set it to spi_device.bits_per_word. In order to keep

[PATCH] serial:ifx6x60:Delete SPI timer when shut down port

2012-12-11 Thread chao bi
When shut down SPI port, it's possible that MRDY has been asserted and a SPI timer was activated waiting for SRDY assert, in the case, it needs to delete this timer. Signed-off-by: Chen Jun Signed-off-by: channing --- drivers/tty/serial/ifx6x60.c |1 + 1 files changed, 1 insertions(+), 0 d

[PATCH] serial:ifx6x60:Delete SPI timer when shut down port

2012-11-26 Thread chao bi
When shut down SPI port, it's possible that MRDY has been asserted and a SPI timer was activated waiting for SRDY assert, in the case, it needs to delete this timer. Signed-off-by: Chen Jun Signed-off-by: channing --- drivers/tty/serial/ifx6x60.c |1 + 1 files changed, 1 insertions(+), 0 d

[PATCH] serial:ifx6x60:Delete SPI timer when shut down port

2012-11-22 Thread chao bi
When shut down SPI port, it's possible that MRDY has been asserted and a SPI timer was activated waiting for SRDY assert, in the case, it needs to delete this timer. Signed-off-by: Chen Jun Signed-off-by: channing --- drivers/tty/serial/ifx6x60.c |1 + 1 files changed, 1 insertions(+), 0 d

Re: [PATCH] serial:ifx6x60:Delete SPI timer when shut down port

2012-11-22 Thread chao bi
On Thu, 2012-11-22 at 11:06 +, Alan Cox wrote: > > --- a/drivers/tty/serial/ifx6x60.c > > +++ b/drivers/tty/serial/ifx6x60.c > > @@ -552,7 +552,10 @@ static void ifx_port_shutdown(struct tty_port > > *port) container_of(port, struct ifx_spi_device, tty_port); > > > > mrdy_set_low(ifx_dev)

[PATCH] serial:ifx6x60:Delete SPI timer when shut down port

2012-11-22 Thread chao bi
When shut down SPI port, it's possible that MRDY has been asserted and a SPI timer was activated waiting for SRDY assert, in the case, it needs to delete this timer. Signed-off-by: Chen Jun Signed-off-by: channing --- drivers/tty/serial/ifx6x60.c |5 - 1 files changed, 4 insertions(+),

[PATCH] DMA interrupt mask value should not be hard coded

2012-11-19 Thread chao bi
In intel_mid_dma.c, when setup DMA controller, its interrupt mask value is hard coded, it's not needed because this value has already been initiated and set value according to DMA channels which are used. cc: Chen Jun Signed-off-by: channing --- drivers/dma/intel_mid_dma.c |1 - 1 files ch