The patch titled swsusp: fix error paths in snapshot_open has been added to the -mm tree. Its filename is swsusp-fix-error-paths-in-snapshot_open.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: swsusp: fix error paths in snapshot_open From: Rafael J. Wysocki <rjw@xxxxxxx> We forget to increase device_available if there's an error in snapshot_open(), so the snapshot device cannot be open at all after snapshot_open() has returned an error. Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx> Cc: Pavel Machek <pavel@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/power/user.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff -puN kernel/power/user.c~swsusp-fix-error-paths-in-snapshot_open kernel/power/user.c --- a/kernel/power/user.c~swsusp-fix-error-paths-in-snapshot_open +++ a/kernel/power/user.c @@ -49,12 +49,14 @@ static int snapshot_open(struct inode *i if (!atomic_add_unless(&device_available, -1, 0)) return -EBUSY; - if ((filp->f_flags & O_ACCMODE) == O_RDWR) + if ((filp->f_flags & O_ACCMODE) == O_RDWR) { + atomic_inc(&device_available); return -ENOSYS; - - if(create_basic_memory_bitmaps()) + } + if(create_basic_memory_bitmaps()) { + atomic_inc(&device_available); return -ENOMEM; - + } nonseekable_open(inode, filp); data = &snapshot_state; filp->private_data = data; _ Patches currently in -mm which might be from rjw@xxxxxxx are swsusp-fix-resume-error-path-in-platform-mode.patch swsusp-disable-nonboot-cpus-before-entering-platform-suspend.patch software-suspend-fix-suspend-when-console-is-in.patch make-xfs-workqueues-nonfreezable.patch swsusp-use-inline-functions-for-changing-page-flags.patch swsusp-do-not-use-page-flags.patch mm-remove-unused-page-flags.patch fix-refrigerator-vs-thaw_process-race.patch swsusp-fix-error-paths-in-snapshot_open.patch swsusp-use-gfp_kernel-for-creating-basic-data-structures.patch freezer-task-exit_state-should-be-treated-as-bolean.patch documentation-ask-driver-writers-to-provide-pm-support.patch freezer-read-pf_borrowed_mm-in-a-nonracy-way.patch freezer-close-theoretical-race-between-refrigerator-and-thaw_tasks.patch freezer-remove-pf_nofreeze-from-rcutorture-thread.patch freezer-remove-pf_nofreeze-from-bluetooth-threads.patch freezer-add-try_to_freeze-calls-to-all-kernel-threads.patch freezer-fix-vfork-problem.patch freezer-take-kernel_execve-into-consideration.patch shrink_slab-handle-bad-shrinkers.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