Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754306AbcJEQzZ (ORCPT ); Wed, 5 Oct 2016 12:55:25 -0400 Received: from mail-ua0-f182.google.com ([209.85.217.182]:34011 "EHLO mail-ua0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751947AbcJEQzX (ORCPT ); Wed, 5 Oct 2016 12:55:23 -0400 MIME-Version: 1.0 In-Reply-To: References: <20161005093417.6e82bd97@vdr> <20161005060450.1b0f2152@vento.lan> From: Andy Lutomirski Date: Wed, 5 Oct 2016 09:55:01 -0700 Message-ID: Subject: Re: Problem with VMAP_STACK=y To: =?UTF-8?Q?J=C3=B6rg_Otte?= Cc: Mauro Carvalho Chehab , Jiri Kosina , Patrick Boettcher , Linux Kernel Mailing List , Andy Lutomirski , Michael Krufky , Mauro Carvalho Chehab , Linux Media Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u95GtUYo013718 Content-Length: 2550 Lines: 67 On Wed, Oct 5, 2016 at 9:45 AM, Jörg Otte wrote: > 2016-10-05 17:53 GMT+02:00 Andy Lutomirski : >> On Wed, Oct 5, 2016 at 8:21 AM, Jörg Otte wrote: >>> 2016-10-05 11:04 GMT+02:00 Mauro Carvalho Chehab : >>>> Em Wed, 5 Oct 2016 09:50:42 +0200 (CEST) >>>> Jiri Kosina escreveu: >>>> >>>>> On Wed, 5 Oct 2016, Patrick Boettcher wrote: >>>>> >>>>> > > > Thanks for the quick response. >>>>> > > > Drivers are: >>>>> > > > dvb_core, dvb_usb, dbv_usb_cynergyT2 >>>>> > > >>>>> > > This dbv_usb_cynergyT2 is not from Linus' tree, is it? I don't seem >>>>> > > to be able to find it, and the only google hit I am getting is your >>>>> > > very mail to LKML :) >>>>> > >>>>> > It's a typo, it should say dvb_usb_cinergyT2. >>>>> >>>>> Ah, thanks. Same issues there in >>>>> >>>>> cinergyt2_frontend_attach() >>>>> cinergyt2_rc_query() >>>>> >>>>> I think this would require more in-depth review of all the media drivers >>>>> and having all this fixed for 4.9. It should be pretty straightforward; >>>>> all the instances I've seen so far should be just straightforward >>>>> conversion to kmalloc() + kfree(), as the buffer is not being embedded in >>>>> any structure etc. >>>> >>>> What we're doing on most cases is to put a buffer (usually with 80 >>>> chars for USB drivers) inside the "state" struct (on DVB drivers), >>>> in order to avoid doing kmalloc/kfree all the times. One such patch is >>>> changeset c4a98793a63c4. >>>> >>>> I'm enclosing a non-tested patch fixing it for the cinergyT2-core.c >>>> driver. >>>> >>>> Thanks, >>>> Mauro >>>> >>>> [PATCH] cinergyT2-core: don't do DMA on stack >>>> >>> >>> Tried the cinergyT2 patch. No success. When I select a TV channel >>> just nothing happens. There are no error messages. >> >> Could you try compiling with CONFIG_DEBUG_VIRTUAL=y and seeing if you >> get a nice error message? >> >> --Andy > > Done. Still no error messages in dmesg and syslog. > > DVB adapter signals it is tuned to the channel. > For me it looks like there`s no data reaching the application > (similar to if I forget to connect an antenna). I'm surprised. CONFIG_DEBUG_VIRTUAL=y really ought to have caught the problem, whatever it is. You could try CONFIG_DEBUG_SG as well, but I admit I'm grasping at straws there. Maybe the DVB people have a better idea as to what's going on here. It's plausible that the patch you're testing got rid of the DMA on the stack but is otherwise buggy. --Andy