Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932670AbdHVMRm (ORCPT ); Tue, 22 Aug 2017 08:17:42 -0400 Received: from mail-oi0-f48.google.com ([209.85.218.48]:34405 "EHLO mail-oi0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932427AbdHVMRl (ORCPT ); Tue, 22 Aug 2017 08:17:41 -0400 MIME-Version: 1.0 In-Reply-To: <20170810200733.27sqzr47ixlpxd62@macchiaveli> References: <20170810200733.27sqzr47ixlpxd62@macchiaveli> From: Linus Walleij Date: Tue, 22 Aug 2017 14:17:38 +0200 Message-ID: Subject: Re: KASAN + general protection fault while writing to mmc To: Seraphime Kirkovski Cc: "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 981 Lines: 31 On Thu, Aug 10, 2017 at 10:07 PM, Seraphime Kirkovski wrote: > I got this while restoring a backup with dd on an SDCard. > On 4.13.0-rc4 I get it everytime. > > I'm not sure if it isn't a hardware problem as I have no more cards > left. The only patch that touched blk_rq_map_sg() that calls sg_next() was this: commit 67e69d5220c904238f94bb2e6001d7c590f5a0bb Author: Linus Walleij Date: Fri May 19 15:37:27 2017 +0200 mmc: block: remove req back pointer Just as we can use blk_mq_rq_from_pdu() to get the per-request tag we can use blk_mq_rq_to_pdu() to get a request from a tag. Introduce a static inline helper so we are on the clear what is happening. Suggested-by: Christoph Hellwig Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson Can you try reverting it and see if the problem goes away? Yours, Linus Walleij