lkml.org 
[lkml]   [2013]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlinux-next: manual merge of the vfs tree with Linus' tree
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/coredump.c
between commit acdedd99b0f3 ("coredump: sanitize the setting of
signal->group_exit_code") from Linus' tree and commit 03d95eb2f257 ("lift
sb_start_write() out of ->write()") from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au

diff --cc fs/coredump.c
index ec306cc,a987f3d..0000000
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@@ -419,22 -407,9 +419,20 @@@ static void coredump_finish(struct mm_s
mm->core_state = NULL;
}

+static bool dump_interrupted(void)
+{
+ /*
+ * SIGKILL or freezing() interrupt the coredumping. Perhaps we
+ * can do try_to_freeze() and check __fatal_signal_pending(),
+ * but then we need to teach dump_write() to restart and clear
+ * TIF_SIGPENDING.
+ */
+ return signal_pending(current);
+}
+
static void wait_for_dump_helpers(struct file *file)
{
- struct pipe_inode_info *pipe;
- pipe = file_inode(file)->i_pipe;
+ struct pipe_inode_info *pipe = file->private_data;

pipe_lock(pipe);
pipe->readers++;
@@@ -656,7 -627,11 +654,9 @@@ void do_coredump(siginfo_t *siginfo
goto close_fail;
if (displaced)
put_files_struct(displaced);
+ file_start_write(cprm.file);
- retval = binfmt->core_dump(&cprm);
- if (retval)
- current->signal->group_exit_code |= 0x80;
+ core_dumped = !dump_interrupted() && binfmt->core_dump(&cprm);
+ file_end_write(cprm.file);

if (ispipe && core_pipe_limit)
wait_for_dump_helpers(cprm.file);
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-05-02 04:21    [W:0.050 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site