All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Chris Clayton <chris2553@googlemail.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: Nero 4 Linux applications broken in 4.12
Date: Wed, 5 Jul 2017 13:52:35 +0200	[thread overview]
Message-ID: <20170705115235.GF4076@linux-x5ow.site> (raw)
In-Reply-To: <d92e31ed-db7f-aa4b-5dfd-3f6df4a49ea9@googlemail.com>

On Wed, Jul 05, 2017 at 10:06:49AM +0100, Chris Clayton wrote:
> I'll do this  and send dmesg(?) output as soon as I've got scsi_logging_level installed.

Hi Chris,

does this reproducer work (i.e. output FAIL) for you?

#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>

#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

#include <scsi/sg.h>

int main(int argc, char **argv)
{
	int fd;
	int rc;
	int rsz = 131072;
	int tout = 10800000;
	char buf[42] = { 0 };

	if (argc != 2) {
		printf("usage: %s /dev/sgX\n", argv[0]);
		return 1;
	}

	fd = open(argv[1], O_RDWR);
	if (fd < 0) {
		perror("open");
		return 1;
	}

	rc = ioctl(fd, SG_SET_RESERVED_SIZE, &rsz);
	if (rc < 0) {
		perror("ioctl SG_SET_RESERVED_SIZE");
		goto out_close;
	}

	rc = ioctl(fd, SG_SET_TIMEOUT, &tout);
	if (rc < 0) {
		perror("ioctl SG_SET_TIMEOUT");
		goto out_close;
	}

	buf[4] = 'H';
	rc = write(fd, &buf, sizeof(buf));
	if (rc < 0) {
		perror("write");
		if (errno == EINVAL)
			printf("FAIL\n");
		goto out_close;
	}

	printf("PASS\n");

out_close:
	close(fd);
}

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

  reply	other threads:[~2017-07-05 11:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-05  7:06 Nero 4 Linux applications broken in 4.12 Chris Clayton
2017-07-05  7:39 ` Johannes Thumshirn
2017-07-05  7:57   ` Chris Clayton
2017-07-05  8:44     ` Johannes Thumshirn
2017-07-05  8:48       ` Johannes Thumshirn
2017-07-05  9:06         ` Chris Clayton
2017-07-05 11:52           ` Johannes Thumshirn [this message]
2017-07-05 12:05             ` Chris Clayton
2017-07-05 12:09               ` Johannes Thumshirn
2017-07-05 12:19                 ` Chris Clayton
2017-07-05 12:42                   ` Johannes Thumshirn
2017-07-05 13:45                     ` Chris Clayton
2017-07-05 13:49                       ` Johannes Thumshirn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170705115235.GF4076@linux-x5ow.site \
    --to=jthumshirn@suse.de \
    --cc=chris2553@googlemail.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.