lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5107B76C.6020704@web.de>
Date:	Tue, 29 Jan 2013 12:50:04 +0100
From:	Soeren Moch <smoch@....de>
To:	Andrew Lunn <andrew@...n.ch>
CC:	Arnd Bergmann <arnd@...db.de>, Jason Cooper <jason@...edaemon.net>,
	Greg KH <gregkh@...uxfoundation.org>,
	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	linux-kernel@...r.kernel.org, Michal Hocko <mhocko@...e.cz>,
	linux-mm@...ck.org, Kyungmin Park <kyungmin.park@...sung.com>,
	Mel Gorman <mgorman@...e.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	linaro-mm-sig@...ts.linaro.org,
	linux-arm-kernel@...ts.infradead.org,
	Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
	gennarone@...il.com, mchehab@...hat.com
Subject: Re: [PATCH v2] mm: dmapool: use provided gfp flags for all dma_alloc_coherent()
 calls

On 29.01.2013 12:02, Andrew Lunn wrote:
>> Now I activated the debug messages in em28xx. From the messages I
>> see no correlation of the pool exhaustion and lost sync. Also I
>> cannot see any error messages from the em28xx driver.
>> I see a lot of init_isoc/stop_urbs (maybe EPG scan?) without
>> draining the coherent pool (checked with 'cat
>> /debug/dma-api/num_free_entries', which gave stable numbers), but
>> after half an hour there are only init_isoc messages without
>> corresponding stop_urbs messages and num_free_entries decreased
>> until coherent pool exhaustion.
>
> Hi Soeren
>
> em28xx_stop_urbs() is only called by em28xx_stop_streaming().
>
> em28xx_stop_streaming() is only called by em28xx_stop_feed()
> when 0 == dvb->nfeeds.
>
> em28xx_stop_feed()and em28xx_start_feed() look O.K, dvb->nfeeds is
> protected by a mutex etc.
>
> Now, em28xx_init_isoc() is also called by buffer_prepare(). This uses
> em28xx_alloc_isoc() to do the actual allocation, and that function
> sets up the urb such that on completion the function
> em28xx_irq_callback() is called.
>
> It looks like there might be issues here:
>
> Once the data has been copied out, it resubmits the urb:
>
>         urb->status = usb_submit_urb(urb, GFP_ATOMIC);
>          if (urb->status) {
>                  em28xx_isocdbg("urb resubmit failed (error=%i)\n",
>                                 urb->status);
>          }
>
> However, if the ubs_submit_urb fails, it looks like the urb is lost.
>
> If you look at other code submitting urbs you have this pattern:
>
>                 rc = usb_submit_urb(isoc_bufs->urb[i], GFP_ATOMIC);
>                  if (rc) {
>                          em28xx_err("submit of urb %i failed (error=%i)\n", i,
>                                     rc);
>                          em28xx_uninit_isoc(dev, mode);
>                          return rc;
>                  }
>
> Do you have your build such that you would see "urb resubmit failed"
> in your logs? Are there any?

I only had "urb resubmit failed" messages _after_ the coherent pool 
exhaustion. So I guess something below the usb_submit_urb call is 
allocating (too much) memory, sometimes. Or can dvb_demux allocate 
memory and blame orion-ehci for it?

   Soeren

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