Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753832AbcKIUWG convert rfc822-to-8bit (ORCPT ); Wed, 9 Nov 2016 15:22:06 -0500 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:42537 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752397AbcKIUWE (ORCPT ); Wed, 9 Nov 2016 15:22:04 -0500 Date: Wed, 9 Nov 2016 18:21:13 -0200 From: Mauro Carvalho Chehab To: Linus Torvalds Cc: =?UTF-8?B?SsO2cmc=?= Otte , Patrick Boettcher , Mauro Carvalho Chehab , Linux Kernel Mailing List , Linux Media Mailing List Subject: Re: [v4.9-rc4] dvb-usb/cinergyT2 NULL pointer dereference Message-ID: <20161109182113.410aa996@vento.lan> In-Reply-To: References: <20161108182215.41f1f3d2@vento.lan> Organization: Samsung X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 812 Lines: 23 Em Wed, 9 Nov 2016 11:07:35 -0800 Linus Torvalds escreveu: > On Wed, Nov 9, 2016 at 3:09 AM, Jörg Otte wrote: > > > > Tried patch with no success. Again a NULL ptr dereferece. > > That patch was pure garbage, I think. Pretty much all the other > drivers that use the same approach will have the same issue. Adding > that init function just for the semaphore is crazy. > > I suspect a much simpler approach is to just miove the "data_mutex" > away from the priv area and into "struct dvb_usb_device" and > "dvb_usb_adapter". Sure, that grows those structures a tiny bit, and > not every driver may need that mutex, but it simplifies things > enormously. Mauro? Yeah, makes sense. I'll work on moving data_mutex to struct dvb_usb_device. Thanks, Mauro