[Bug,202897] BUG: unable to handle kernel paging request at __memmove
diff mbox series

Message ID bug-202897-13602-hcLvm7U5fI@https.bugzilla.kernel.org/
State New
Headers show
Series
  • [Bug,202897] BUG: unable to handle kernel paging request at __memmove
Related show

Commit Message

bugzilla-daemon@bugzilla.kernel.org March 20, 2019, 12:23 a.m. UTC
https://bugzilla.kernel.org/show_bug.cgi?id=202897

--- Comment #4 from phoonchiang (389387252@qq.com) ---
The following patch can fix this bug, but i'm not sure it is the best way 
to fix it.


                void *first_val = s->base + min_offs;
                size_t offs = le16_to_cpu(here->e_value_offs);

Patch
diff mbox series

diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 86ed9c6..fd2ebba 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1695,7 +1695,7 @@  static int ext4_xattr_set_entry(struct ext4_xattr_info
*i,

        /* No failures allowed past this point. */

-       if (!s->not_found && here->e_value_size && here->e_value_offs) {
+       if (!s->not_found && here->e_value_size && here->e_value_offs &&
!here->e_value_inum) {
                /* Remove the old value. */