+ hfsplus-prevent-crash-on-exit-from-failed-search.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: hfsplus: prevent crash on exit from failed search
has been added to the -mm tree.  Its filename is
     hfsplus-prevent-crash-on-exit-from-failed-search.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/hfsplus-prevent-crash-on-exit-from-failed-search.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/hfsplus-prevent-crash-on-exit-from-failed-search.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Ernesto A. Fernandez <ernesto.mnd.fernandez@xxxxxxxxx>
Subject: hfsplus: prevent crash on exit from failed search

hfs_find_exit() expects fd->bnode to be NULL after a search has failed. 
hfs_brec_insert() may instead set it to an error-valued pointer.  Fix this
to prevent a crash.

Link: http://lkml.kernel.org/r/803590a35221fbf411b2c141419aea3233a6e990.1530294813.git.ernesto.mnd.fernandez@xxxxxxxxx
Signed-off-by: Ernesto A. Fernandez <ernesto.mnd.fernandez@xxxxxxxxx>
Reported-by: Anatoly Trosinenko <anatoly.trosinenko@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


diff -puN fs/hfsplus/brec.c~hfsplus-prevent-crash-on-exit-from-failed-search fs/hfsplus/brec.c
--- a/fs/hfsplus/brec.c~hfsplus-prevent-crash-on-exit-from-failed-search
+++ a/fs/hfsplus/brec.c
@@ -73,9 +73,10 @@ int hfs_brec_insert(struct hfs_find_data
 	if (!fd->bnode) {
 		if (!tree->root)
 			hfs_btree_inc_height(tree);
-		fd->bnode = hfs_bnode_find(tree, tree->leaf_head);
-		if (IS_ERR(fd->bnode))
-			return PTR_ERR(fd->bnode);
+		node = hfs_bnode_find(tree, tree->leaf_head);
+		if (IS_ERR(node))
+			return PTR_ERR(node);
+		fd->bnode = node;
 		fd->record = -1;
 	}
 	new_node = NULL;
_

Patches currently in -mm which might be from ernesto.mnd.fernandez@xxxxxxxxx are

hfsplus-prevent-crash-on-exit-from-failed-search.patch
hfs-prevent-crash-on-exit-from-failed-search.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux