Re: [lkp] [vfs] b413afd673: kernel BUG at arch/x86/mm/physaddr.c:26!

From: Al Viro
Date: Mon Apr 18 2016 - 22:42:24 EST


On Tue, Apr 19, 2016 at 08:45:48AM +0800, kernel test robot wrote:
> Hi,
>
> Here is the test result for T3.
>
> FYI, we noticed the below changes on
>
> https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git T3
> commit b413afd67397cfc175a9656fc9e0444597a753e0 ("i_dir_seq (__d_add() only, with sanity checks for dir)")

Oh, I see... Try to add this (to be folded into the commit in original
branch):

diff --git a/mm/shmem.c b/mm/shmem.c
index 00d5d02..50447e6 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -3123,7 +3123,8 @@ static struct inode *shmem_alloc_inode(struct super_block *sb)
static void shmem_destroy_callback(struct rcu_head *head)
{
struct inode *inode = container_of(head, struct inode, i_rcu);
- kfree(inode->i_link);
+ if (S_ISLNK(inode->i_mode))
+ kfree(inode->i_link);
kmem_cache_free(shmem_inode_cachep, SHMEM_I(inode));
}