From patchwork Thu May 2 21:10:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 241101 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BA26F2C00D0 for ; Fri, 3 May 2013 07:10:38 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758504Ab3EBVKa (ORCPT ); Thu, 2 May 2013 17:10:30 -0400 Received: from mail-la0-f42.google.com ([209.85.215.42]:47652 "EHLO mail-la0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758143Ab3EBVK3 (ORCPT ); Thu, 2 May 2013 17:10:29 -0400 Received: by mail-la0-f42.google.com with SMTP id fq13so967574lab.15 for ; Thu, 02 May 2013 14:10:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:to:subject:from:organization:date:mime-version :content-type:content-transfer-encoding:message-id :x-gm-message-state; bh=eDKRNL/uGShAhRwnt6DN89YuId3bCfwd8wHKFzCDgIc=; b=GtvUSvR1eQEgsMx0Hy8IZP7sfZDHhwmuJqNs+qpDnvTMRYrAZYEN7U8YoOTLrRZWzI jlr8oGVKbhYNZAN04wRgDr7qQLZ6+V5v5d3PY8xxl+MyunBCZRvEOOBTETb7jBO8laY4 Wgmmpf7WyHCtG3Xfw/9UWW192ou0/oT4eEGGtYhe1k+0Je0tWowcYpiEeD2zwBK/fmh7 nXcG7OXJJxOx3IcBFq3+0T5nAgoTpNyIlmomc/dffxu/Ad7/wvOGPDOMTLICwgFc1Xgk mdrMxxcOtYE1wVtCBtQvDNa2+EB3SLI/OXsdeQTPPY7agRk+iIC+7NVK0Ni005IG+xOf IcVA== X-Received: by 10.112.72.97 with SMTP id c1mr3304879lbv.96.1367529027182; Thu, 02 May 2013 14:10:27 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-76-92-193.pppoe.mtu-net.ru. [91.76.92.193]) by mx.google.com with ESMTPSA id r9sm3296143lbr.3.2013.05.02.14.10.25 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 02 May 2013 14:10:26 -0700 (PDT) To: netdev@vger.kernel.org, klassert@mathematik.tu-chemnitz.de, tedheadster@gmail.com Subject: [PATCH RFT] 3c59x: fix freeing nonexistent resource on driver unload From: Sergei Shtylyov Organization: Cogent Embedded Date: Fri, 3 May 2013 01:10:22 +0400 MIME-Version: 1.0 Message-Id: <201305030110.22462.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQmw2OP8G2UQ4rY3IbdkltnqSopLoRzhTTO6x5g2gXibQJilGH/x5b3AXu4J98EUTPuhX9pm Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When unloading the driver that drives an EISA board, a message similar to the following one is displayed: Trying to free nonexistent resource <0000000000013000-000000000001301f> Then an user is unable to reload the driver because the resource it requested in the previous load hasn't been freed. This happens most probably due to a typo in vortex_eisa_remove() which calls release_region() with 'dev->base_addr' instead of 'edev->base_addr'... Reported-by: Matthew Whitehead Signed-off-by: Sergei Shtylyov --- The patch is against David Miller's 'net-next.git' repo. Matthew, please test it and report on the list. drivers/net/ethernet/3com/3c59x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: net-next/drivers/net/ethernet/3com/3c59x.c =================================================================== --- net-next.orig/drivers/net/ethernet/3com/3c59x.c +++ net-next/drivers/net/ethernet/3com/3c59x.c @@ -951,7 +951,7 @@ static int vortex_eisa_remove(struct dev unregister_netdev(dev); iowrite16(TotalReset|0x14, ioaddr + EL3_CMD); - release_region(dev->base_addr, VORTEX_TOTAL_SIZE); + release_region(edev->base_addr, VORTEX_TOTAL_SIZE); free_netdev(dev); return 0;