[PATCH] drm: Add the mutex protection in drm_do_vm_fault.

2013-10-11 Thread Jun Chen
There are no mutex protection for the dev->map_hash while calling the drm_ht_find_item in the function drm_do_vm_fault. So try to mutex firstly and then find the list for using to avoid this race condition. Signed-off-by: Chen Jun --- drivers/gpu/drm/drm_vm.c | 11 +-- 1 files

[PATCH] drm: Add the mutex protection in drm_do_vm_fault.

2013-10-11 Thread Jun Chen
There are no mutex protection for the dev-map_hash while calling the drm_ht_find_item in the function drm_do_vm_fault. So try to mutex firstly and then find the list for using to avoid this race condition. Signed-off-by: Chen Jun jun.d.c...@intel.com --- drivers/gpu/drm/drm_vm.c | 11

Re: [PATCH] Inet-hashtable: Change the range of sk->hash lock to avoid the race condition.

2013-09-13 Thread Jun Chen
On Thu, 2013-09-12 at 22:40 -0700, Eric Dumazet wrote: > On Fri, 2013-09-13 at 05:47 -0400, Jun Chen wrote: > > On Thu, 2013-09-12 at 05:00 -0700, Eric Dumazet wrote: > > > On Thu, 2013-09-12 at 12:32 -0400, Jun Chen wrote: > > > > When try to add node to list in

Re: [PATCH] Inet-hashtable: Change the range of sk-hash lock to avoid the race condition.

2013-09-13 Thread Jun Chen
On Thu, 2013-09-12 at 22:40 -0700, Eric Dumazet wrote: On Fri, 2013-09-13 at 05:47 -0400, Jun Chen wrote: On Thu, 2013-09-12 at 05:00 -0700, Eric Dumazet wrote: On Thu, 2013-09-12 at 12:32 -0400, Jun Chen wrote: When try to add node to list in __inet_hash_nolisten function, first

Re: [PATCH] Inet-hashtable: Change the range of sk->hash lock to avoid the race condition.

2013-09-12 Thread Jun Chen
On Thu, 2013-09-12 at 05:00 -0700, Eric Dumazet wrote: > On Thu, 2013-09-12 at 12:32 -0400, Jun Chen wrote: > > When try to add node to list in __inet_hash_nolisten function, first get the > > list and then to lock for using, but in extremeness case, others can del > >

[PATCH] Inet-hashtable: Change the range of sk->hash lock to avoid the race condition.

2013-09-12 Thread Jun Chen
When try to add node to list in __inet_hash_nolisten function, first get the list and then to lock for using, but in extremeness case, others can del this node before locking it, then the node should be null.So this patch try to lock firstly and then get the list for using to avoid this race

[PATCH] Inet-hashtable: Change the range of sk-hash lock to avoid the race condition.

2013-09-12 Thread Jun Chen
When try to add node to list in __inet_hash_nolisten function, first get the list and then to lock for using, but in extremeness case, others can del this node before locking it, then the node should be null.So this patch try to lock firstly and then get the list for using to avoid this race

Re: [PATCH] Inet-hashtable: Change the range of sk-hash lock to avoid the race condition.

2013-09-12 Thread Jun Chen
On Thu, 2013-09-12 at 05:00 -0700, Eric Dumazet wrote: On Thu, 2013-09-12 at 12:32 -0400, Jun Chen wrote: When try to add node to list in __inet_hash_nolisten function, first get the list and then to lock for using, but in extremeness case, others can del this node before locking

Re: [PATCH] tcp: Modify the condition for the first skb to collapse

2013-06-17 Thread Jun Chen
On Mon, 2013-06-17 at 06:21 -0700, Eric Dumazet wrote: > On Mon, 2013-06-17 at 14:52 -0400, Jun Chen wrote: > > On Mon, 2013-06-17 at 03:29 -0700, Eric Dumazet wrote: > > > On Mon, 2013-06-17 at 13:29 -0400, Jun Chen wrote: > > > > > > > > > hi, >

Re: [PATCH] tcp: Modify the condition for the first skb to collapse

