Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1570542

Re: scsi: BUG in scsi_init_io

From Dmitry Vyukov <dvyukov@google.com>
Newsgroups linux.kernel
Subject Re: scsi: BUG in scsi_init_io
Date 2017-01-31 11:10 +0100
Message-ID <t5DxU-7RQ-5@gated-at.bofh.it> (permalink)
References <t5CBP-7j5-3@gated-at.bofh.it> <t5CVd-7pw-37@gated-at.bofh.it> <t5Doe-7zo-13@gated-at.bofh.it> <t5Doe-7zo-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jan 31, 2017 at 10:58 AM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
>
> [...]
>
>> Please-please-please, let's not use WARN for something that is not a
>> kernel bug and is user-triggerable. This makes it impossible to
>> automate kernel testing and requires hiring an army of people doing
>> mechanical job of sorting out WARNING reports into kernel-bugs and
>> non-kernel-bugs.
>> If the message is absolutely necessary (while kernel does not
>> generally explain every EINVAL on console), the following will do:
>>
>>       if (!blk_rq_nr_phys_segments(rq)) {
>>               pr_err("you are doing something wrong\n");
>>               return -EINVAL;
>>       }
>
> Yes I understand that. OTOH having the WARN helps you finding the caller because
> of to the stack trace. But arguably that could be accomplished with function
> graph tracing as well. I'll re-send a v2 as a proper patch.


Thank you very much.
Stack trace can be done with dump_stack() if necessary, e.g.

               pr_err("you are doing something wrong here:\n");
               dump_stack();

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

scsi: BUG in scsi_init_io Dmitry Vyukov <dvyukov@google.com> - 2017-01-31 10:10 +0100
  Re: scsi: BUG in scsi_init_io Johannes Thumshirn <jthumshirn@suse.de> - 2017-01-31 10:30 +0100
    Re: scsi: BUG in scsi_init_io Dmitry Vyukov <dvyukov@google.com> - 2017-01-31 11:00 +0100
      Re: scsi: BUG in scsi_init_io Johannes Thumshirn <jthumshirn@suse.de> - 2017-01-31 11:00 +0100
        Re: scsi: BUG in scsi_init_io Dmitry Vyukov <dvyukov@google.com> - 2017-01-31 11:10 +0100
      Re: scsi: BUG in scsi_init_io James Bottomley <jejb@linux.vnet.ibm.com> - 2017-01-31 16:50 +0100

csiph-web