Re: [PATCH v4 1/7] CIFS: Add safe access to is_valid_oplock and dump_detail ops struct field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2012/5/31 Pavel Shilovsky <pshilovsky@xxxxxxxxx>:
> Signed-off-by: Pavel Shilovsky <pshilovsky@xxxxxxxxx>
> ---
>  fs/cifs/connect.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index ccafded..3647b1a 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -1058,13 +1058,15 @@ cifs_demultiplex_thread(void *p)
>                if (mid_entry != NULL) {
>                        if (!mid_entry->multiRsp || mid_entry->multiEnd)
>                                mid_entry->callback(mid_entry);
> -               } else if (!server->ops->is_oplock_break(buf, server)) {
> +               } else if (!server->ops->is_oplock_break ||
> +                          !server->ops->is_oplock_break(buf, server)) {
>                        cERROR(1, "No task to wake, unknown frame received! "
>                                   "NumMids %d", atomic_read(&midCount));
>                        cifs_dump_mem("Received Data is: ", buf,
>                                      HEADER_SIZE(server));
>  #ifdef CONFIG_CIFS_DEBUG2
> -                       server->ops->dump_detail(buf);
> +                       if (server->ops->dump_detail)
> +                               server->ops->dump_detail(buf);
>                        cifs_dump_mids(server);
>  #endif /* CIFS_DEBUG2 */

Ops - forgot to remove this old version from the directory before send
patches to the list. The right one is "[PATCH v4 1/7] CIFS: Make
accessing is_valid_oplock/dump_detail ops struct field safe".

-- 
Best regards,
Pavel Shilovsky.
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux