Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3514861rwi; Wed, 12 Oct 2022 03:13:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5cZR5mzTVK/GFJNsmGs9mSVeCMeynIP/Yx48GTGQfFjJrA0mtW9vZW2lXHNFxefY/aoypd X-Received: by 2002:a17:906:ee86:b0:741:89bc:27a1 with SMTP id wt6-20020a170906ee8600b0074189bc27a1mr22874540ejb.725.1665569626538; Wed, 12 Oct 2022 03:13:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665569626; cv=none; d=google.com; s=arc-20160816; b=aBafnc+TaUD95ie6IxfheOVdWLYD8kv7HJtSsjYJcbuzqGoMVOe/5OyA/WRDqtRRSm FrlWXhy/OB9aZ06+9ja+cgy2gnd4Jvq1wIv7pSVVPYBnsw9ssMUTdOOrSGh8QMFQ1rnr v5KreHAK4RH2YO0RFl9drJVYocyG+12zSr07+iAIElUCHIbl1i6E13TWbx4Ky2hrfngv xCdK5N44KPgymAIfSnV/IJm4j1TvQ3uv2KvSShMrlK7Hb2k/aLNOemkChwuGg8GpPS6p s623xNYzgEfZRsg2osTSQR1GDAQhqPZVuP5rf84UwmPB+lq1qEFDe189uiBdrgPiWeyI NuBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/Ldwvi/6+WpjkFB34Wr6wWsgreWRXiHPDgevaXrBBZI=; b=XOGxO/YV3RbqPnakjxQI/hClta7rCpukwA3qOTmVW8da2EM0+H1xoolpzcb5Kmj8Jj GuwTHAZN51f9uryD70YUUvcixYcpT274DPR4LJnbLZ8dZA+bDChe0wwidO6ihdBjGex/ +WzZSMUU1vJllAL+/QU0VLK0g1QVs4mH/3PzAkOr7Gk/sbIHeKUbGv3oU4ANVAb1Fld/ 3qk/XngA43JY42vdgkIkMEJTFJYUrBK4AdmMZJNzxXXe45bBeE4ZBnAklb/USfImSZ8o c9ZndOa54RnBTJnHrEigodZ3PfIuQWptIRfCiEBgp1XmTAjrgELotJPhBjVyxQlcw2pW iiPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RaFpALgt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fi20-20020a056402551400b0045c329a4b37si6265885edb.146.2022.10.12.03.13.19; Wed, 12 Oct 2022 03:13:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RaFpALgt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbiJLKKT (ORCPT + 99 others); Wed, 12 Oct 2022 06:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbiJLKKK (ORCPT ); Wed, 12 Oct 2022 06:10:10 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5208D2F002 for ; Wed, 12 Oct 2022 03:10:05 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id w2so16117862pfb.0 for ; Wed, 12 Oct 2022 03:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/Ldwvi/6+WpjkFB34Wr6wWsgreWRXiHPDgevaXrBBZI=; b=RaFpALgtowsu6Bkd9rKpn7h03KNbXqbnKGe0rAl8lZDuXRbNU6nnjMu4wDilW9vTy+ y1JjbuaObbzQbyEWIsKNhBUuCgOQreVFgmSVsAkSGxspgskSVKcj+f9y+7rhEO3vC0a+ NyRz1QPjlaF7hsaugq/ujebXPNJFSPiDXvEmVFYPUCo9R253n3oWavycY9HKF1FcXbOB /FnW4qirR0PPLbQzXouQF9+X/RkLXexkrn8Q/sVis5M8DbL0pc2JNWGTHDVv4rdXPa5o 12UbiA2JnHNU4q5Z0+z6jweUiceFrqawiJQbyMGY5+7LfO9FaqZvpBjoBGoqfla9FY05 en1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/Ldwvi/6+WpjkFB34Wr6wWsgreWRXiHPDgevaXrBBZI=; b=vMdwAqgQIANHEugrGAODEa/cifEjsTfHe8TudzrAWbmekQ2jDKVZpVXPf5MUTFu6gy rTS2pDZiKYlItKTv8DWhSUlIQRA6qqoYsumxyW8yd3Ik9dv0yPr2NchNjLU5ZWpvQpDn 2IH6CWweCEU/uM7Nio37o7d3WYvSLfnTNKePqTV2pDFhqiLNr6Gv0Px9ciN4u7yR7gor cKnC4KoDMOoP3ZgdTos1t+ihmxf0u7rJEQ96pYf8Y/KdIL8eCmEV2V/YgFslBenMhhW6 zc5d/H4rLJvHHmVIoKU94+M4qTEiSPmKoyGMqUO28KPedx0yKLDmI23ub6OfM7FsDPr2 Z9Eg== X-Gm-Message-State: ACrzQf1KjtkLaoSq/lI4FIormGKgI6b4NbBFNWWHMXlso7q6tIbd11UZ kTPiMKkFIteFqbiXeXxam5yM7QOctXNguILpzfNipA== X-Received: by 2002:a05:6a00:181c:b0:563:2c6c:2a7a with SMTP id y28-20020a056a00181c00b005632c6c2a7amr18816296pfa.28.1665569405415; Wed, 12 Oct 2022 03:10:05 -0700 (PDT) MIME-Version: 1.0 References: <67f722b4bfe84b01bbbf37258a278a68@zeku.com> In-Reply-To: <67f722b4bfe84b01bbbf37258a278a68@zeku.com> From: Ulf Hansson Date: Wed, 12 Oct 2022 12:09:27 +0200 Message-ID: Subject: Re: [PATCH] mmc: sdio: fix kernel panic when remove non-standard SDIO card To: =?UTF-8?B?5qyn6Ziz54Kc6ZKKKFdlaXpoYW8gT3V5YW5nKQ==?= Cc: =?UTF-8?B?546L5aSn5a6HKEpvaG4gV2FuZyk=?= , Sergey Shtylyov , =?UTF-8?B?6ams5a6P5LyfKE1hdHRoZXcgTWEp?= , Pierre Ossman , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 12 Oct 2022 at 03:50, =E6=AC=A7=E9=98=B3=E7=82=9C=E9=92=8A(Weizhao = Ouyang) wrote: > > 2022=E5=B9=B410=E6=9C=8811=E6=97=A5 22:41, Ulf Hansson wrote: > > > > On Tue, 27 Sept 2022 at 04:04, Weizhao Ouyang > > wrote: > > > > > > From: Matthew Ma > > > > > > SDIO tuple is only allocated for standard SDIO card, especially it > > > causes memory corruption issues when the non-standard SDIO card has > > > removed since the card device's reference counter does not increase f= or > > > it at sdio_init_func(), but all SDIO card device reference counter ha= s > > > decreased at sdio_release_func(). > > > > > > Fixes: 1a632f8cdc33 ("sdio: split up common and function CIS parsing"= ) > > > Signed-off-by: Matthew Ma > > > Reviewed-by: Weizhao Ouyang > > > Reviewed-by: John Wang > > > > Apologize for the delay! > > > > Wow, that's a very old bug you fixed! However, it looks like the fixed > > commit should be changed to 6f51be3d37df ("sdio: allow non-standard > > SDIO cards"). > > Thanks, I messed the tag. > > > > > I tried to apply the patch, but the patch format seems to be corrupt. > > Did you use git format-patch and did run ./scripts/checkpatch.pl on > > it? > > > > Yeah I used checkpatch.pl with strict mode to check this patch, and it > has no obvious style problems. What's the format error you got? ERROR: patch seems to be corrupt (line wrapped?) #130: FILE: drivers/mmc/core/sdio_bus.c:291: struct sdio_func *func =3D dev_to_sdio_func(dev); total: 1 errors, 0 warnings, 9 lines checked If you haven't read the submitting-patches guidelines [1], I strongly recommend you to have a look. For example, it explains why you should use git send-email, if you aren't doing that already. Kind regards Uffe [1] https://www.kernel.org/doc/html/v6.0/process/submitting-patches.html