lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 6 Oct 2015 12:33:28 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Jens Axboe <axboe@...nel.dk>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Christoph Hellwig <hch@....de>,
	Ming Lei <ming.lei@...onical.com>
Subject: linux-next: manual merge of the block tree with Linus' tree

Hi Jens,

Today's linux-next merge of the block tree got a conflict in:

  drivers/block/loop.c

between commit:

  f4829a9b7a61 ("blk-mq: fix racy updates of rq->errors")

from Linus' tree and commit:

  bc07c10a3603 ("block: loop: support DIO & AIO")

from the block tree.

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

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

diff --cc drivers/block/loop.c
index 674f800a3b57,23376084a5cb..000000000000
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@@ -1486,47 -1669,25 +1669,26 @@@ static void loop_handle_cmd(struct loop
  {
  	const bool write = cmd->rq->cmd_flags & REQ_WRITE;
  	struct loop_device *lo = cmd->rq->q->queuedata;
 -	int ret = -EIO;
 +	int ret = 0;
  
 -	if (write && (lo->lo_flags & LO_FLAGS_READ_ONLY))
 +	if (write && (lo->lo_flags & LO_FLAGS_READ_ONLY)) {
 +		ret = -EIO;
  		goto failed;
 +	}
  
  	ret = do_req_filebacked(lo, cmd->rq);
 -
   failed:
- 	blk_mq_complete_request(cmd->rq, ret ? -EIO : 0);
+ 	if (ret)
+ 		cmd->rq->errors = -EIO;
+ 	/* complete non-aio request */
+ 	if (!cmd->use_aio || ret)
 -		blk_mq_complete_request(cmd->rq);
++		blk_mq_complete_request(cmd->rq, ret ? -EIO : 0);
  }
  
- static void loop_queue_write_work(struct work_struct *work)
- {
- 	struct loop_device *lo =
- 		container_of(work, struct loop_device, write_work);
- 	LIST_HEAD(cmd_list);
- 
- 	spin_lock_irq(&lo->lo_lock);
-  repeat:
- 	list_splice_init(&lo->write_cmd_head, &cmd_list);
- 	spin_unlock_irq(&lo->lo_lock);
- 
- 	while (!list_empty(&cmd_list)) {
- 		struct loop_cmd *cmd = list_first_entry(&cmd_list,
- 				struct loop_cmd, list);
- 		list_del_init(&cmd->list);
- 		loop_handle_cmd(cmd);
- 	}
- 
- 	spin_lock_irq(&lo->lo_lock);
- 	if (!list_empty(&lo->write_cmd_head))
- 		goto repeat;
- 	lo->write_started = false;
- 	spin_unlock_irq(&lo->lo_lock);
- }
- 
- static void loop_queue_read_work(struct work_struct *work)
+ static void loop_queue_work(struct kthread_work *work)
  {
  	struct loop_cmd *cmd =
- 		container_of(work, struct loop_cmd, read_work);
+ 		container_of(work, struct loop_cmd, work);
  
  	loop_handle_cmd(cmd);
  }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists