Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "net/rds: Avoid potential use after free in rds_send_remove_from_sock"

This reverts commit 0c85a7e87465f2d4cbc768e245f4f45b2f299b05.

The games with 'rm' are on (two separate instances) of a local variable,
and make no difference.

Quoting Aditya Pakki:
"I was the author of the patch and it was the cause of the giant UMN
revert.

The patch is garbage and I was unaware of the steps involved in
retracting it. I *believed* the maintainers would pull it, given it
was already under Greg's list. The patch does not introduce any bugs
but is pointless and is stupid. I accept my incompetence and for not
requesting a revert earlier."

Link: https://lwn.net/Articles/854319/
Requested-by: Aditya Pakki <pakki001@umn.edu>
Cc: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+1 -2
-1
net/rds/message.c
··· 180 180 rds_message_purge(rm); 181 181 182 182 kfree(rm); 183 - rm = NULL; 184 183 } 185 184 } 186 185 EXPORT_SYMBOL_GPL(rds_message_put);
+1 -1
net/rds/send.c
··· 665 665 unlock_and_drop: 666 666 spin_unlock_irqrestore(&rm->m_rs_lock, flags); 667 667 rds_message_put(rm); 668 - if (was_on_sock && rm) 668 + if (was_on_sock) 669 669 rds_message_put(rm); 670 670 } 671 671