2013-06-17 Thread Jun Chen
On Mon, 2013-06-17 at 03:29 -0700, Eric Dumazet wrote: > On Mon, 2013-06-17 at 13:29 -0400, Jun Chen wrote: > > > > > hi, > > When the condition of tcp_win_from_space(skb->truesize) > skb->len is > > true but the before(start, TCP_SKB_CB(skb)->

Re: [PATCH] tcp: Modify the condition for the first skb to collapse

2013-06-17 Thread Jun Chen
On Mon, 2013-06-17 at 01:15 -0700, Eric Dumazet wrote: > On Mon, 2013-06-17 at 10:18 -0400, Jun Chen wrote: > > When search the first skb to collapse,the condition of overlap to the next > > one have been > > reached,but the start is less than TCP_SKB_CB(skb)->seq at this

[PATCH] tcp: Modify the condition for the first skb to collapse

2013-06-17 Thread Jun Chen
When search the first skb to collapse,the condition of overlap to the next one have been reached,but the start is less than TCP_SKB_CB(skb)->seq at this time, then followed process will trigger the BUG_ON of the offset(start - TCP_SKB_CB(skb)->seq). So this patch add one check (!

[PATCH] tcp: Modify the condition for the first skb to collapse

2013-06-17 Thread Jun Chen
When search the first skb to collapse,the condition of overlap to the next one have been reached,but the start is less than TCP_SKB_CB(skb)-seq at this time, then followed process will trigger the BUG_ON of the offset(start - TCP_SKB_CB(skb)-seq). So this patch add one check (!

Re: [PATCH] tcp: Modify the condition for the first skb to collapse

2013-06-17 Thread Jun Chen
On Mon, 2013-06-17 at 01:15 -0700, Eric Dumazet wrote: On Mon, 2013-06-17 at 10:18 -0400, Jun Chen wrote: When search the first skb to collapse,the condition of overlap to the next one have been reached,but the start is less than TCP_SKB_CB(skb)-seq at this time, then followed process

Re: [PATCH] tcp: Modify the condition for the first skb to collapse

2013-06-17 Thread Jun Chen
On Mon, 2013-06-17 at 03:29 -0700, Eric Dumazet wrote: On Mon, 2013-06-17 at 13:29 -0400, Jun Chen wrote: hi, When the condition of tcp_win_from_space(skb-truesize) skb-len is true but the before(start, TCP_SKB_CB(skb)-seq) is also true, the final condition will be true. The follow

Re: [PATCH] tcp: Modify the condition for the first skb to collapse

2013-06-17 Thread Jun Chen
On Mon, 2013-06-17 at 06:21 -0700, Eric Dumazet wrote: On Mon, 2013-06-17 at 14:52 -0400, Jun Chen wrote: On Mon, 2013-06-17 at 03:29 -0700, Eric Dumazet wrote: On Mon, 2013-06-17 at 13:29 -0400, Jun Chen wrote: hi, When the condition of tcp_win_from_space(skb-truesize) skb

[PATCH] perf: Add the rcu_read_lock to protect the list_for_each_entry_rcu.

2013-01-27 Thread Jun Chen
The list_for_each_entry_rcu should be guarded by rcu_read_lock().This patch add rcu_read_lock to protect the list_for_each_entry_rcu. Signed-off-by: Chen Jun --- kernel/events/core.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/kernel/events/core.c

[PATCH] perf: Add the rcu_read_lock to protect the list_for_each_entry_rcu.

2013-01-27 Thread Jun Chen
The list_for_each_entry_rcu should be guarded by rcu_read_lock().This patch add rcu_read_lock to protect the list_for_each_entry_rcu. Signed-off-by: Chen Jun jun.d.c...@intel.com --- kernel/events/core.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

Re: [PATCH] spi: Add the flag indicate to registe new device as children of master or not.

2012-12-24 Thread Jun Chen
On Fri, 2012-12-21 at 19:06 +, Grant Likely wrote: > On Fri, 21 Dec 2012 12:39:52 -0500, Jun Chen wrote: > > On Wed, 2012-12-19 at 16:21 +, Grant Likely wrote: > > > On Wed, 19 Dec 2012 09:04:16 +, Mark Brown > > > wrote: > > > > On Wed, Dec

Re: [PATCH] spi: Add the flag indicate to registe new device as children of master or not.

2012-12-24 Thread Jun Chen
On Fri, 2012-12-21 at 19:06 +, Grant Likely wrote: On Fri, 21 Dec 2012 12:39:52 -0500, Jun Chen jun.d.c...@intel.com wrote: On Wed, 2012-12-19 at 16:21 +, Grant Likely wrote: On Wed, 19 Dec 2012 09:04:16 +, Mark Brown broo...@opensource.wolfsonmicro.com wrote: On Wed, Dec

Re: [PATCH] spi: Add the flag indicate to registe new device as children of master or not.

2012-12-21 Thread Jun Chen
On Wed, 2012-12-19 at 16:21 +, Grant Likely wrote: > On Wed, 19 Dec 2012 09:04:16 +, Mark Brown > wrote: > > On Wed, Dec 19, 2012 at 04:44:03AM -0500, Jun Chen wrote: > > > > > This spi_alloc_device function will be called in the spi_new_device > &g

Re: [PATCH] spi: Add the flag indicate to registe new device as children of master or not.

2012-12-21 Thread Jun Chen
On Wed, 2012-12-19 at 16:21 +, Grant Likely wrote: On Wed, 19 Dec 2012 09:04:16 +, Mark Brown broo...@opensource.wolfsonmicro.com wrote: On Wed, Dec 19, 2012 at 04:44:03AM -0500, Jun Chen wrote: This spi_alloc_device function will be called in the spi_new_device function

Re: [PATCH] spi: Add the flag indicate to registe new device as children of master or not.

2012-12-18 Thread Jun Chen
On Tue, 2012-12-18 at 15:26 +, Mark Brown wrote: > On Tue, Dec 18, 2012 at 11:29:34AM -0500, Jun Chen wrote: > > > * @master: Controller to which device is connected > > + * device_was_children_of_master is flag which the device is registed > > + * as the children of

[PATCH] spi: Add the flag indicate to registe new device as children of master or not.

2012-12-18 Thread Jun Chen
Because there are two aim when allocating the new device, one is for children of master, other is for master. So this patch add one flag to indicate different purpose. Signed-off-by: Bi Chao Signed-off-by: Chen Jun --- drivers/spi/spi.c | 16 +++- include/linux/spi/spi.h

[PATCH] spi: Add the flag indicate to registe new device as children of master or not.

2012-12-18 Thread Jun Chen
Because there are two aim when allocating the new device, one is for children of master, other is for master. So this patch add one flag to indicate different purpose. Signed-off-by: Bi Chao chao...@intel.com Signed-off-by: Chen Jun jun.d.c...@intel.com --- drivers/spi/spi.c | 16

Re: [PATCH] spi: Add the flag indicate to registe new device as children of master or not.

2012-12-18 Thread Jun Chen
On Tue, 2012-12-18 at 15:26 +, Mark Brown wrote: On Tue, Dec 18, 2012 at 11:29:34AM -0500, Jun Chen wrote: * @master: Controller to which device is connected + * device_was_children_of_master is flag which the device is registed + * as the children of the bus This isn't

Re: [PATCH] serial: ifx6x60: Add modem power off function in the platform reboot process

2012-11-22 Thread Jun Chen
On Thu, 2012-11-22 at 11:08 +, Alan Cox wrote: > On Thu, 22 Nov 2012 06:19:23 -0500 > Jun Chen wrote: > > > > > This patch add modem power off function in the reboot process > > according registering reboot callback to the reboot_notifier_list. > > Also re

[PATCH] serial: ifx6x60: Add modem power off function in the platform reboot process

2012-11-22 Thread Jun Chen
This patch add modem power off function in the reboot process according registering reboot callback to the reboot_notifier_list. Also realizing the spi shutdown function. Signed-off-by: Bi Chao Signed-off-by: Chen Jun --- drivers/tty/serial/ifx6x60.c | 56

[PATCH] serial: ifx6x60: Add modem power off function in the platform reboot process

2012-11-22 Thread Jun Chen
This patch add modem power off function in the reboot process according registering reboot callback to the reboot_notifier_list. Also realizing the spi shutdown function. Signed-off-by: Bi Chao Signed-off-by: Chen Jun --- drivers/tty/serial/ifx6x60.c | 39

[PATCH] serial: ifx6x60: Add modem power off function in the platform reboot process

2012-11-22 Thread Jun Chen
This patch add modem power off function in the reboot process according registering reboot callback to the reboot_notifier_list. Also realizing the spi shutdown function. Signed-off-by: Bi Chao chao...@intel.com Signed-off-by: Chen Jun jun.d.c...@intel.com --- drivers/tty/serial/ifx6x60.c |

[PATCH] serial: ifx6x60: Add modem power off function in the platform reboot process

2012-11-22 Thread Jun Chen
This patch add modem power off function in the reboot process according registering reboot callback to the reboot_notifier_list. Also realizing the spi shutdown function. Signed-off-by: Bi Chao chao...@intel.com Signed-off-by: Chen Jun jun.d.c...@intel.com --- drivers/tty/serial/ifx6x60.c |

Re: [PATCH] serial: ifx6x60: Add modem power off function in the platform reboot process

2012-11-22 Thread Jun Chen
On Thu, 2012-11-22 at 11:08 +, Alan Cox wrote: On Thu, 22 Nov 2012 06:19:23 -0500 Jun Chen jun.d.c...@intel.com wrote: This patch add modem power off function in the reboot process according registering reboot callback to the reboot_notifier_list. Also realizing the spi shutdown

[PATCH] serial: ifx6x60: ifx_spi_write don't need to do mrdy_assert when fifo is not empty

2012-11-18 Thread Jun Chen
This patch check whether the fifo lenth is empty before writing new data to fifo.If condition is true,ifx_spi_write need to trigger one mrdy_assert. If condition is false,the mrdy_assert will be trigger by the next ifx_spi_io. Cc: Bi Chao Signed-off-by: Chen Jun ---

[PATCH] serial: ifx6x60: ifx_spi_write don't need to do mrdy_assert when fifo is not empty

2012-11-18 Thread Jun Chen
This patch check whether the fifo lenth is empty before writing new data to fifo.If condition is true,ifx_spi_write need to trigger one mrdy_assert. If condition is false,the mrdy_assert will be trigger by the next ifx_spi_io. Cc: Bi Chao chao...@intel.com Signed-off-by: Chen Jun

[PATCH] serial: ifx6x60: Add module parameters to manage the modem status through sysfs

2012-11-15 Thread Jun Chen
The Medfield Platform implements a recovery procedure consisting in an escalation from simple and light recovery procedures to stronger ones with increased visibility and impact to end-user.After platform find some problem from Modem,such as no response, platform will try do modem warm

[PATCH] serial: ifx6x60: ifx_spi_write don't need to do mrdy_assert when fifo is not empty.

2012-11-15 Thread Jun Chen
This patch check whether the fifo lenth is empty before writing new data to fifo.If condition is true,ifx_spi_write need to trigger one mrdy_assert. If condition is false,the mrdy_assert will be trigger by the next ifx_spi_io. Cc: Bi Chao Signed-off-by: Chen Jun ---

[PATCH] serial: ifx6x60: ifx_spi_write don't need to do mrdy_assert when fifo is not empty.

2012-11-15 Thread Jun Chen
This patch check whether the fifo lenth is empty before writing new data to fifo.If condition is true,ifx_spi_write need to trigger one mrdy_assert. If condition is false,the mrdy_assert will be trigger by the next ifx_spi_io. Cc: Bi Chao chao...@intel.com Signed-off-by: Chen Jun

[PATCH] serial: ifx6x60: Add module parameters to manage the modem status through sysfs

2012-11-15 Thread Jun Chen
The Medfield Platform implements a recovery procedure consisting in an escalation from simple and light recovery procedures to stronger ones with increased visibility and impact to end-user.After platform find some problem from Modem,such as no response, platform will try do modem warm