Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24d0c254 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull single_open() leak fixes from Al Viro:
 "A bunch of fixes for a moderately common class of bugs: file with
  single_open() done by its ->open() and seq_release as its ->release().

  That leaks; fortunately, it's not _too_ common (either people manage
  to RTFM that says "When using single_open(), the programmer should use
  single_release() instead of seq_release() in the file_operations
  structure to avoid a memory leak", or they just copy a correct
  instance), but grepping through the tree has caught quite a pile.

  All of that is, AFAICS, -stable fodder, for as far as the patches
  apply.  I tried to carve it up into reasonably-sized pieces (more or
  less "comes from the same tree")"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  rcutrace: single_open() leaks
  gadget: single_open() leaks
  staging: single_open() leaks
  megaraid: single_open() leak
  wireless: single_open() leaks
  input: single_open() leak
  rtc: single_open() leaks
  ds1620: single_open() leak
  sh: single_open() leaks
  parisc: single_open() leaks
  mips: single_open() leaks
  ia64: single_open() leaks
  h8300: single_open() leaks
  cris: single_open() leaks
  arm: single_open() leaks
parents 802d0db8 7ee2b9e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ static const struct file_operations proc_status_fops = {
	.open		= proc_status_open,
	.read		= seq_read,
	.llseek		= seq_lseek,
	.release	= seq_release,
	.release	= single_release,
};
#endif

+1 −1
Original line number Diff line number Diff line
@@ -557,7 +557,7 @@ static const struct file_operations omap_pm_debug_fops = {
	.open		= omap_pm_debug_open,
	.read		= seq_read,
	.llseek		= seq_lseek,
	.release	= seq_release,
	.release	= single_release,
};

static void omap_pm_init_debugfs(void)
+1 −1
Original line number Diff line number Diff line
@@ -644,7 +644,7 @@ static const struct file_operations proc_fasttimer_fops = {
	.open		= proc_fasttimer_open,
	.read		= seq_read,
	.llseek		= seq_lseek,
	.release	= seq_release,
	.release	= single_release,
};
#endif /* PROC_FS */

+1 −1
Original line number Diff line number Diff line
@@ -616,7 +616,7 @@ static const struct file_operations proc_fasttimer_fops = {
	.open		= proc_fasttimer_open,
	.read		= seq_read,
	.llseek		= seq_lseek,
	.release	= seq_release,
	.release	= single_release,
};

#endif /* PROC_FS */
+1 −1
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ static const struct file_operations gpio_proc_fops = {
	.open		= gpio_proc_open,
	.read		= seq_read,
	.llseek		= seq_lseek,
	.release	= seq_release,
	.release	= single_release,
};

static __init int register_proc(void)
Loading