Fwd: Re: [PATCH] lpfc: Fix Buffer Overflow Error

2019-08-26 Thread James Smart
On 7/16/2019 7:48 AM, KyleMahlkuch wrote: Power and x86 have different page sizes so rather than allocate the buffer based on number of pages we should allocate space by using max_sectors. There is also code in lpfc_scsi.c to be sure we don't write past the end of this buffer. Signed-off-by: K

Re: [RFC] Re: broken userland ABI in configfs binary attributes

2019-08-26 Thread Al Viro
On Mon, Aug 26, 2019 at 09:34:37PM +0300, "Kai Mäkisara (Kolumbus)" wrote: > > > > On 26 Aug 2019, at 19.29, Al Viro wrote: > > > > On Mon, Aug 26, 2019 at 03:48:38AM +0100, Al Viro wrote: > > > >>We might be able to paper over that mess by doing what /dev/st does - > >> checking that file

Re: [RFC] Re: broken userland ABI in configfs binary attributes

2019-08-26 Thread Al Viro
On Mon, Aug 26, 2019 at 11:20:17AM -0700, Matthew Wilcox wrote: > On Mon, Aug 26, 2019 at 05:29:49PM +0100, Al Viro wrote: > > On Mon, Aug 26, 2019 at 03:48:38AM +0100, Al Viro wrote: > > > > > We might be able to paper over that mess by doing what /dev/st does - > > > checking that file_count(f

Re: [RFC] Re: broken userland ABI in configfs binary attributes

2019-08-26 Thread Kai Mäkisara (Kolumbus)
> On 26 Aug 2019, at 19.29, Al Viro wrote: > > On Mon, Aug 26, 2019 at 03:48:38AM +0100, Al Viro wrote: > >> We might be able to paper over that mess by doing what /dev/st does - >> checking that file_count(file) == 1 in ->flush() instance and doing commit >> there in such case. It's no

Re: [RFC] Re: broken userland ABI in configfs binary attributes

2019-08-26 Thread Matthew Wilcox
On Mon, Aug 26, 2019 at 05:29:49PM +0100, Al Viro wrote: > On Mon, Aug 26, 2019 at 03:48:38AM +0100, Al Viro wrote: > > > We might be able to paper over that mess by doing what /dev/st does - > > checking that file_count(file) == 1 in ->flush() instance and doing commit > > there in such case.

[RFC] Re: broken userland ABI in configfs binary attributes

2019-08-26 Thread Al Viro
On Mon, Aug 26, 2019 at 03:48:38AM +0100, Al Viro wrote: > We might be able to paper over that mess by doing what /dev/st does - > checking that file_count(file) == 1 in ->flush() instance and doing commit > there in such case. It's not entirely reliable, though, and it's definitely > not s

Re: [bug report] scsi: lpfc: Support dynamic unbounded SGL lists on G7 hardware.

2019-08-26 Thread James Smart
On 8/26/2019 6:40 AM, Dan Carpenter wrote: Hello James Smart, The patch d79c9e9d4b3d: "scsi: lpfc: Support dynamic unbounded SGL lists on G7 hardware." from Aug 14, 2019, leads to the following static checker warning: drivers/scsi/lpfc/lpfc_init.c:4107 lpfc_new_io_buf() error: n

Re: [PATCH v3] lpfc: Mitigate high memory pre-allocation by SCSI-MQ

2019-08-26 Thread James Smart
On 8/26/2019 12:18 AM, Hannes Reinecke wrote: On 8/16/19 4:36 AM, James Smart wrote: When SCSI-MQ is enabled, the SCSI-MQ layers will do pre-allocation of MQ resources based on shost values set by the driver. In newer cases of the driver, which attempts to set nr_hw_queues to the cpu count, the

Re: [PATCH RFC 00/24] scsi: enable reserved commands for LLDDs

2019-08-26 Thread Hannes Reinecke
On 8/23/19 3:26 PM, John Garry wrote: > On 29/05/2019 14:28, Hannes Reinecke wrote: >> Hi all, >> >> quite some drivers use internal commands for various purposes, most >> commonly sending TMFs or querying the HBA status. >> While these commands use the same submission mechanism than normal >> I/O

[bug report] scsi: lpfc: Support dynamic unbounded SGL lists on G7 hardware.

2019-08-26 Thread Dan Carpenter
Hello James Smart, The patch d79c9e9d4b3d: "scsi: lpfc: Support dynamic unbounded SGL lists on G7 hardware." from Aug 14, 2019, leads to the following static checker warning: drivers/scsi/lpfc/lpfc_init.c:4107 lpfc_new_io_buf() error: not allocating enough data 784 vs 768 drivers

Re: 答复: [PATCH] scsi_dh_alua: always use a 2 seconds delay before retrying RTPG

2019-08-26 Thread Hannes Reinecke
On 7/17/19 11:19 AM, Zhangguanghui wrote: > Hi > Does Hannes' patch has been lightly tested on my scenario, always use 2 > seconds delay before retrying. > The patch looks good to me, well running. > But I'd wonder whether 'if (!pg->interval) ' is necessary condition for codes > style? > Thanks

Re: [PATCH v3] lpfc: Mitigate high memory pre-allocation by SCSI-MQ

2019-08-26 Thread Hannes Reinecke
On 8/16/19 4:36 AM, James Smart wrote: > When SCSI-MQ is enabled, the SCSI-MQ layers will do pre-allocation of > MQ resources based on shost values set by the driver. In newer cases > of the driver, which attempts to set nr_hw_queues to the cpu count, > the multipliers become excessive, with a sing