From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Kerr Subject: Re: [PATCH] efivarfs: Delete dentry from dcache in efivarfs_file_write() Date: Thu, 17 Jan 2013 17:37:30 +0800 Message-ID: <50F7C65A.7030308@canonical.com> References: <1358408353-24497-1-git-send-email-matt@console-pimps.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1358408353-24497-1-git-send-email-matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Matt Fleming Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Matt Fleming , Josh Boyer , "Lee, Chun-Yi" , Andy Whitcroft List-Id: linux-efi@vger.kernel.org Hi all, > Unlike the unlink path that is called from the VFS layer, we need to > call d_delete() ourselves when a variable is deleted in > efivarfs_file_write(). > > Failure to do so means we can access a stale struct efivar_entry when > reading/writing the file, which can result in the following oops, I still get an oops from Linghu Xiang's open/unlink test with this patch applied, running on OVMF. I'll investigate further.. Cheers, Jeremy