This is alreay in the CVS repository undergoing final testing before being sent to Greg.
Matt On Wed, Dec 12, 2001 at 01:07:02AM +0100, Oliver Neukum wrote: > Am Mittwoch, 12. Dezember 2001 00:40 schrieb Matthew Dharm: > > I don't know what others think, but I think you missed a spot. devrequets > > is also used in the storage/ directory. > > OK, here's the patch which removes the possible deadlocks from the storage > directory. > > Regards > Oliver > > --- datafab.c.alt Tue Oct 9 19:17:54 2001 > +++ datafab.c Wed Dec 12 00:57:30 2001 > @@ -208,7 +208,7 @@ > > if (use_sg) { > sg = (struct scatterlist *) dest; > - buffer = kmalloc(len, GFP_KERNEL); > + buffer = kmalloc(len, GFP_NOIO); > if (buffer == NULL) > return USB_STOR_TRANSPORT_ERROR; > ptr = buffer; > @@ -333,7 +333,7 @@ > > if (use_sg) { > sg = (struct scatterlist *) src; > - buffer = kmalloc(len, GFP_KERNEL); > + buffer = kmalloc(len, GFP_NOIO); > if (buffer == NULL) > return USB_STOR_TRANSPORT_ERROR; > ptr = buffer; > @@ -665,7 +665,7 @@ > }; > > if (!us->extra) { > - us->extra = kmalloc(sizeof(struct datafab_info), GFP_KERNEL); > + us->extra = kmalloc(sizeof(struct datafab_info), GFP_NOIO); > if (!us->extra) { > US_DEBUGP("datafab_transport: Gah! Can't allocate storage for >Datafab info struct!\n"); > return USB_STOR_TRANSPORT_ERROR; > --- freecom.c.alt Fri Nov 16 21:45:57 2001 > +++ freecom.c Wed Dec 12 00:57:36 2001 > @@ -596,7 +596,7 @@ > * free this for us when cleaning up. */ > if (us->extra == NULL) { > us->extra = kmalloc (sizeof (struct freecom_udata), > - GFP_KERNEL); > + GFP_NOIO); > if (us->extra == NULL) { > US_DEBUGP("Out of memory\n"); > return USB_STOR_TRANSPORT_ERROR; > --- jumpshot.c.alt Mon Sep 17 11:05:33 2001 > +++ jumpshot.c Wed Dec 12 00:57:43 2001 > @@ -284,7 +284,7 @@ > > if (use_sg) { > sg = (struct scatterlist *) dest; > - buffer = kmalloc(len, GFP_KERNEL); > + buffer = kmalloc(len, GFP_NOIO); > if (buffer == NULL) > return USB_STOR_TRANSPORT_ERROR; > ptr = buffer; > @@ -399,7 +399,7 @@ > > if (use_sg) { > sg = (struct scatterlist *) src; > - buffer = kmalloc(len, GFP_KERNEL); > + buffer = kmalloc(len, GFP_NOIO); > if (buffer == NULL) > return USB_STOR_TRANSPORT_ERROR; > ptr = buffer; > @@ -665,7 +665,7 @@ > > > if (!us->extra) { > - us->extra = kmalloc(sizeof(struct jumpshot_info), GFP_KERNEL); > + us->extra = kmalloc(sizeof(struct jumpshot_info), GFP_NOIO); > if (!us->extra) { > US_DEBUGP("jumpshot_transport: Gah! Can't allocate storage >for jumpshot info struct!\n"); > return USB_STOR_TRANSPORT_ERROR; > --- sddr09.c.alt Fri Nov 9 18:20:15 2001 > +++ sddr09.c Wed Dec 12 00:59:41 2001 > @@ -303,7 +303,7 @@ > > if (use_sg) { > sg = (struct scatterlist *)content; > - buffer = kmalloc(len, GFP_KERNEL); > + buffer = kmalloc(len, GFP_NOIO); > if (buffer == NULL) > return USB_STOR_TRANSPORT_ERROR; > ptr = buffer; > @@ -630,17 +630,17 @@ > > alloc_blocks = (alloc_len + (1<<17) - 1) >> 17; > sg = kmalloc(alloc_blocks*sizeof(struct scatterlist), > - GFP_KERNEL); > + GFP_NOIO); > if (sg == NULL) > return 0; > > for (i=0; i<alloc_blocks; i++) { > if (i<alloc_blocks-1) { > - sg[i].address = kmalloc( (1<<17), GFP_KERNEL ); > + sg[i].address = kmalloc( (1<<17), GFP_NOIO ); > sg[i].page = NULL; > sg[i].length = (1<<17); > } else { > - sg[i].address = kmalloc(alloc_len, GFP_KERNEL); > + sg[i].address = kmalloc(alloc_len, GFP_NOIO); > sg[i].page = NULL; > sg[i].length = alloc_len; > } > @@ -672,8 +672,8 @@ > kfree(info->lba_to_pba); > if (info->pba_to_lba) > kfree(info->pba_to_lba); > - info->lba_to_pba = kmalloc(numblocks*sizeof(int), GFP_KERNEL); > - info->pba_to_lba = kmalloc(numblocks*sizeof(int), GFP_KERNEL); > + info->lba_to_pba = kmalloc(numblocks*sizeof(int), GFP_NOIO); > + info->pba_to_lba = kmalloc(numblocks*sizeof(int), GFP_NOIO); > > if (info->lba_to_pba == NULL || info->pba_to_lba == NULL) { > if (info->lba_to_pba != NULL) > @@ -842,7 +842,7 @@ > > if (!us->extra) { > us->extra = kmalloc( > - sizeof(struct sddr09_card_info), GFP_KERNEL); > + sizeof(struct sddr09_card_info), GFP_NOIO); > if (!us->extra) > return USB_STOR_TRANSPORT_ERROR; > memset(us->extra, 0, sizeof(struct sddr09_card_info)); > --- shuttle_usbat.c.alt Mon Jul 30 16:23:52 2001 > +++ shuttle_usbat.c Wed Dec 12 01:00:37 2001 > @@ -681,7 +681,7 @@ > > len = (65535/srb->transfersize) * srb->transfersize; > US_DEBUGP("Max read is %d bytes\n", len); > - buffer = kmalloc(len, GFP_KERNEL); > + buffer = kmalloc(len, GFP_NOIO); > if (buffer == NULL) // bloody hell! > return USB_STOR_TRANSPORT_FAILED; > sector = short_pack(data[7+3], data[7+2]); > --- transport.c.alt Fri Nov 9 18:20:15 2001 > +++ transport.c Wed Dec 12 01:01:27 2001 > @@ -388,7 +388,7 @@ > devrequest *dr; > > /* allocate the device request structure */ > - dr = kmalloc(sizeof(devrequest), GFP_KERNEL); > + dr = kmalloc(sizeof(devrequest), GFP_NOIO); > if (!dr) > return -ENOMEM; > -- Matthew Dharm Home: [EMAIL PROTECTED] Maintainer, Linux USB Mass Storage Driver Sir, for the hundreth time, we do NOT carry 600-round boxes of belt-fed suction darts! -- Salesperson to Greg User Friendly, 12/30/1997
msg03285/pgp00000.pgp
Description: PGP signature