linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
  • * Re: atmel-mci causes kernel panic when CONFIG_DEBUG_VM is set
           [not found] <4DD4CC68.80408@atmel.com>
           [not found] ` <BANLkTinaPW5xcdrNewJC6OW9nqWHC_-TVw@mail.gmail.com>
    @ 2011-05-19 18:25 ` Uwe Kleine-König
      1 sibling, 0 replies; 2+ messages in thread
    From: Uwe Kleine-König @ 2011-05-19 18:25 UTC (permalink / raw)
      To: Ludovic Desroches, linux-mm, linux-mmc, linux-kernel
      Cc: linux-arm-kernel, Ferre, Nicolas, Steven Rostedt, Peter Zijlstra
    
    Hello,
    
    On Thu, May 19, 2011 at 09:53:12AM +0200, Ludovic Desroches wrote:
    > There is a bug with the atmel-mci driver when the debug feature
    > CONFIG_DEBUG_VM is set.
    for the new audience: the driver does the following:
    
    	flush_dcache_page(sg_page(sg));
    
    with sg being a struct scatterlist * provided by the caller of the
    struct mmc_host_ops.request callback.
    
    > Into the atmci_read_data_pio function we use flush_dcache_page (do
    > we really need it?) which call the page_mapping function where we
    > can find VM_BUG_ON(PageSlab(Page)). Then a kernel panic happens.
    > 
    > I don't understand the purpose of the VM_BUG_ON(PageSlab(Page)) (the
    > page comes from a scatter list). How could I correct this problem?
    I discussed this problem with Steven and Peter on irc and Steven found
    two functions in the mmc code (mmc_send_cxd_data and mmc_send_bus_test)
    that use the following idiom:
    
    	struct scatterlist sg;
    	void *data_buf;
    
    	data_buf = kmalloc(len, GFP_KERNEL);
    
    	sg_init_one(&sg, data_buf, len);
    
    Is that allowed (i.e. pass  kmalloc'd memory to sg_init_one)? That might
    be the source of the slub page in the scatterlist, no?
    
    Best regards
    Uwe
    
    -- 
    Pengutronix e.K.                           | Uwe Kleine-Konig            |
    Industrial Linux Solutions                 | http://www.pengutronix.de/  |
    
    --
    To unsubscribe, send a message with 'unsubscribe linux-mm' in
    the body to majordomo@kvack.org.  For more info on Linux MM,
    see: http://www.linux-mm.org/ .
    Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
    Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
    
    ^ permalink raw reply	[flat|nested] 2+ messages in thread

  • end of thread, other threads:[~2011-05-19 18:25 UTC | newest]
    
    Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <4DD4CC68.80408@atmel.com>
         [not found] ` <BANLkTinaPW5xcdrNewJC6OW9nqWHC_-TVw@mail.gmail.com>
         [not found]   ` <4DD4E1DF.7030005@atmel.com>
         [not found]     ` <4DD50A72.2050501@atmel.com>
    2011-05-19 15:16       ` atmel-mci causes kernel panic when CONFIG_DEBUG_VM is set Ludovic Desroches
    2011-05-19 18:25 ` Uwe Kleine-König
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox;
    as well as URLs for NNTP newsgroup(s).