Skip to contentSkip to conversation

Fix for hlist_entry_safe() regression

PATCH In review Paul E. McKenney 2 participants 4 messages Mar 14, 2013 – Mar 21, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix for hlist_entry_safe() regression

Hello, Ingo

This series contains a single commit that fixes a regression in hlist_entry_safe(). This macro references its argument twice, which can cause NULL-pointer errors. This commit applies a gcc statement expression, creating a temporary variable to avoid the double reference. This has been posted to LKML at https://lkml.org/lkml/2013/3/9/75.

Kudos to CAI Qian, whose testing uncovered this, to Eric Dumazet, who spotted root cause, and to Li Zefan, who tested this commit.

This commit is available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/urgent

Thanx, Paul

----------------------------------------------------------------
Paul E. McKenney (1):
list: Fix double fetch of pointer in hlist_entry_safe()

 include/linux/list.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
#1 lore raw

[Reposting with corrected subject line.]

Hello, Ingo,

This series contains a single commit that fixes a regression in hlist_entry_safe(). This macro references its argument twice, which can cause NULL-pointer errors. This commit applies a gcc statement expression, creating a temporary variable to avoid the double reference. This has been posted to LKML at https://lkml.org/lkml/2013/3/9/75.

Kudos to CAI Qian, whose testing uncovered this, to Eric Dumazet, who spotted root cause, and to Li Zefan, who tested this commit.

This commit is available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/urgent

Thanx, Paul

----------------------------------------------------------------
Paul E. McKenney (1):
list: Fix double fetch of pointer in hlist_entry_safe()

 include/linux/list.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
#2 lore raw
Quoted 6 lines · Paul E. McKenney

[Reposting with corrected subject line.]

Hello, Ingo,

This series contains a single commit that fixes a regression in hlist_entry_safe(). ..

You do realize that I already merged this a week ago directly? (Merge commit f4846e52c517)

Linus

#3 lore raw
Quoted 11 lines · Linus Torvalds
Quoted 6 lines · Paul E. McKenney

[Reposting with corrected subject line.]

Hello, Ingo,

This series contains a single commit that fixes a regression in hlist_entry_safe(). ..

You do realize that I already merged this a week ago directly? (Merge commit f4846e52c517)

I do now! I must confess that I didn't think to check mainline. Please accept my apologies for the noise.

Thanx, Paul