A bug in scsi_alloc_target of drivers/scsi/scsi_scan.c

2017-05-09 Thread Dashi DS1 Cao
When debugging a race condition in scsi_remove_target of 3.12, I ran into this possible bug within scsi_alloc_target. When an existing "struct scsi_target" is found and used, the starget just got through kzmalloc should be freed, rather than dong a "put_device(dev)". diff --git a/drivers/scsi/sc

A small window for a race condition in mm/rmap.c:page_lock_anon_vma_read

2016-12-20 Thread Dashi DS1 Cao
I've collected four crash dumps with similar backtrace. PID: 247TASK: 881fcfad8000 CPU: 14 COMMAND: "kswapd1" #0 [881fcfad7978] machine_kexec at 81051e9b #1 [881fcfad79d8] crash_kexec at 810f27e2 #2 [881fcfad7aa8] oops_end at 8163f448 #3 [881f

RE: A small window for a race condition in mm/rmap.c:page_lock_anon_vma_read

2016-12-22 Thread Dashi DS1 Cao
ff811a 0x811a340a <+250>: lea0x1(%rcx),%edx 0x811a340d <+253>: mov%ecx,%eax 0x811a340f <+255>: lock cmpxchg %edx,(%rsi) 0x811a3413 <+259>: cmp%eax,%ecx 0x811a3415 <+261>: je 0x811

RE: A small window for a race condition in mm/rmap.c:page_lock_anon_vma_read

2016-12-22 Thread Dashi DS1 Cao
} } } }, wait_list = { next = 0x0, prev = 0x0 } }, refcount = { counter = 0 }, rb_root = { rb_node = 0x0 } } crash> -Original Message- From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of Dashi DS1 Cao Sent: Thurs

version 3.18.44 to 3.18.45 introduced a bug in "drivers/scsi/megaraid/megaraid_sas_base.c"

2016-12-13 Thread Dashi DS1 Cao
--- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -1614,16 +1614,13 @@ megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) goto out_done; } - switch (scmd->cmnd[0]) { - case SYNCHRONIZE_CACHE:

RE: A small window for a race condition in mm/rmap.c:page_lock_anon_vma_read

2016-12-22 Thread Dashi DS1 Cao
uded: kernel virtual address: 882b47ddadc0" I guess it is not copied out because it has already been put into some unused list. Dashi Cao -Original Message- From: Hugh Dickins [mailto:hu...@google.com] Sent: Friday, December 23, 2016 6:27 AM To: Peter Zijlstra Cc: Michal Hocko

RE: A small window for a race condition in mm/rmap.c:page_lock_anon_vma_read

2016-12-22 Thread Dashi DS1 Cao
f881fcfad3ec8] kthread at 810a5b8f #14 [881fcfad3f50] ret_from_fork at 81646a98 I hope the information would be useful. Dashi Cao -Original Message- From: Hugh Dickins [mailto:hu...@google.com] Sent: Friday, December 23, 2016 6:27 AM To: Peter Zijlstra Cc: Michal Hocko

RE: A small window for a race condition in mm/rmap.c:page_lock_anon_vma_read

2016-12-24 Thread Dashi DS1 Cao
2016 10:20 PM To: Dashi DS1 Cao Cc: Hugh Dickins ; Michal Hocko ; linux...@kvack.org; linux-kernel@vger.kernel.org Subject: Re: A small window for a race condition in mm/rmap.c:page_lock_anon_vma_read On Fri, Dec 23, 2016 at 02:02:14AM +0000, Dashi DS1 Cao wrote: > The kernel version is &qu

work queue of scsi fc transports should be serialized

2017-05-19 Thread Dashi DS1 Cao
I ran into a series of crashes within scsi_remove_target in SUSE 12 SP1 (3.12.49-11-default). This will happen very easily if there is a lot of disks with many storage and host FC ports. It occurs when all the ports are timeout at the same time. 50 disks for each rports (the same 50 LUNs), 4 rpo

RE: work queue of scsi fc transports should be serialized

2017-05-20 Thread Dashi DS1 Cao
On Fri, 2017-05-19 at 09:36 +, Dashi DS1 Cao wrote: > It seems there is a race of multiple "fc_starget_delete" of the same > rport, thus of the same SCSI host. The race leads to the race of > scsi_remove_target and it cannot be prevented by the code snippet > alone, e

Add TI ICDI as a simple usb serial device

2017-09-11 Thread Dashi DS1 Cao
Hi, The TI ICDI is an integrated debugger interface for its TM4C series microcontroller chip. It is a USB interface which can be used just like a USB serial device. A few lines of codes added to the file "drivers/usb/serial/usb-serial-simple.c" accomplishes this job. And it can be used to upload

RE: Add TI ICDI as a simple usb serial device

2017-09-11 Thread Dashi DS1 Cao
Sorry! Should have submitted the patch inline: --- drivers/usb/serial/usb-serial-simple.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/usb-serial-simple.c b/drivers/usb/serial/usb-serial-simple.c index e98b6e5..7727eab 100644 --- a/drivers/usb/ser