From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754322AbdJSW2t (ORCPT ); Thu, 19 Oct 2017 18:28:49 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:36109 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752342AbdJSW2r (ORCPT ); Thu, 19 Oct 2017 18:28:47 -0400 Date: Fri, 20 Oct 2017 00:28:39 +0200 (CEST) From: Thomas Gleixner To: Paul Bolle cc: Kees Cook , "David S. Miller" , Karsten Keil , Johan Hovold , gigaset307x-common@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 32/58] isdn/gigaset: Convert timers to use timer_setup() In-Reply-To: <1508449907.2274.28.camel@tiscali.nl> Message-ID: References: <1508200182-104605-1-git-send-email-keescook@chromium.org> <1508200182-104605-33-git-send-email-keescook@chromium.org> <1508447002.2274.14.camel@tiscali.nl> <1508448028.2274.21.camel@tiscali.nl> <1508449907.2274.28.camel@tiscali.nl> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 19 Oct 2017, Paul Bolle wrote: > On Thu, 2017-10-19 at 23:31 +0200, Thomas Gleixner wrote: > > bas_gigaset_exit() > > { > > for (i = 0; i < driver->minors; i++) { > > if (gigaset_shutdown(driver->cs + i) < 0) > > > > gigaset_shutdown(cs) > > { > > mutex_lock(&cs->mutex); <-------- Explodes here > > > > So driver->cs + i is invalid. No idea how that might be related to that > > timer conversion patch, but .... > > Thanks for peeking into this! > > Please note that driver->minors is one of the more embarrassing warts of the > gigaset code. It's basically hardcoded to 1 for all three drivers (including > bas_gigaset). So driver->cs itself is invalid here. > > And since the patch uses > struct cardstate *cs = urb->context; > > in a few places my guess is that it's really the patch that triggers this. Well, that does not explain why drivers->cs + i would be corrupted. That would require that this cs -> urb link points at driver magically and then wreckages that driver data structure. Might be the case, but if so then there are dragons burried somehwere Thanks, tglx