From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:45015 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752528AbcKJIHj (ORCPT ); Thu, 10 Nov 2016 03:07:39 -0500 Date: Thu, 10 Nov 2016 06:07:17 -0200 From: Mauro Carvalho Chehab To: VDR User Cc: LMML Subject: Re: Question about 2 gp8psk patches I noticed, and possible bug. Message-ID: <20161110060717.221e8d88@vento.lan> In-Reply-To: References: <20161108155520.224229d5@vento.lan> <20161109073331.204b53c4@vento.lan> <20161109153521.232b0956@vento.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: Em Wed, 9 Nov 2016 17:03:52 -0800 VDR User escreveu: > >> (gdb) l *module_put+0x67 > >> 0xc10a4b87 is in module_put (kernel/module.c:1108). > >> 1103 int ret; > >> 1104 > >> 1105 if (module) { > >> 1106 preempt_disable(); > >> 1107 ret = atomic_dec_if_positive(&module->refcnt); > >> 1108 WARN_ON(ret < 0); /* Failed to put refcount */ > >> 1109 trace_module_put(module, _RET_IP_); > >> 1110 preempt_enable(); > >> 1111 } > >> 1112 } > > > > OK, I guess we've made progress. Please try the enclosed patch. > > > > Regards, > > Mauro > > > > [media] gp8psk: Fix DVB frontend attach > > > > it should be calling module_get() at attach, as otherwise > > module_put() will crash. > > > > Signed-off-by: Mauro Carvalho Chehab > > I think you forgot the patch. :) commit 0c979a12309af49894bb1dc60e747c3cd53fa888 Author: Mauro Carvalho Chehab Date: Wed Nov 9 15:33:17 2016 -0200 [media] gp8psk: Fix DVB frontend attach it should be calling module_get() at attach, as otherwise module_put() will crash. Signed-off-by: Mauro Carvalho Chehab diff --git a/drivers/media/usb/dvb-usb/gp8psk.c b/drivers/media/usb/dvb-usb/gp8psk.c index cede0d8b0f8a..24eb6c6c8e24 100644 --- a/drivers/media/usb/dvb-usb/gp8psk.c +++ b/drivers/media/usb/dvb-usb/gp8psk.c @@ -250,7 +250,7 @@ static int gp8psk_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) static int gp8psk_frontend_attach(struct dvb_usb_adapter *adap) { - adap->fe_adap[0].fe = gp8psk_fe_attach(adap->dev); + adap->fe_adap[0].fe = dvb_attach(gp8psk_fe_attach, adap->dev); return 0; }