Re: [PATCH v2 08/12] usb: chipidea: udc: use gfp_flags in _hardware_enqueue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx> writes:

> Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx> writes:
>
>> @@ -411,7 +414,7 @@ static int _hardware_enqueue(struct ci13xxx_ep *mEp, struct ci13xxx_req *mReq)
>>  	mReq->req.status = -EALREADY;
>>  
>>  	if (mReq->req.zero && length && (length % mEp->ep.maxpacket == 0)) {
>> -		mReq->zptr = dma_pool_alloc(mEp->td_pool, GFP_ATOMIC,
>> +		mReq->zptr = dma_pool_alloc(mEp->td_pool, gfp_flags,
>>  					   &mReq->zdma);
>
> This means that the first gadget to call usb_ep_queue(..., GFP_KERNEL)
> will blow up. Try mass_storage with lockdep enabled. You're testing this
> code, right?

Right, mass_storage joins my head in spinning:

------------[ cut here ]------------
WARNING: at /home/space/ash/linux/kernel/lockdep.c:2739
lockdep_trace_alloc+0x8b/0xb2()
Modules linked in: g_mass_storage libcomposite ci13xxx_pci ci_hdrc
Pid: 850, comm: file-storage Not tainted 3.9.0-rc4-00177-g5dd38de-dirty
#182
Call Trace:
 [<c102ae54>] warn_slowpath_common+0x48/0x5f
 [<c1068856>] ? lockdep_trace_alloc+0x8b/0xb2
 [<c102ae7a>] warn_slowpath_null+0xf/0x13
 [<c1068856>] lockdep_trace_alloc+0x8b/0xb2
 [<c10dd36f>] kmem_cache_alloc_trace+0x24/0xab
 [<f89998e9>] ? add_td_to_list.isra.25+0x2d/0x113 [ci_hdrc]
 [<f89998e9>] add_td_to_list.isra.25+0x2d/0x113 [ci_hdrc]
 [<f8999b3e>] _ep_queue+0x16f/0x3b3 [ci_hdrc]
 [<f8999dfd>] ep_queue+0x37/0x53 [ci_hdrc]
 [<f89dba87>] start_transfer+0x46/0x8f [g_mass_storage]
 [<f89dbc0b>] start_out_transfer+0x32/0x41 [g_mass_storage]
 [<f89ddcf7>] fsg_main_thread+0xf3/0x5d8 [g_mass_storage]
 [<c1044932>] kthread+0x7a/0x7f
 [<f89ddc04>] ? handle_exception+0x2ad/0x2ad [g_mass_storage]
 [<f89ddc04>] ? handle_exception+0x2ad/0x2ad [g_mass_storage]
 [<c1044932>] ? kthread+0x7a/0x7f
 [<c1510000>] ? intel_detect_tlb+0xff/0x2ff
 [<c1520577>] ret_from_kernel_thread+0x1b/0x28
 [<c10448b8>] ? __kthread_parkme+0x54/0x54
---[ end trace cdf423101d48bffc ]---

Cheers,
--
Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux