Re: [PATCH 1/2] qla2xxx: Fix Crash due to NULL pointer access in qla2x00_sysfs_read_optrom()

2019-05-08 Thread Ewan D. Milne
See below. On Mon, 2019-05-06 at 13:52 -0700, Himanshu Madhani wrote: > From: Quinn Tran > > commit c7702b8c2271 ("scsi: qla2xxx: Get mutex lock before checking > optrom_state") fixed crash while reading optrom data by adding mutex > locking. However, there can be still case where previous WRITE

Problems with logout in qlt_free_session_done

2019-05-08 Thread Shivaram Upadhyayula
Hi, There seem to be a few issues when trying to do a logout qla_target.c:qlt_free_session_done in 4.19.41 1. When the logout timesout qla2x00_sp_timeout is called. This function assumes sp->qpair is valid, but this isn't the case if mq is not enabled 2. qla2x00_async_iocb_timeout also assumes t

Re: Problems with logout in qlt_free_session_done

2019-05-08 Thread Giridhar Malavali
On 5/8/19, 1:42 PM, "linux-scsi-ow...@vger.kernel.org on behalf of Shivaram Upadhyayula" wrote: Hi, There seem to be a few issues when trying to do a logout qla_target.c:qlt_free_session_done in 4.19.41 1. When the logout timesout qla2x00_sp_timeout is called. This

[PATCH v2 4/7] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva In order to support additional features in hex_dump_to_buffer, replace the ascii bool parameter with flags. Signed-off-by: Alastair D'Silva --- drivers/gpu/drm/i915/intel_engine_cs.c| 2 +- drivers/isdn/hardware/mISDN/mISDNisar.c | 6 -- drive

[PATCH v2 0/7] Hexdump Enhancements

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva Apologies for the large CC list, it's a heads up for those responsible for subsystems where a prototype change in generic code causes a change in those subsystems. This series enhances hexdump. These improve the readability of the dumped data in certain situations (eg. wi

[PATCH v2 7/7] lib/hexdump.c: Optionally retain byte ordering

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva The behaviour of hexdump groups is to print the data out as if it was a native-endian number. This patch tweaks the documentation to make this clear, and also adds the HEXDUMP_RETAIN_BYTE_ORDER flag to allow groups of multiple bytes to be printed without affecting the orde

[PATCH v2 6/7] lib/hexdump.c: Allow multiple groups to be separated by spaces

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva Similar to the previous patch, this patch separates groups by 2 spaces for the hex fields, and 1 space for the ASCII field. eg. buf:: 454d414e 43415053 4e495f45 00584544 NAMESPAC E_INDEX. buf:0010: 0002 Sign

[PATCH v2 5/7] lib/hexdump.c: Allow multiple groups to be separated by lines '|'

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva With the wider display format, it can become hard to identify how many bytes into the line you are looking at. The patch adds new flags to hex_dump_to_buffer() and print_hex_dump() to print vertical lines to separate every N groups of bytes. eg. buf:: 454d414e 434

[PATCH v2 1/7] lib/hexdump.c: Fix selftests

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva The overflow tests did not account for the situation where no overflow occurs and len < rowsize. This patch renames the cryptic variables and accounts for the above case. The selftests now pass. Signed-off-by: Alastair D'Silva --- lib/test_hexdump.c | 47 ++

[PATCH v2 2/7] lib/hexdump.c: Relax rowsize checks in hex_dump_to_buffer

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva This patch removes the hardcoded row limits and allows for other lengths. These lengths must still be a multiple of groupsize. This allows structs that are not 16/32 bytes to display on a single line. This patch also expands the self-tests to test row sizes up to 64 bytes

[PATCH v2 3/7] lib/hexdump.c: Optionally suppress lines of repeated bytes

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva Some buffers may only be partially filled with useful data, while the rest is padded (typically with 0x00 or 0xff). This patch introduces a flag to allow the supression of lines of repeated bytes, which are replaced with '** Skipped %u bytes of value 0x%x **' An inline wr

Re: [PATCH v2 4/7] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-05-08 Thread Jani Nikula
On Wed, 08 May 2019, Alastair D'Silva wrote: > From: Alastair D'Silva > > In order to support additional features in hex_dump_to_buffer, replace > the ascii bool parameter with flags. > > Signed-off-by: Alastair D'Silva > --- > drivers/gpu/drm/i915/intel_engine_cs.c| 2 +- For i915

Re: [PATCH v2 4/7] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-05-08 Thread Greg Kroah-Hartman
On Wed, May 08, 2019 at 05:01:44PM +1000, Alastair D'Silva wrote: > From: Alastair D'Silva > > In order to support additional features in hex_dump_to_buffer, replace > the ascii bool parameter with flags. > > Signed-off-by: Alastair D'Silva > --- > drivers/gpu/drm/i915/intel_engine_cs.c

RE: [PATCH v2 4/7] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-05-08 Thread David Laight
From: Alastair D'Silva > Sent: 08 May 2019 08:02 > To: alast...@d-silva.org ... > --- a/include/linux/printk.h > +++ b/include/linux/printk.h > @@ -480,13 +480,13 @@ enum { > DUMP_PREFIX_OFFSET > }; > > -extern int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, > -

RE: [PATCH v2 4/7] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-05-08 Thread Alastair D'Silva
> -Original Message- > From: David Laight > Sent: Wednesday, 8 May 2019 7:20 PM > To: 'Alastair D'Silva' ; alast...@d-silva.org > Cc: Jani Nikula ; Joonas Lahtinen > ; Rodrigo Vivi ; > David Airlie ; Daniel Vetter ; Dan > Carpenter ; Karsten Keil pingi.de>; Jassi Brar ; Tom Lendacky > ; D

Re: [PATCH v2 3/7] lib/hexdump.c: Optionally suppress lines of repeated bytes

2019-05-08 Thread Randy Dunlap
On 5/8/19 12:01 AM, Alastair D'Silva wrote: > From: Alastair D'Silva > > Some buffers may only be partially filled with useful data, while the rest > is padded (typically with 0x00 or 0xff). > > This patch introduces a flag to allow the supression of lines of repeated > bytes, which are replaced

Re: [PATCH] scsi: bnx2fc: fix incorrect cast to u64 on shift operation

2019-05-08 Thread Saurav Kashyap
-Original Message- From: on behalf of Colin King Date: Saturday, 4 May 2019 at 10:18 PM To: "qlogic-storage-upstr...@qlogic.com" , "James E . J . Bottomley" , "Martin K . Petersen" , "linux-scsi@vger.kernel.org" Cc: "kernel-janit...@vger.kernel.org" , "linux-ker...@vger.kernel.org" S

Re: [PATCH] scsi: bnx2fc: fix incorrect cast to u64 on shift operation

2019-05-08 Thread Christophe JAILLET
Le 04/05/2019 à 18:48, Colin King a écrit : From: Colin Ian King Currently an int is being shifted and the result is being cast to a u64 which leads to undefined behaviour if the shift is more than 31 bits. Fix this by casting the integer value 1 to u64 before the shift operation. Addresses-Co

[PATCH 3/3][V3] iio: Handle enumerated properties with gaps

2019-05-08 Thread Alexandru Ardelean
From: Lars-Peter Clausen Some enums might have gaps or reserved values in the middle of their value range. E.g. consider a 2-bit enum where the values 0, 1 and 3 have a meaning, but 2 is a reserved value and can not be used. Add support for such enums to the IIO enum helper functions. A reserved

[PATCH 2/3][V3] scsi: sd: remove sysfs_match_string() dense array comment

2019-05-08 Thread Alexandru Ardelean
The comment is no longer valid, since it supports arrays with gaps now. Signed-off-by: Alexandru Ardelean --- Changelog v2 -> v3: * after fixing __sysfs_match_string() this comment is no longer valid drivers/scsi/sd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/sd.c b/dri

[PATCH 1/3][V3] lib: fix __sysfs_match_string() helper when n != -1

2019-05-08 Thread Alexandru Ardelean
The documentation the `__sysfs_match_string()` helper mentions that `n` (the size of the given array) should be: * @n: number of strings in the array or -1 for NULL terminated arrays The behavior of the function is different, in the sense that it exits on the first NULL element in the array. Thi

Re: [PATCH] mptsas: fix undefined behaviour of a shift of an int by more than 31 places

2019-05-08 Thread Colin Ian King
On 05/05/2019 04:34, James Bottomley wrote: > On Sat, 2019-05-04 at 17:40 +0100, Colin King wrote: >> From: Colin Ian King >> >> Currently the shift of int value 1 by more than 31 places can result >> in undefined behaviour. Fix this by making the 1 a ULL value before >> the shift operation. > >

Re: [PATCH 3/3][V3] iio: Handle enumerated properties with gaps

2019-05-08 Thread Andy Shevchenko
On Wed, May 08, 2019 at 02:19:13PM +0300, Alexandru Ardelean wrote: > From: Lars-Peter Clausen > > Some enums might have gaps or reserved values in the middle of their value > range. E.g. consider a 2-bit enum where the values 0, 1 and 3 have a > meaning, but 2 is a reserved value and can not be

Re: [PATCH] mptsas: fix undefined behaviour of a shift of an int by more than 31 places

2019-05-08 Thread James Bottomley
On Wed, 2019-05-08 at 14:07 +0100, Colin Ian King wrote: > On 05/05/2019 04:34, James Bottomley wrote: > > On Sat, 2019-05-04 at 17:40 +0100, Colin King wrote: > > > From: Colin Ian King > > > > > > Currently the shift of int value 1 by more than 31 places can > > > result in undefined behaviour.

Re: [GIT PULL] first round of SCSI updates for the 5.1+ merge window

2019-05-08 Thread pr-tracker-bot
The pull request you sent on Tue, 07 May 2019 22:03:12 -0700: > git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-misc has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/d1cd7c85f9e29740fddec6f25d8bf061937bf58d Thank you! -- Deet-doot-dot, I am a bot. htt